A hardware interrupt is a physical device's method for requesting attention from a computer. The physical device capable of interrupting the computer is known as an interrupt source. The device's request for attention is usually asynchronous with respect to the computer's execution of code.
An interrupt handler is a piece of code invoked to satisfy a hardware interrupt. Interrupt handlers are installed and removed by drivers and act as subroutines of the driver. A typical interrupt handler consists of two parts: a hardware interrupt handler and a secondary interrupt handler. The hardware interrupt handler is the code that services the immediate needs of the device that caused the interrupt, performing actions that must be synchronized with it. The secondary interrupt handler is the code that perform the remainder of the work associated with the interrupt. Secondary interrupt handlers are executed at a lower priority than hardware interrupt handlers.
Interrupt handler registration is the process of associating an interrupt source with an interrupt handler. Interrupt dispatching is the sequence of steps necessary to invoke an interrupt handler in response to an interrupt.
Execution contexts for interrupt handling are discussed in Noninterrupt and Interrupt-Level Execution.