What is an Interrupt in computer system?


Interrupt is an output to the CPU that causes CPU to suspend its normal sequence of execution and force the CPU to branch to a predetermined memory location and execute program located there. After executing that program CPU return back to the initial program that it was executing and resume its execution. When interrupt occur:

1. CPU completes the current instruction it is executing.

2. Save program counter (PC) contents in a stack.

3. Load PC with the address of interrupt service subroutine.

4. Executes the interrupt service subroutine.

5. Return to the main program and resumes its execution by loading from stack into PC the address which was earlier stored.

Post a Comment

0 Comments