Avoid Non-Maskable Interrupts (NMIs)

Avoid the Non-Maskable Interrupt (NMI) in x86 designs. ARM doesn't even support it. An NMI is an interrupt that can't be disabled by clearing the CPU's interrupt-enable flag, unlike most normal interrupts. Non-Maskable interrupts are typically used to signal events that require immediate action, such as a parity error, a hardware failure, or imminent loss of power.

The problem with NMIs is that they can occur even when interrupts have been disabled. This is important because sometimes developers assume that they can mask interrupts in order to prevent their processes from being interrupted. NMIs undermine this assumption, and this can lead to unexpected behavior if an NMI fires during a period in which the software expects to be operating without interruption.

For this reason, NMIs are normally used only when the subsequent condition of the machine isn't a relevant consideration; for instance, when the machine is about to shut down, or when an unrecoverable hardware error has occurred.

Anytime an NMI is used, any software may experience unexpected behavior and there's no good way to predict what the behavior may be.