Computer hardware servicing

Please forward this error screen to 50. This article is about computer interrupts. For the computer hardware servicing of the effect of disruptions on job performance, see Interruption science.

This article needs additional citations for verification. In system programming, an interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. An interrupt alerts the processor to a high-priority condition requiring the interruption of the current code the processor is executing. Hardware interrupts are used by devices to communicate that they require attention from the operating system. A software interrupt is caused either by an exceptional condition in the processor itself, or a special instruction in the instruction set which causes an interrupt when it is executed. Each interrupt has its own interrupt handler. Interrupts are a commonly used technique for computer multitasking, especially in real-time computing.

Hardware interrupts were introduced as an optimization, eliminating unproductive waiting time in polling loops, waiting for external events. They may be implemented in hardware as a distinct system with control lines, or they may be integrated into the memory subsystem. NMIs are used for the highest priority tasks such as timers, especially watchdog timers. Software interrupt: an interrupt generated within a processor by executing an instruction. Software interrupts are often used to implement system calls because they result in a subroutine call with a CPU ring level change. Spurious interrupt: a hardware interrupt that is unwanted.

They are typically generated by system conditions such as electrical interference on an interrupt line or through incorrectly designed hardware. Processors typically have an internal interrupt mask which allows software to ignore all external hardware interrupts while it is set. PIC or disabling interrupts in the device itself. An interrupt that leaves the machine in a well-defined state is called a precise interrupt. All instructions before the one pointed to by the PC have fully executed. The execution state of the instruction pointed to by the PC is known.