Hardware Resources Explained
By Stephen Bucaro
Hardware devices, such as modems, network circuits, sound circuits, and so on, require system resources
such as Interrupt Request (IRQ) lines, Input/Output Port (I/O) addresses, Direct Memory Access Channels
(DMA), and a range of Memory Addresses for storing code and data. Each device needs its own set of
resources. If two devices attempt to use the same resource, your system may lock up or crash.
IRQs
An IRQ is a connection between a hardware device and the CPU (Central Processor Unit). A hardware
device uses it's assigned IRQ line to signal or "interrupt" the CPU when it needs attention. Depending
upon the priority of the interrupt and what the CPU is currently doing, the CPU may stop executing the
program it's currently running and jump to a service routine for the hardware device. After the interrupt
has been serviced, the CPU will resume executing the original program.
Early computer motherboards had a chip that provided eight IRQ lines numbered 0 through 7. Later a
second IRQ chip was added to provide channels 8 through 15. IRQ channel 2 is used to cascade the two
IRQ chips together.
• In today's computers the IRQ circuits are integrated into the chip set. The development
of the Advanced Configuration and Power Interface (ACPI) allows for IRQ numbers above 15. These are actually
virtual interrupts mapped to a single real interrupt, usually IRQ 9 or 11.
Hardware devices are traditionally assigned IRQ lines as shown in the table below:
IRQ | Device |
0 | System Timer |
1 | Keyboard Controller |
2 | Second IRQ Controller |
3 | COM 2 |
4 | COM 1 |
5 | Sound Circuit |
6 | Floppy Drive |
7 | Parallel Port |
8 | Real-time Clock |
9 | Available |
10 | Available |
11 | Available
| 12 | Mouse Port |
13 | Math Coprocessor |
14 | Primary Hard Drive |
15 | Secondary Hard Drive |
Although these are the traditional IRQ assignments, most systems will have different assignments.
This is because IRQ assignments can be changed manually, and several devices listed in the table have
become obsolete, for example the Floppy Drive and the Parallel Port.
I/O Ports
An I/O port is a range of addresses used to move data to and from a hardware device. the table below
shows the traditionally assigned I/O addresses:
System Timer | 0040-005F |
Device | I/O Address |
Keyboard Controller | 0060-006F |
COM 2 | 02F8-02FF |
COM 1 | 03F8-03FF |
Sound Card | 0278-027F |
Floppy Drive | 03F0-03F7 |
Parallel Port | 0378-037F |
Real-time Clock | 0070-0070 |
Mouse Port | 0238-023F |
Math Coprocessor | 00F8-00FF |
Primary Hard Drive | 01F0-01F7 |
Secondary Hard Drive | 0170-0177 |
Although these are the traditional I/O address assignments, most systems will have different
assignments because a plug-and-play operating system will automatically allocate I/O address as
required. If you see two different devices that are assigned the same I/O port addresses, this may
not be a resource conflict. The devices may be using those I/O port addresses to communicate with each other.
|