What are interrupts and how interrupt handling is done in modern operating systems?


Interrupts are generally called signals which are generated by the software or hardware when a particular event or process requires immediate attention. So, the signal informs the processor about a high priority and urgent information demand causing an interruption in the current working process.

Thus, whenever an interruption occurs the processor finishes the current instruction execution and starts the execution of the interrupt known as interrupt handling. Moreover, for every interrupt handling to occur there is an Interrupt service routine (ISR) or interrupt handler.

Interrupt handling in modern operating systems

In several operating systems such as Linux. mac or windows Interrupt handling is divided into two parts −

  • First-level interrupt handlers (FLIH), also known as hard interrupt handlers or fast interrupt handlers.

  • Second-level interrupt handlers (SLIH), also known as slow interrupt handlers or soft interrupt handlers.

The uses and properties of FLIH and SLIH are given below −

FLIH

  • These include platform specific interrupt handling.

  • It causes jitter in the execution of the process.

  • It also masks interrupts.

  • FLIH is known as the upper half in Linux.

SLIH

  • It completes long interrupt processing tasks similar to the process or event.

  • Have a dedicated thread for every single handler.

  • It has a long-lived execution time

  • SLIH is known as the Lower half or bottom half in Linux.

The interrupt handling mechanism of an operating system accepts a number which is an address and then selects what specific action to be taken which is already mentioned in the interrupt service routine. In most architecture, the address is stored in a table known as a vector table.

Now let us see the interrupt handling by OS scheme in pictorial representation.

Updated on: 01-Dec-2021

14K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements