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. Interrupts occur asynchronously. Maskable and non-maskable interrupts are two types of interrupts.
1. Maskable Interrupt :
An Interrupt that can be disabled or ignored by the instructions of CPU are called as Maskable Interrupt.The interrupts are either edge-triggered or level-triggered or level-triggered.
Eg: RST6.5,RST7.5,RST5.5 of 8085
2. Non-Maskable Interrupt :
An interrupt that cannot be disabled or ignored by the instructions of CPU are called as Non-Maskable Interrupt.A Non-maskable interrupt is often used when response time is critical or when an interrupt should never be disable during normal system operation. Such uses include reporting non-recoverable hardware errors, system debugging and profiling and handling of species cases like system resets.
Eg: Trap of 8085
Difference between maskable and nonmaskable interrupt :
|SR.NO.||Maskable Interrupt||Non Maskable Interrupt|
|1||Maskable interrupt is a hardware Interrupt that can be disabled or ignored by the instructions of CPU.||A non-maskable interrupt is a hardware interrupt that cannot be disabled or ignored by the instructions of CPU.|
|2||When maskable interrupt occur, it can be handled after executing the current instruction.||When non-maskable interrupts occur, the current instructions and status are stored in stack for the CPU to handle the interrupt.|
|3||Maskable interrupts help to handle lower priority tasks.||Non-maskable interrupt help to handle higher priority tasks such as watchdog timer.|
|4||Maskable interrupts used to interface with peripheral device.||Non maskable interrupt used for emergency purpose e.g power failure, smoke detector etc .|
|5||In maskable interrupts, response time is high.||In non maskable interrupts, response time is low.|
|6||It may be vectored or non-vectored.||All are vectored interrupts.|
|7||Operation can be masked or made pending.||Operation Cannot be masked or made pending.|
|8||RST6.5, RST7.5, and RST5.5 of 8085 are some common examples of maskable Interrupts.||Trap of 8085 microprocessor is an example for non-maskable interrupt.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Hardware Interrupt and Software Interrupt
- Difference between Interrupt and Polling
- Difference between Programmed and Interrupt Initiated I/O
- Difference between Interrupt and Exception
- I/O Interface (Interrupt and DMA Mode)
- Purpose of an Interrupt in Computer Organization
- Difference between Adaptive and Non-Adaptive Routing algorithms
- Difference between Volatile Memory and Non-Volatile Memory
- Difference between Preemptive Priority based and Non-preemptive Priority based CPU scheduling algorithms
- Difference between static and non-static variables in Java
- Difference between Procedural and Non-Procedural language
- Difference between Uniform Memory Access (UMA) and Non-uniform Memory Access (NUMA)
- Difference between Impact and Non-Impact Printers
- Difference between Linear and Non-linear Data Structures
- Difference between Token based and Non-Token based Algorithms in Distributed System
- Difference between Preemptive and Non-preemptive CPU scheduling algorithms
- Difference between Clustered and Non-clustered index
- Difference between Real-time Tasks and Non-Real-time Tasks
- Difference between Linear Pipeline and Non-Linear Pipeline
- Difference between Recursive Predictive Descent Parser and Non-Recursive Predictive Descent Parser
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.