

The sending of the signal is known as Interrupt Acknowledgement. A peripheral or terminal device like a keyboard or mouse either sends some data to the memory or receives some data. Input/Output interrupts are easy to handle. The suspended process will now be resumed. After its execution, the control will be coming back to the very process which was suspended.

The interrupt handler will now execute the necessary set of instructions (ISR) to handle the interrupt. Now, the control will be given to that process to handle the interrupt and this process is known as Interrupt Service Routine (ISR). Using the interrupt number and IVT, the CPU will get to know the base address of the process that is needed to handle the respective interrupt. The interrupt number and its corresponding instructions set address(or process’s base address) are stored in a vector table known as IVT or Interrupt Vector Table. The CPU will now detect the kind of interrupt and its respective interrupt number.

One thing to note here is that the state of the current program which was in execution is saved along with its corresponding register states.Īfter saving the state of the current process, the control is then given to a program to handle the interrupt, and every program is known as Interrupt Handler. But if there is some un-serviced interrupt, then the CPU will pay attention to that interrupt. If any interrupt is not there, then the CPU will continue with the next instruction. This controller will generate an interrupt to the CPU.Īfter completion of one instruction cycle, the CPU checks whether an interrupt is pending or not. Let's now discuss how an interrupt is handled and how a interrupt handler works in detail.Īn interrupt first goes to hardware known as Interrupt Controller. The second level interrupt handler is also known as a slow interrupt handler or a soft interrupt handler. SLIH usually deals with the non-maskable interrupts that have higher priority than CPU's current process.

The first level interrupt handler is also known as a fast interrupt handler or a hard interrupt handler.Ģ. FLIH mainly deals with maskable interrupts(interrupts that can be ignored by the instructions of the CPU). First Level Interrupt Handler or FLIH:įLIH quickly services an interrupt and schedule the second level interrupt handlers if needed. We can broadly divide interrupt handlers into two categories according to the interrupt handling time:ġ. There is usually an interrupt handler associated with an interrupt.įor example, the keyboard has its interrupt handler, and the printer has its interrupt handler, and so on. We have several types of interrupt handlers. After saving the state of the current process, the control is then given to a program to handle the interrupt. When the ISR is complete, the process gets resumed.īefore working on the interrupt, the state of the current program which was in execution is saved. ISR handles the request and sends it to the CPU. The interrupt handler is also known as Interrupt Service Routine (ISR). Interrupt Handler is a process that runs when an interrupt is generated by hardware or software. This entire process is called interrupt handling. CPU gives access to the interrupt handler to process the interrupt. The CPU saves the state of the ongoing process and shifts its attention to the interrupt generated. The article contains topics such as Interrupts, Interrupt Handlers, and their types, how different interrupts like I/O interrupt, and device interrupts are generated and handled.Įach of the topics is explained clearly with diagrams wherever necessary. The CPU saves the state of the ongoing process and shifts its attention to the interrupt generated by giving access to the interrupt handler. The process that runs when an interrupt is generated is the Interrupt Handler.
#Program interrupt in computer architecture notes software#
An interrupt is a signal sent by hardware or software to the processor for processing.
