View the Most Wanted LQ Wiki articles.
LinuxQuestions.org > Linux Wiki > IRQ

From LQWiki

Jump to: navigation, search

IRQ stands for "Interrupt Request" and is a hardware mechanism by which the CPU can be interrupted by a hardware device, to service a request for information.

In its simplest form, an IRQ is a wire connected to the pins of the processor that is also connected to the hardware device (or its controller on the motherboard). The device sends a pulse along the wire, which triggers a software interrupt in the processor. This forces the processor to push the current value of the Program Counter (a register that points to the current position in the current process) onto the stack, and then jumps to a special area of kernel memory.

The kernel then takes over, and processes the input/output request.

The IRQ number refers to a simple count of which wire was used; IRQ-1 refers to the first wire, IRQ-2 to the second, and so on.

For any given processor, there are a limited number of IRQ wires. To enable more hardware to be connected, it is quite common to share IRQs between different devices. A device is said to be capable of such "IRQ-Sharing" if it can be polled by the processor in order to determine if it generated the interrupt or not.

IRQs on PCs

On PCs, there are 16 different IRQs available. IRQs are usually "invisible" when dealing with modern-day PCI cards, but can be a major pain when dealing with older ISA cards. PCI devices share one of two IRQ numbers, while most ISA devices require an unique number. A device's IRQ is usually determined in firmware or even hardware, or, if you are lucky, with jumpers. It usually (or always) impossible to change a device's IRQ from within the operating system, but it is possilbe to change at what IRQ the operating system expects a device to be.


Personal tools