Kevin S. answered 01/12/23
Statistics, Math, Data Sci: 20 years of building student confidence!
Step 1 − First, device issues interrupt to CPU.
Step 2 − Then, the CPU finishes the execution of the current instruction.
Step 3 − CPU tests for pending interrupt requests. If there is one, it sends an acknowledgment to the device, removing its interrupt signal.
Step 4 − CPU saves the program status word onto the control stack.
Step 5 − CPU loads the location of the interrupt handler into the PC register.
Step 6 − Save the contents of all registers from the control stack into memory.
Step 7 − Find the cause of the interrupt, interrupt type, or invoke the appropriate routine.
Step 8 − Restore saved registers from the stack.
Step 9 − Restore the PC to dispatch the original process.