Abstract
- Also known as Interrupt Service Routine (ISR)
- A set of Instruction at a fixed address within Kernel, responding to the Interrupts (中断) like System Call (系统调用) by performing the following 3 items
3 Steps
- Saves the state of the CPU for the Process (进程) into the process’s Process Control Block (PCB). The Program Counter of the process is saved to a different Register. So the interrupted process can be resumed later
- Does its other business
- Invokes the Process Scheduler
C Implementation
Any variables changed inside the interrupt handler should be declared with volatile
Interrupt Handler Pointer
- It contains the Memory Address to the start of the Instruction of the Interrupt Handler