So to overcome this problem, engineers introduced a new mechanism. In this mechanism processor will not check for any signal from hardware or software but instead hardware/software will only send the signal to the processor for processing.  The signal from hardware or software should have highest priority because processor should leave the current process and process the signal of hardware or software. This mechanism of processing the signal is called Interrupt of the system.

What is an Interrupt?

Interrupt is a signal which has highest priority from hardware or software which processor should process its signal immediately.

Types of Interrupts:

Although interrupts have highest priority than other signals, there are many type of interrupts but basic type of interrupts are Classification of Interrupts According to Periodicity of Occurrence: Classification of Interrupts According to the Temporal Relationship with System Clock:

Interrupt Handling:

We know that instruction cycle consists of fetch, decode, execute and read/write functions. After every instruction cycle the processor will check for interrupts to be processed if there is no interrupt is present in the system it will go for the next instruction cycle which is given by the instruction register. If there is an interrupt present then it will trigger the interrupt handler, the handler will stop the present instruction which is processing and save its configuration in a register and load the program counter of the interrupt from a location which is given by the interrupt vector table. After processing the interrupt by the processor interrupt handler will load the instruction and its configuration from the saved register, process will start its processing where it’s left. This saving the old instruction processing configuration and loading the new interrupt configuration is also called as context switching. The interrupt handler is also called as Interrupt service routine (ISR). There are different types of interrupt handler which will handle different interrupts. For example for the clock in a system will have its interrupt handler, keyboard it will have its interrupt handler for every device it will have its interrupt handler. The main features of the ISR are

Interrupts can occur at any time they are asynchronous. ISR’s can call for asynchronous interrupts. Interrupt service mechanism can call the ISR’s from multiple sources. ISR’s can handle both maskable and non maskable interrupts. An instruction in a program can disable or enable an interrupt handler call. ISR on beginning of execution it will disable other devices interrupt services. After completion of the ISR execution it will re initialize the interrupt services. The nested interrupts are allowed in ISR for diversion to other ISR.

Type of Interrupt Handlers:

Interrupt Latency:

When an interrupt occur, the service of the interrupt by executing the ISR may not start immediately by context switching. The time interval between the occurrence of interrupt and start of execution of the ISR is called interrupt latency.

Tswitch = Time taken for context switch ΣTexec = The sum of time interval for executing the ISR Interrupt Latency = Tswitch + ΣTexec

Related Link: Real Time Operating System This is one main part missing.. Usually, there will be a PIC [Programmable Interrupt Controller]. When an interrupt occurs, the proc will be indicated by the PIC. The proc will save current context (regs content). Then it looks at the list of Interrupt Request Registers (IRR) of the PIC which specifies all interrupts pending to be serviced. that great Comment * Name * Email * Website

Δ

Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 58Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 2Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 4Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 26Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 58Types of Interrupts   How to Handle Interrupts    Interrupt Latency - 56