|
In this article, when you see the term system resource, I would like you to think of a
setting assigned to a device that allows the device to work with the computer. A
device is anything that you can install on the computer—for example, a network
card, a modem, or a sound card.
The three major system resources that can be assigned to different devices are I/O
addresses, IRQ addresses, and DMA addresses. A fourth system resource, called a
memory address, can sometimes be assigned to devices as well. In the following sections,
we will discuss each of these system resources.
I/O addresses
It is extremely important to remember that the CPU is the traffic cop of the entire
system. If something is going to happen on the system, then generally the CPU (processor)
will enable the action. All devices in the computer need to communicate
with the processor from time to time, and the processor needs a method of separating
and prioritizing all these communications.
Because the processor needs to send information to a number of different devices
and because those devices need to know which messages coming from the CPU are
for them, each device is assigned an I/O address, or input/output address. The I/O
address is a special port address that represents a pathway between the CPU and
the device. So, for example, if the processor needs to send information to LPT1, it
can send the information to pathway 378-37F, which is the pathway address that is
leading to LPT1. I like to think of these pathways as tunnels; each device has its
own tunnel that extends from the device to the processor.
If the processor needs to send
information to the sound card, it knows that if it sends the information down I/O
port address 220, then the sound card will receive the information. Conversely,
when the processor receives information from I/O port address 220, it knows that
the information comes from the sound card, because that address is assigned to
only one device.
There are 65, 536 I/O port addresses available on the system. (There are actually
fewer addresses than that, because when you assign an IO address to a device, you
are really assigning a range of addresses.) The trick is to make sure that you have
not assigned the same I/O port address to two different devices. If you do, you will
get a resource conflict. A resource conflict is when two devices are using the same
resource, such as an I/O address, IRQ, or DMA channel.
To prevent resource conflicts, each device should have a unique I/O address, but
the problem is, how do you know which I/O addresses existing devices already use?
One way is to use the Windows 95/98 Device Manager to view I/O addresses being
used on the system. The following Step By Step shows you how to view I/O
addresses in use by your system.
STEP BY STEP: Viewing I/O Addresses in Use
1. Select Start - Settings - Control Panel.
2. Double-click the system icon.
3. Choose the Device Manager page tab.
4. Click Computer at the top of the device list and then click the Properties
button to display the Computer Properties dialog box.
5. Select the Input/output (I/O) radio button on the View Resources tab of the Computer Properties dialog box. From there, you can
scroll down to see all the address ranges that are in use by your computer
and what device is using it.
Standard I/O Address Assignments
COM1 03F8 to 03FF
COM2 02F8 to 02FF
COM3 03E8 to 03EE
COM4 02E8 to 02EE
LPT1 0378 to 037F
LPT2 0278 to 027F
Math coprocessor 00F8 to 00FF
Primary hard disk controller 01F0 to 01F7
Secondary hard disk controller 0170 to 0177
Sound cards 0220 to 022F
Floppy Disk 03F0 to 03F7
Interrupt request
Each device has its own tunnel for sending and receiving information to the processor,
which is the function of the I/O port. But how does each device get permission to send information to the processor,
which as you know, is busy doing something important nearly all the time?
Too much overhead would be created if the processor had to continuously poll
each device to see if it had something that it needed the processor to do; instead,
each device is responsible for notifying the processor if it has information for it.
Devices need a way to interrupt the processor from its current processing to ask it
if it will service their requests. The method that is used to interrupt the processor
is called an Interrupt request, or IRQ line.
If you were standing beside someone who was involved in a conversation and you
really wanted to talk to that person, what would you do? You might, for example,
tap the person on the shoulder. Tapping the person on the shoulder is similar to
what the IRQ line is used for; the IRQ line sends a signal from the device to the processor
that grabs the processor’s attention.
Many people compare an IRQ to a bell sitting at the front desk of a restaurant or
storefront. If you want service and no one is paying attention to you, you ring the
bell for service—IRQs work the same way.
When a device taps the processor on the shoulder, the processor needs to know
what device needs attention. That is why each device is assigned a unique IRQ line
number. When a device sends a signal down the IRQ line to interrupt the processor,
the processor checks which line the signal originated from and then attends to that
device.
It is important to note that when information is sent to the processor, it is sent
through the I/O address (the tunnel). So the IRQ is just to grab the processor’s
attention while the I/O address is used for the actual delivery of information.
Originally, there were only 8 IRQs available on XT (before 286) systems, but there
are 16 IRQs available on AT (after 286) systems. In order to get 16 IRQs, another IRQ
controller was added to the system, but having two sets of IRQs managed by two
different controllers presented some technical problems. To help the two IRQ controllers
act as one unit, the IRQs have cascaded (or linked) together, and the second
controller goes through the first controller to send requests.
STEP BY STEP: Viewing IRQs in Use
1. Select Start - Settings - Control Panel.
2. Double-click the system icon.
3. Choose the Device Manager page tab.
4. Click Computer at the top of the device list and then click the Properties button
to display the Computer Properties dialog box.
5. Select the Interrupt request (IRQ) radio button on the View Resources tab of the Computer Properties dialog box. From there, you
can scroll down to see all the IRQ settings that are in use by your computer
and what device is using each.
Standard IRQ Assignments
0 System Timer
1 Keyboard
2 Link to second IRQ controller
3 COM2, COM4
4 COM1, COM3
5 LPT2
6 Floppy disk drive
7 LPT1
8 Real time clock
9 Available, but should not be used if IRQ 2 is being used
10 Available
11 Available
12 Available if not used by PS/2 mouse
13 Math Coprocessor
14 Hard disk controller
15 Available
Here are a few important points about IRQ assignments:
IRQs 10, 11, 12, and 15 are generally available. If you are installing a new
device into a computer and need to assign an IRQ, you would first try an available
IRQ value.
IRQ 3 and IRQ 5 are used by COM2 and LPT2, respectively. If you are not
actually using COM2 or LPT2, you can consider IRQ 3 and IRQ 5 as available.
When a device has information for the CPU, it first sends a signal down the
IRQ line to grab the CPU’s attention.
After the device has the CPU’s attention, it sends the information to the processor
via its I/O address.
Direct memory access
There are a number of different devices today that require constant access to system
memory. Normally, devices must go through the CPU to write information to
system memory, but using such a scheme can cause a lot of unnecessary overhead,
so why not allow a device to access memory directly?
To increase performance and to offload some of the work from the CPU, you can
assign some devices a DMA (Direct Memory Access) channel. The DMA channel is a
special pathway that allows the device to read and write information directly to
system memory without passing the data to the processor.
There are only 8 DMA channels available on your system, which should not be a
huge problem because not all devices use DMA channels. Some examples of the different
devices that you may run into that use DMA channels are sound cards, network
cards, and, occasionally, CD-ROM drives.
Common DMA Channel Assignments
0 Available
1 Sound or Available
2 Floppy Drive
3 Available
4 Cascade
5 Sound or Available
6 Available
7 Available
Like IRQs, there are two DMA controllers that are linked by a cascading DMA channel,
DMA channel 4. DMA channels 0-3 are for 8-bit boards and cards; DMA channels
5-7 are used for 16/32-bit cards.
To view the DMA channels that are in use on your system, you can use the Windows
Device Manager utility. The following Step By Step will walk you through viewing
your DMA channels in use.
STEP BY STEP: Viewing DMA Channels in Use
1. Select Start - Settings - Control Panel.
2. Double-click the system icon.
3. Choose the Device Manager page tab.
4. Click Computer at the top of the device list and then click the Properties button to display the Computer Properties dialog box.
5. Select the Direct memory access (DMA) radio button on the View Resources
tab of the Computer Properties dialog box.
Memory addresses
A less common resource that may be assigned to devices is a memory address. A
memory address is an area of upper memory where the device is allowed to store
information.
If multiple devices have been assigned access to the same memory address, a
device conflict will occur and one or both devices may not function. To view the
memory addresses that are in use by the system, follow these steps:
STEP BY STEP: Viewing Memory Addresses in Use
1. Select Start - Settings - Control Panel.
2. Double-click the system icon.
3. Choose the Device Manager page tab.
4. Click Computer at the top of the device list and then click the Properties button
to display the Computer Properties dialog box.
5. Select the Memory radio button on the View Resources tab of the Computer Properties dialog box.
|