A Non-Maskable Interrupt (NMI) is a high-priority interrupt that cannot be stopped by other interrupts. This type of interrupt is typically used to report critical errors such as parity, bus, and math co-processor errors.
When an NMI is triggered, it interrupts the current process and halts the CPU, forcing it to immediately handle the high-priority event. Unlike other interrupts, NMIs cannot be ignored or masked by the system, ensuring that critical errors are addressed promptly.
FAQ
What triggers an NMI?
Non-Maskable Interrupts are triggered by critical errors such as parity, bus, or math co-processor errors that require immediate attention from the system.
What is the difference between an NMI and a maskable interrupt?
Unlike NMI, maskable interrupts can be disabled or ignored by the system. The CPU checks a particular flag to determine whether to mask or process an interrupt. If the flag is set to mask a particular interrupt, the CPU ignores it.
What happens when an NMI occurs?
When an NMI is triggered, it halts the CPU and interrupts the current process, allowing the system to immediately address the high-priority event. The system then saves the current state of the CPU, clears the interrupt, and handles the NMI before returning to the interrupted process.
Conclusion
A Non-Maskable Interrupt (NMI) is a high-priority interrupt that cannot be stopped by other interrupts and is typically used to report critical errors that require immediate attention from the system. When an NMI is triggered, it halts the CPU and interrupts the current process, ensuring that the critical error is addressed promptly.