Press "Enter" to skip to content

Plug and Play Resource Allocation

Plug and Play Resource Allocation

Your computer has many devices connected to it. Your key board is a device. Your mouse is a device. Your modem is a device. Even a port, like a USB port, is a device. You can add a device to your computer by installing it into an expansion connector on the the motherboard of the computer. In order to operate, resources need to be allocated to the device.
One of the most important resources a device needs is an Interrupt Request (IRQ) line. An IRQ signals the processor that the device needs attention. For example, each time you press a key on your keyboard, an IRQ is sent to let the processor know that the keyboard needs attention. A device also needs to be allocated a set of memory addresses where commands can be sent to it and it can send responses.
Many devices need to be allocated an area of memory to store data and/or a Direct Memory Access (DMA) channel. A DMA channel allows a device to create a data stream directly between it and the computers memory without passing through the processor.
One of the most important structures in a computer is the system bus located on the motherbord. The processor, chipset, memory, and expansion slot devices communicate over the bus. Early PCs used a bus called Industry Standard Architecture (ISA). When you installed an expansion card into the ISA bus, you had to set IRQs and other resources with jumpers and/or DIP switches on the card. ISA devices cannot share resources, each ISA device must have its own IRQ.
– You can have more than one ISA device configured for the same IRQ, as long as only one of the device drivers is loaded at any one time; otherwise, you’ll get an IRQ conflict.
Since a computer has only a limited amount of resources, the number of devices that a computer could support is limited. One of the most limited resources is IRQ lines. A PC has only 16 IRQs. Common devices such as the keyboard, mouse, floppy drive, and hard drive use a standard set of resources.
Standard IRQ aassignments
IRQ DEVICE
0 System Timer
1 Keyboard
2 IRQ Controller 2
3 COM2
4 COM1
5 LPT2
6 Floppy Drive
7 LPT1
8 Real-Time Clock
9 ACPI
10 unallocated
11 IRQ Holder
12 Mouse
13 Math Coprocessor
14 Primary IDE
15 Secondary IDE
In 1993, Microsoft and Intel developed Plug and Play (PnP) to solve this problem. One of the main structures supporting PnP is the Peripheral Component Interconnect (PCI) bus. Along with a PCI bus, the computers BIOS, operating system, and hardware devices must be PnP compliant. One of the key features of PnP is that when installing a PCI card, you do not need to use jumpers of DIP switches to set the IRQ or I/O address for the card, the PCI bus controller does this for you.
The Windows 2000/XP operating system component responsible for PnP is the Advanced Configuration and Power Interface (ACPI). ACPI allows devices to be controlled by the operating system to perform power management. ACPI may put a device in a power saving state such as Standby, Suspend or Off. ACPI also allows dynamic handling of events like the addition or removal of a USB device.
During the boot process, the BIOS builds a table to record which IRQs have been used by legacy ISA devices and then assigns the unused ones to the PCI bus controller. The PCI bus controller, which is part of the motherboard chip set, manages the PCI bus and the expansion slots.
Each PCI device communicates its resource requirements to ACPI. Based on the resource requests that each device makes, ACPI assigns resources such as IRQs, I/O addresses, and memory locations, and DMA channels. ACPI can reconfigure resource assignments when needed, for example, when a device is added to the system.
The PCI bus overcomes the limitation in available IRQ’s with a feature called “PCI steering”. PCI steering makes it possible for several devices to use the same IRQ. PCI steering allocates an IRQ called the “IRQ Holder” for PCI steering. The PCI controller steers that IRQ to its own interrupt systems on the PCI bus. These interrupts are called A, B, C, D, and so on to avoid confusion with the numbered system IRQs. One interrupt is assigned to each PCI expansion slot.
To see which IRQ has been assigned to the IRQ Holder for PCI steering, open the Control Panel “System” utility. In the “System Properties” dialog box, select the “Hardware” tab and click on the “Device Manager…” button. In Device Manager’s “View” menu select “Resources by type”, then open the “Interrupt request IRQ” branch.
pcirq.bmp
– Note that Windows 2000 uses IRQ 9 for PCI Steering, so never set a device to IRQ 9.
PnP resource allocation removes the need to use jumpers of DIP switches to set the IRQ and other resources for devices. But PnP involves a complex interaction between the computers BIOS, chipset, PCI bus, operating system, and PnP devices.
Copyright(C)2004 Bucaro TecHelp.
Permission is granted for the below article to forward, reprint, distribute, use for ezine, newsletter, website, offer as free bonus or part of a product for sale as long as no changes are made and the byline, copyright, and the resource box below is included.