Linux+: Hardware Part 06 - IRQ

Discussion in 'Linux Other' started by Jarret W. Buse, Jan 14, 2014.

  1. Jarret W. Buse

    Jarret W. Buse Active Member Staff Writer

    Messages:
    104
    Likes Received:
    118
    Trophy Points:
    43
    Linux+: Hardware Part 06 - IRQ

    The motherboard is an important part of the computer system which helps to allow for expansion to increase the functionality of a system. For example, a system that does not have a built-in graphics card will need to have one so a monitor can be used. Any device or component which is needed can usually be added as an expansion card. Of course, a lot of devices can now be added as Universal Serial Bus (USB) devices and not require a system to be opened and an expansion card added.

    NOTE: Too many USB devices can overload the USB bus and cause bandwidth issues. This can be a common problem with Raspberry PI systems.

    The expansion slot is an extension of the Input/Output Bus (I/O Bus) for communicating with the CPU. Adding devices to the expansion slot increased the functionality of a system by adding devices to perform specific tasks. A system with a fax/modem allows a PC to act as a fax machine to receive digital faxes which can then be printed to a printer.

    One important aspect of the I/O Bus is the Interrupts. When any device requires the processors attention, it signals the Interrupt Controller with an Interrupt signal along the interrupt line in the I/O Bus. For example, if you press a key on the keyboard, a signal is sent to the Interrupt Controller which then interrupts the CPU. The CPU stops what it is doing, checks the keyboard, processes the key press, and then resumes its previous processing. You may wonder how the CPU determines which device has interrupted it. Each device is configured with an interrupt number or the Interrupt Request (IRQ) which specifies its interrupt line.

    NOTE: Two devices using the same interrupt number causes a conflict and either the devices will not work, or they will only work sometimes with unknown results. Some devices may work with interrupt sharing. The software can help the CPU to determine with which of the two devices it needs to communicate.

    There are 16 interrupts numbered 0 to 15. The interrupts are as follows:

    00 – System Timer
    01 – Keyboard
    02 – 2nd IRQ Controller
    03 – Serial Port 2 (COM2 and COM4)
    04 – Serial Port 1 (COM1 and COM3)
    05 – Parallel Port 2 (LPT2)
    06 – Floppy Disk Controller
    07 – Parallel Port 1(LPT1)
    08 – Real-Time Clock
    09 – Available
    10 – Available
    11 – Available
    12 – Bus Mouse (if used)
    13 – Math Coprocessor
    14 – Primary IDE Controller
    15 – Secondary ISE Controller

    NOTE: Newer systems can use 24 IRQs which the last eight are used for PCI slot and USB devices.

    The Programmable Interrupt Controller (PIC) is a chip which can interrupt the CPU. Computers have two PIC chips, a master and a slave. The master, or main PIC chip, interrupts the CPU. The slave, or secondary PIC chip, signals the primary PIC through IRQ 2 and the primary PIC interrupts the CPU. IRQ 0 to 7 are managed by the primary PIC and 8 to 15 are controlled by the secondary PIC.

    NOTE: For systems with 24 IRQs, the secondary PIC handles those or even a third chip.

    Looking at the IRQ list, the usual priority starts with 0 and goes down to 15. This means that the System Timer has priority over all other IRQs. The system clock must be able to “pulse” to regulate the processor and motherboard. If a keyboard key is pressed, it can interrupt the system from accessing the hard disk on the Primary or Secondary IDE Controller. Some systems can rotate between the IRQ priorities allowing each device an opportunity to have full access to the CPU.

    You should note that the use of Plug and Play removed problems usually occurring with IRQ conflicts. When a device was installed in an expansion slot, the card sometimes had switches or software settings to set the device IRQ. With Plug and Play, the devices were auto-configured by the Operating System (OS). Conflicts were reduced, but sometimes still occurred. Present Plug and Play ability has reduced conflicts drastically making adding expansion cards a simpler process.


    IRQ issues have been reduced to the use of auto-configuring devices such as the following:

    1. FireWire (IEEE 1394)
    2. Thunderbolt
    3. PCI, Mini PCI, PCI Express, Mini PCI Express
    4. USB
    5. PC Card, PCMCIA

    Attached Files:

    • slide.jpg
      slide.jpg
      File size:
      26.9 KB
      Views:
      116,867
    DevynCJohnson likes this.

Share This Page