This preview shows page 1. Sign up to view the full content.
Unformatted text preview: above items are pushed on the kernel’s stack rather than the user’s stack. Exception handlers run in kernel mode (Section 8.2.3, which means they have complete access to all system resources. Once the hardware triggers the exception, the rest of the work is done in software by the exception handler. After the handler has processed the event, it optionally returns to the interrupted program by executing a special “return from interrupt” instruction, which pops the appropriate state back into the processor’s control and data registers, restores the state to user mode (Section 8.2.3) if the exeption interrupted a user program, and then returns control to the interrupted program. 8.1.2 Classes of Exceptions
Exceptions can be divided into four classes: interrupts, traps, faults, and aborts. Figure 8.4 summarizes the attributes of these classes.
Class Interrupt Trap Fault Abort Cause Signal from I/O device Intentional exception Potentially recoverable error Nonrecoverable error Async/Sync Async Sync Sync Sync Return behavior always returns to next instruction Always returns to next instruction Might return to cu...
View Full Document