The main difference between maskable and non maskable interrupt is that a CPU can either disable or ignore a maskable interrupt, but it is not possible to disable or ignore a non-maskable interrupt by the instructions of a CPU.
Generally, an interrupt is an event caused by a component other than the CPU. It indicates the CPU of an external event that requires immediate attention. Furthermore, interrupts occur asynchronously. Maskable and non-maskable interrupts are two types of interrupts.
Key Areas Covered
1. What is Maskable Interrupt
– Definition, Functionality
2. What is Non Maskable Interrupt
– Definition, Functionality
3. Difference Between Maskable and Non Maskable Interrupt
– Comparison of Key Differences
Interrupt, Maskable Interrupt, Non-Maskable Interrupt
What is Maskable Interrupt
Maskable interrupts are the interrupts that the processor can deny. Therefore, these interrupts help in managing low priority tasks. Moreover, RST6.5, RST7.5, and RST5.5 of 8085 are some common examples of maskable Interrupts.
What is Non Maskable Interrupt
Non-maskable interrupt (NMI) is an interrupt the CPU cannot ignore. Usually, it indicates a non-recoverable hardware error. Non-maskable interrupts help when response time is critical or when it is not possible to disable normal system operations.
Modern computer systems use this type of interrupt to handle non-recoverable errors which need immediate attention. Therefore, it is not possible to mask these interrupts in the normal operation of the system. Moreover, internal system chipset errors, errors in memory, data corruption errors on the system and peripheral buses are some examples of such errors. Also, debugging helps to diagnose and fix faults in the code. In these situations, the NMI can execute an interrupt handler that transfers control to a special monitor program.
Difference Between Maskable and Non Maskable Interrupt
A maskable interrupt is a hardware interrupt that may be ignored by setting a bit in an interrupt mask register’s (IMR) bit-mask. In contrast, nNon-maskable interrupt is a hardware interrupt that lacks an associated bit-mask, so that it can never be ignored. Thus, this is the main difference between maskable and non maskable interrupt.
CPU can disable or ignore a maskable interrupt while the CPU cannot disable or ignore a non-maskable interrupt.
Moreover, maskable interrupts help to handle lower priority tasks, whereas non-maskable interrupt help to handle higher priority tasks such as watchdog timers. Hence, this is another difference between maskable and non maskable interrupts.
Also, it is possible to handle a maskable interrupt after executing the current instruction, but when non-maskable interrupts occur, the current instructions and status are stored in stack for the CPU to handle the interrupt.
Furthermore, RST6.5, RST7.5, RST5.5 of 8085 microprocessor are some maskable interrupts, whereas Trap of 8085 microprocessor is an example for non-maskable interrupt.
In brief, maskable and non-maskable interrupts are two types of interrupts. The main difference between maskable and non maskable interrupt is that maskable interrupt can be disabled or ignored by the CPU while non-maskable interrupt cannot be disabled or ignored by the CPU.
1.“Interrupt.” Wikipedia, Wikimedia Foundation, 6 May 2019, Available here.
2.“Non-Maskable Interrupt.” Wikipedia, Wikimedia Foundation, 9 Sept. 2018, Available here.
1.”Interrupt” By Jens Kreberderivative work Parzi – PDF by Jens Kreber and Prozessorregister Interrupts.svg by xl (CC BY-SA 3.0) via Commons Wikimedia
Leave a Reply