# # trap, exception, fault, interrupt,abort
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

trap, exception, fault, interrupt, abort

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© August 2004 Tony Lawrence

Computers screw up. You can have meaningless instructions, attempts to divide by zero, attempts to access non-existent memory, and other situations the cpu can't deal with. These are all similar events, and some are used interchangeably at times. There are subtle differences in what these specifically mean, but there is also a lot of overlap.

First, consider the mechanics: if we have a problem (like division by zero or a bad memory reference), we need both code to handle the problem and a way to get to that code. Handling might mean printing an informative warning message, silently allocating memory for a process that needs it,killing off an errant process, or even shutting down the entire machine. The way to get to the handler is going to be through some sort of vector table: if you have problem number 0, jump to this code, and so on.

So all these things are really interrupts to normal CPU instruction flow. If we want to be precise, we can say that "interrupts" come from outside the cpu's hardware (some other device requesting attention or program code requesting a software interrupt), a "fault" happens before the CPU can execute the instruction (divide by zero, bogus instruction), a trap happens after or during the execution (a debugger breakpoint, an overflow situation), and an "abort" is something where the CU has no idea what is going on at all.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> trap, exception, fault, interrupt,abort


Inexpensive and informative Apple related e-books:

Photos: A Take Control Crash Course

Sierra: A Take Control Crash Course

Take Control of Upgrading to El Capitan

Take control of Apple TV, Second Edition

Take Control of Apple Mail, Third Edition





More Articles by © Tony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Security is mostly a superstition. It does not exist in nature, nor do the children of men as a whole experience it. Avoiding danger is no safer in the long run than outright exposure. Life is either a daring adventure, or nothing. (Helen Keller)




Linux posts

Troubleshooting posts


This post tagged:

Kernel

Programming

Troubleshooting

UnixWords



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode