An interrupt request (IRQ) is a signal from a hardware device asking the processor to suspend its current instruction stream and run code that services that device. In operating systems, the interrupt request is the basic mechanism by which network adapters, storage controllers, timers and keyboards announce that data is ready or an operation has finished, so the kernel does not have to check each device continuously.
Within the area of drivers & devices, the term IRQ also names the numbered interrupt line or vector assigned to a device. When an IRQ arrives, the processor saves its state, looks up the handler in the interrupt vector table and transfers control to the driver’s interrupt service routine.
How an interrupt request reaches the processor
An interrupt request travels from the device through an interrupt controller to a processor core, which then runs a registered handler. The controller collects many device inputs, applies priority and masking rules, and presents a single vector number to the CPU at the next instruction boundary.
The sequence below summarizes what happens on a typical x86-64 or ARM system when a device raises an IRQ. Exact details differ by architecture, but the order of steps is broadly the same.
| Stage | What happens | Component involved |
|---|---|---|
| Assertion | Device drives a line or writes a message | Device hardware |
| Arbitration | Controller checks mask and priority | APIC, GIC or PIC |
| Acceptance | Core finishes the current instruction and saves context | Processor core |
| Dispatch | Vector number selects a handler entry | Interrupt vector table |
| Service | Driver acknowledges the device and queues work | Interrupt service routine |
| Completion | End-of-interrupt is signaled and context restored | Controller and kernel |
The kernel keeps the service routine as short as possible. Linux splits the work into a top half, which runs with the interrupt line masked, and a bottom half such as a softirq, tasklet or threaded handler. Windows uses the same idea with an ISR followed by a deferred procedure call (DPC). This split keeps other interrupts from waiting behind slow processing.
Types of IRQ signaling
IRQs differ mainly in how the device signals and whether the signal can be shared. Older buses used physical pins, while modern PCI Express devices send interrupts as memory writes.
| Signaling form | How it is triggered | Sharing behavior | Typical use |
|---|---|---|---|
| Edge-triggered | Transition of the line from low to high | Poor; edges can be lost | Legacy ISA devices |
| Level-triggered | Line held active until serviced | Good; handlers check their device | PCI INTx pins |
| Message signaled (MSI) | Write to a special memory address | Not needed; unique vectors | PCI Express devices |
| MSI-X | Per-queue address and data pairs | Not needed; up to 2,048 vectors | NVMe, multiqueue NICs |
| Inter-processor interrupt | One core signals another | Not applicable | TLB shootdown, scheduling |
Message signaled interrupts removed the main weakness of pin-based IRQs. Because each queue of a network or NVMe controller can have its own vector, the operating system can steer interrupts to specific cores and keep cache locality, which matters at millions of packets or I/O operations per second.
From fixed IRQ numbers to dynamic vectors
Early PCs had only 16 IRQ lines, provided by two cascaded Intel 8259 programmable interrupt controllers, and many numbers were fixed by convention. Users once set jumpers by hand, and IRQ conflicts between sound cards, modems and network cards were a common cause of devices that failed to work.
| IRQ | Conventional device | Status today |
|---|---|---|
| IRQ 0 | System timer | Replaced by local APIC and HPET timers |
| IRQ 1 | PS/2 keyboard controller | Often emulated for USB keyboards |
| IRQ 2 | Cascade to the second controller | Remapped to IRQ 9 |
| IRQ 8 | Real-time clock | Still present on many chipsets |
| IRQ 14 and 15 | Primary and secondary IDE | Unused on AHCI and NVMe systems |
Plug and play firmware, ACPI tables and the Advanced Programmable Interrupt Controller (APIC) ended manual assignment. The I/O APIC provides 24 or more inputs per controller, and the local APIC in each core accepts up to 224 usable vectors. On ARM systems the Generic Interrupt Controller (GIC) plays the same role, and the device tree or ACPI describes which interrupt each peripheral uses.
How IRQs compare with related mechanisms
An IRQ is one of several ways a device and the processor coordinate. The key distinction is who initiates the exchange and who moves the data.
| Mechanism | Initiator | Main purpose | Relation to IRQ |
|---|---|---|---|
| Interrupt request | Device | Signal that attention is needed | The event itself |
| Polling | Processor | Repeatedly read device status | Alternative to IRQs |
| Direct memory access | Device | Move data without the CPU | Usually ends with an IRQ |
| Exception | Processor | Report a fault in running code | Shares the vector table |
| Software interrupt | Program | Request a kernel service | Same entry path, different source |
High-throughput drivers often combine interrupts and polling. Linux NAPI disables a network IRQ once traffic arrives and polls the receive ring until it is empty, then re-enables the interrupt. Storage stacks apply similar interrupt coalescing, where hardware waits for several completions or a short timer before raising one IRQ.
Configuring and troubleshooting IRQs
Administrators rarely assign IRQ numbers today, but they still tune interrupt affinity, coalescing and latency. On Linux, /proc/interrupts shows per-core counts and /proc/irq/N/smp_affinity controls which cores may handle a vector; the irqbalance daemon adjusts this automatically. On Windows, Device Manager lists resources by connection and tools such as LatencyMon measure ISR and DPC execution times.
- Interrupt storms occur when a device keeps asserting a level-triggered line that no handler clears, which can consume an entire core.
- Long ISR or DPC times raise interrupt latency and cause audio dropouts or missed real-time deadlines.
- Uneven affinity concentrates all IRQs on core 0 and limits network throughput on multicore servers.
- Firmware bugs in ACPI routing tables can assign the wrong line, leaving a device silent until a kernel parameter or update corrects it.
In virtual machines, IRQs are emulated or passed through. Posted interrupts and an IOMMU with interrupt remapping let a guest receive device interrupts directly, which reduces exits to the hypervisor and protects the host from malicious interrupt messages.
A plain-language summary
An interrupt request is a device tapping the processor on the shoulder. The computer does not ask the keyboard, the disk and the network card over and over whether they have news. Instead, each device raises its hand only when it needs attention.
When that happens, the processor briefly pauses its work. It lets the right driver handle the device, and then it continues. This saves a great deal of effort. It is also the reason a computer can react quickly to a key press while still running other programs.
An example from practice
A systems engineer runs a Linux server with a 25 Gb/s network adapter that handles web traffic. Monitoring shows that one core sits at 100 percent while the others are mostly idle, and request latency spikes at peak hours. Reading /proc/interrupts reveals that all receive-queue IRQs land on core 0.
The adapter supports MSI-X with 16 queues, so the engineer enables receive-side scaling, spreads the queue vectors across 16 cores through their affinity masks, and raises the coalescing delay from 0 to about 50 microseconds. The interrupt rate per core drops sharply, cache locality improves, and throughput rises while tail latency falls to within the service target.