APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

trap, exception, fault, interrupt, abort


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:

Take Control of iCloud, Fifth Edition

Take Control of Apple Mail, Third Edition

Take Control of Parallels Desktop 12

Take Control of iCloud

Sierra: A Take Control Crash Course





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





If you lie to the computer, it will get you. (Perry Farrar)




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