Abstract


5 Steps

  1. Saves the state of the CPU for the Process (进程) like stack pointers into the process’s Process Control Block (PCB). So the interrupted process can be resumed later
  2. Does its other business
  3. Invokes the Process Scheduler
  4. Restore register/CPU
  5. Return from interrupt

C Implementation

Any variables changed inside the interrupt handler should be declared with volatile

Interrupt Handler Pointer