The programmable interrupt controller (PIC) is a hardware device used in computer systems to manage interrupt signals from peripheral devices, prioritize them, and forward the appropriate interrupt requests to the central processing unit (CPU). By aggregating multiple interrupt lines and providing programmable priority schemes, a PIC enables efficient and orderly handling of asynchronous events, allowing the CPU to respond to external hardware conditions without continuous polling.
Overview
- Function: Receives interrupt requests (IRQs) from hardware devices, assigns priority levels, and signals the CPU when an interrupt should be serviced.
- Operation: When an interrupt is asserted, the PIC evaluates its priority scheme, masks (ignores) lower‑priority or disabled IRQs, and forwards the highest‑priority request to the CPU via a dedicated interrupt line. The CPU acknowledges the interrupt, services the corresponding interrupt handler, and then signals the PIC that the interrupt has been handled, allowing the PIC to issue subsequent pending interrupts.
Historical development
- The first widely adopted PIC was the Intel 8259A, introduced in the late 1970s for the IBM PC/AT architecture. It supported up to eight IRQ lines, could be cascaded to provide up to 15 IRQs, and offered programmable priority rotation.
- As systems grew more complex, the need for higher interrupt throughput and more IRQ lines led to the development of advanced controllers such as the Intel Advanced Programmable Interrupt Controller (APIC) architecture. APICs integrate a local APIC in each processor core and an I/O APIC for external devices, supporting up to 24‑bit interrupt vectors and sophisticated interrupt routing in multiprocessor environments.
Key characteristics
| Characteristic | Intel 8259A | I/O APIC (APIC architecture) |
|---|---|---|
| Maximum IRQ lines | 8 (cascadable to 15) | 24 (typically 24‑bit vectors) |
| Priority scheme | Fixed or programmable rotation | Fully programmable, supports dynamic priority |
| Multiprocessor support | None (single‑processor) | Designed for symmetric multiprocessing (SMP) |
| Interrupt vector size | 8 bits | 8‑bit vector plus extended fields |
| Edge/Level sensitivity | Edge‑triggered only | Edge‑ or level‑triggered, per‑line configuration |
Modern usage
In contemporary x86 and x86‑64 systems, the legacy 8259 PIC is still present for backward compatibility but is largely superseded by the APIC subsystem. Operating systems such as Windows, Linux, and various BSD variants configure the APIC during boot, establishing interrupt routing tables that map device IRQs to specific CPU cores, thereby optimizing load balancing and reducing interrupt latency.
Embedded microcontrollers may incorporate simplified PIC functionality within the core logic, often referred to as an interrupt controller block, which provides vectoring and priority features tailored to the specific peripheral set of the device.
Standardization and specifications
- Intel 8259A: Documented in Intel’s “8259A Programmable Interrupt Controller” datasheet (1979).
- APIC: Defined in the Intel® 64 and IA‑32 Architectures Software Developer’s Manual, Volume 3, and the ACPI specification for platform configuration.
Related concepts
- Interrupt request (IRQ): The signal generated by a hardware device to request CPU attention.
- Interrupt Service Routine (ISR): The software routine invoked by the CPU to handle a specific interrupt.
- Interrupt masking: The ability to enable or disable specific IRQ lines, preventing them from reaching the CPU.
References
- Intel Corporation, “8259A Programmable Interrupt Controller,” 1979.
- Intel® 64 and IA‑32 Architectures Software Developer’s Manual, Volume 3: System Programming Guide.
- Advanced Configuration and Power Interface (ACPI) Specification, Version 6.5.
(This entry reflects information available from established technical documentation and widely recognized sources.)