Interrupts and Exceptions
The Intel documentation classifies interrupts and exceptions as follows:
Interrupts:
- Maskable interrupts
All Interrupt Requests (IRQs) issued by I/O devices give rise to maskable interrupts . A maskable interrupt can be in two states: masked or unmasked; a masked interrupt is ignored by the control unit as long as it remains masked.
- Nonmaskable interrupts
Only a few critical events (such as hardware failures) give rise to nonmaskable interrupts . Nonmaskable interrupts are always recognized by the CPU.
Exceptions:
- Processor-detected exceptions
Generated when the CPU detects an anomalous condition while executing an instruction. These are further divided into three groups, depending on the value of the
eipregister that is saved on the Kernel Mode stack when the CPU control unit raises the exception.- Faults
Can generally be corrected; once corrected, the program is allowed to restart with no loss of continuity. The saved value of
eipis the address of the instruction that caused the fault, and hence that instruction can be resumed when the exception handler terminates. As we’ll see in the section "Page Fault Exception Handler" in Chapter 9, resuming the same instruction is necessary whenever the handler is able to correct the anomalous condition that caused the exception.- Traps
Reported immediately following the execution of the trapping instruction; after the kernel returns control to the program, it is allowed to continue its execution with no loss of continuity. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access