ArticleslgStudy

science

Non-maskable interrupt

Non-maskable interrupt is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Non-maskable interrupt rather than just read about it. In short: In computing, a non-maskable interrupt (NMI) is a hardware interrupt that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware errors.

Key takeaways

  • Non-maskable interrupt belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Non-maskable interrupt to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Non-maskable interrupt from memory before moving on to harder problems.

Reference excerpt

In computing, a non-maskable interrupt (NMI) is a hardware interrupt that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware errors. Some NMIs may be masked, but only by using proprietary methods specific to the particular NMI. With regard to SPARC, the non-maskable interrupt (NMI), despite having the highest priority among interrupts, can be prevented from occurring through the use of an interrupt mask. An NMI is often used when response time is critical or when an interrupt should never be disabled during normal system operation. Such uses include reporting non-recoverable hardware errors, system debugging and profiling, and handling of special cases like system resets. Modern computer architectures typically use NMIs to handle non-recoverable errors which need immediate attention. Therefore, such interrupts should not be masked in the normal operation of the system. These errors include non-recoverable internal system chipset errors, corruption in system memory such as parity and ECC errors, and data corruption detected on system and peripheral buses. On some systems, a computer user can trigger an NMI through hardware and software debugging interfaces and system reset buttons. Programmers typically use debugging NMIs to diagnose and correct faulty code. In such cases, an NMI can execute an interrupt handler that transfers control to a special monitor program. From this program, a developer can inspect the machine's memory and examine the internal state of the program at the instant of its interruption. This also allows the debugging or diagnosing of computers which appear hung.

History In older architectures, NMIs were used for interrupts which were typically never disabled because of the required response time. They were hidden signals. Examples include the floppy disk controller on the Amstrad PCW, the 8087 coprocessor on the x86 when used in the IBM PC or its compatibles (even though Intel recommended connecting it to a normal interrupt), and the Low Battery signal on the HP 95LX. In the original IBM PC, an NMI was triggered if a parity error was detected in system memory, or reported by an external device. In either case, the PC would display an error message and halt. Some later IBM-compatibles used an NMI to conceal the hardware differences from that of the original IBM PC. On such computers, an NMI would be generated when a program attempted to access incompatible hardware. A BIOS interrupt handler would then translate the program's request to match the hardware that was actually present. The SMM in the 386SL is a better way to do this. Some 8-bit home computers used the NMI line to permit a "warm start" if the system had locked up. Typically, this would restore the control registers to known good values stored in ROM, without destroying whatever data that the user might currently have loaded. On the Commodore 8-bit machines, the RESTORE key was hooked up directly or indirectly to the NMI line on the 6502-series CPU, but the reset would take place only if the NMI handler routine in ROM detected that RUN/STOP was also being held down when RESTORE was struck (this combination being the Commodore version of a three finger salute). Commodore also connected the MOS Technology 6526 CIA #2 in the C64 and C128 to the processor's NMI line, which was part of the means by which software emulation of the 6551 ACIA was accomplished. Atari's 8-bit line used a SYSTEM RESET button for this same purpose. Debugging NMIs have appeared in a number of forms, including the Apple Macintosh's "programmers' button", and certain key combinations on Sun workstations. With the introduction of Windows 2000, Microsoft allowed the use of an NMI to cause a system to either break into a debugger, or dump the contents of memory to disk and reboot. Debugging NMIs have also been used by devices that allow leisure users and gamers to manipulate running programs. Devices which added a button to generate an NMI, such as Romantic Robot's Multiface, were a popular accessory for 1980s 8-bit and 16-bit home computers. These peripherals had a small amount of ROM and an NMI button. Pressing the button transferred control to the software in the peripheral's ROM, allowing the suspended program to be saved to disk (very useful for tape-based games with no disk support, but also for saving games in progress), screenshots to be saved or printed, or values in memory to be manipulated—a cheating technique to acquire extra lives, for example. Not all computers provide a mechanism for triggering NMIs; however, many machines (typically rackmount servers) provide a physical button specifically for this purpose. Other machines may expose this functionality via an expansion card. Miles Gordon Technology's DISCiPLE and +D products for the ZX Spectrum featured an NMI-producing "magic button". On the Nintendo Entertainment System, an NMI is generated during each vertical blanking interval. Because these NMIs (often referred to as "vblank interrupts") occur at frequent, regular intervals, code that manipulates game graphics and audio is often executed inside of the NMI handler routine. Clearing the 7th bit of the PPU's $2000 register disables vblank interrupts, and setting it enables them. This lets the CPU finish up mandatory tasks, at the cost of lag.

See also Advanced Programmable Interrupt Controller (APIC) Inter-processor interrupt (IPI) Interrupt Interrupt handler Interrupt latency Programmable Interrupt Controller (PIC)

Notes

External links "Dump Switch Support for Windows". Microsoft Developer Network. 2001-12-04. Archived from the original on 2012-10-26. Retrieved 2013-08-31. "CGA Mode CRTC initialization". Amstrad PPC Technical Manual. seasip.info. Retrieved 2013-08-31.

Worked examples

Example 1 — a first encounter with Non-maskable interrupt

Start with the simplest possible case. Write down what Non-maskable interrupt claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Non-maskable interrupt before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Non-maskable interrupt ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Non-maskable interrupt

In research
Non-maskable interrupt appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Non-maskable interrupt in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Non-maskable interrupt is common in secondary-school and first-year university syllabi. It links to neighbouring topics Debugging, Interrupts, so understanding it makes those chapters shorter.
In everyday life
Look for Non-maskable interrupt outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Non-maskable interrupt” →

How to study Non-maskable interrupt in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Non-maskable interrupt means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Non-maskable interrupt out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Non-maskable interrupt in simple terms?

In computing, a non-maskable interrupt (NMI) is a hardware interrupt that standard interrupt-masking techniques in the system cannot ignore. It typically occurs to signal attention for non-recoverable hardware errors.

Why does Non-maskable interrupt matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Non-maskable interrupt?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Non-maskable interrupt.

Tags

  • Debugging
  • Interrupts

Keep exploring