Interrupt Handling, disable the interrupt, prioritize the interrupt, vectored interrupt with examples in operating systems

How to handle interrupts?

An interrupt can be handled by the following techniques;

Disable the interrupt

Defining priorities for an interrupt.

How to disable the interrupt?

When OS handling the one interrupt, all other interrupts should be ignored until the handling of the first interrupt. Interrupt handling is done in sequence.

How are interrupts managed by defining priorities?

If currently OS handling one interrupt, and another interrupt arrive in the CPU, and if this another interrupt has more priority as compared to the old one, then new interrupt with high priority should be handled first, and the old interrupt will be in waiting state.

Leads to nested priority based interrupts.

What is vectored interrupt?

When a vectored interrupt, interrupted the CPU, the CPU knows the address of interrupt service routine.
 

What are examples of a vectored interrupt?

  • TRAP
  • RST 7.5

  • RST 5.5

  • RST 6.5,

What is Non vectored interrupt?

When Non vectored interrupt, interrupted the CPU, the CPU does not know the address of interrupt handler. Address of the interrupt handler routine needs to be provided externally by the device.

What are examples of  Non vectored interrupt?

INTR

 What is interrupt vector?

Interrupt vector contains the addresses of the interrupt handler routine. Every different interrupt has a different interrupt handler.