Curriculum

System Resources

In general, there are four main types of PC resources you might need to be aware of when installing a new component: interrupt request (IRQ) lines, memory addresses, direct memory access (DMA) channels, and I/O addresses.

Interrupt Request Lines

IRQs are appropriately named. Interrupts are used by peripherals to interrupt, or stop, the CPU and demand attention. When the CPU receives an interrupt alert, it stops whatever it is doing and handles the request. When simultaneous requests come in, special interrupt controller chips prioritize the competing requests, favoring lower interrupt numbers, making IRQ 0 the highest priority.

 

Each device is given its own interrupt to use when alerting the CPU. (There are exceptions; PCI devices can share with one another, for example, and USB devices all use a single interrupt.) AT-based PCs have 16 interrupts defined. Given the limited number of available interrupts, it is critical that you assign them wisely!  

Table 1.1 lists the standard use and other uses associated with each interrupt.

Most experienced field technicians have the standards (listed in the table) memorized. In studying for the exam, make sure you know all the default assignments, as well as the assignments for COM1–COM4 and LPT1–LPT2.

 

 

Memory Usage

The CPU is capable of differentiating between system memory, which is what you refer to when you say that your computer has 512MB or 1GB of RAM, and I/O memory, which is a resource allocated to an expansion card and other components external to the CPU. A single pin on the CPU, called the I/O_MEM line, allows the CPU to specify which group of memory it is referring to for read or write operations. In addition, the two blocks of memory can overlap in value, due to the fact that the CPU refers to one or the other per operation, never both, eliminating the possibility of confusion.

 

Memory Addresses

Many components use blocks of system memory as part of their normal functioning, often finding their data elbow to elbow with application data and code. For example, network interface cards often buffer incoming data in a block of memory until it can be processed. Doing so prevents the card from being overloaded if a burst of data is received from the network. When the device driver loads, it lets the CPU know which block of system memory should be set aside for the exclusive use of the component. This prevents other devices and software from overwriting the information stored there. Certain system components, such as the system board and the PCI bus, also need a memory address. Memory addresses are usually expressed in a hexadecimal range with eight digits, such as 00F0000–000FFFFF. When the CPU indicates MEM with the I/O_MEM line, it is referring to a memory address.

 

Direct Memory Access

Direct memory access (DMA) allows a device to bypass the CPU and place data directly into RAM. To accomplish this, the device must have a DMA channel devoted to its use. All DMA transfers use a special area of memory set aside to receive data from the expansion card (or CPU, if the transfer is going the other direction) known as a buffer. The basic architecture of the PC DMA buffers is limited in size and memory location.

No DMA channel can be used by more than one device. If you accidentally choose a DMA channel that another card is using, the usual symptom is that no DMA transfers occur and the device is unavailable.

 

Certain DMA channels are assigned to standard AT devices. DMA is no longer as popular as it once was, because of advances in hardware technology, but it is still used by floppy drives and some keyboards and sound cards. The floppy-disk controller typically uses DMA channel 2. A modern system is not likely to run short on DMA channels because so few devices use them anymore.

 

I/O Addresses

I/O (input/output) addresses, also known as port addresses, are a specific area of memory that a component uses to communicate with the system. When the CPU indicates I/O with the I/O_ MEM line, it is referring to an I/O address. Although I/O addresses sound quite a bit like memory addresses, the major difference is that memory addresses are used to store information that  will be used by the device itself. I/O addresses are used to store information that will be used by the system or to represent instructions for the device from the CPU. For instance, the I/O address range 01F0–01F7 for the primary IDE controller acts as a set of instructions allowing the CPU to control the activities of the IDE controller.

An I/O address is typically expressed using only the last four digits of the full address, such as 03E8, because the first four digits are always zeros. All I/O addresses fall within the first 640KB, starting at 0. Although the I/O addresses for a component are technically a range, such as 03E8–03EF for COM3, you more often refer to the base I/O address, just 03E8 in this case. The exam asks about a few I/O addresses; Table 1.2 lists a few of the hexadecimal addresses that you should know.

 

Determining Available Resources

The best way to determine the PC’s available resources is by using hardware-configuration discovery utilities. These software programs talk to the PC’s BIOS as well as the various pieces of hardware in the computer and display which IRQ, DMA, I/O addresses, and memory addresses are being used. Most operating systems include some way of determining this information, including Device Manager in Windows 2000/XP. Exercise 12.9 guides you through investigating your system resources.