20.4: Suspension Interrupt Processing Summary
- Page ID
- 19991
The following diagram presents an overview of the general flow used for processing interrupts by the system.
1. Execution of current program is suspended
- save rip and rFlags registers to stack
2. Obtain starting address of Interrupt Service Routine (ISR)
- interrupt number multiplied by 16
- used as offset into Interrupt Descriptor Table (IDT)
- obtains ISR address (for that interrupt) from IDT
3. Jump to Interrupt Service Routine - set rip to address from IDT
4. Interrupt Service Routine Executes
- save context (i.e., any additional registers altered)
- process interrupt (specific to interrupt generated)
- schedule any later data processing activities
5. Interrupted Process Resumption
- resume scheduling based on OS scheduler
- restore context
- perform iret (to pop rFlags and rip registers)
This interrupt processing mechanism allows a dynamic, run-time lookup for the ISR address.