(^282) PC Hardware: A Beginner’s Guide
T
he microprocessor, aka the processor or the CPU, controls either completely or in part
theactivitiesofallofthedevicesthatareintegratedintoorattachedtothemotherboard
of the PC. This control comes about from the CPU’s ability to communicate its com-
mands, requests, and data directly to each device over private communications vehicles that
are created specifically for each device. In addition to the CPU needing to communicate with
the PC’s devices, the devices also need to be able to get the CPU’s attention from time to time
to request an action or service from the CPU, such as getting data from the keyboard, reading
data from a disk drive, or printing information on the printer.
For the sake of explanation, let’s say a PC has ten internal devices to which it must com-
municate commands, addresses, and data. (PCs typically have more than ten devices to
control, but ten should be sufficient in this example to help you understand how the CPU
communicates with the devices of the PC.) One way to ensure that the CPU is able to com-
municate to each device directly is to link it to each device with a dedicated bus line. How-
ever, this approach has two problems: it adds complexity to the motherboard’s circuitry,
and it limits the PC to only the number of devices for which dedicated buses are provided.
The first problem adds too much cost and the second issue is much too limiting.
Getting the CPU’s Attention
When a device needs the CPU to perform an operation for it, it must first get the CPU’s at-
tention. In our example of a PC with ten internal devices, the CPU may be busy taking
care of another device’s request when another device needs it. Think of an elementary
school teacher with ten students all wanting his or her attention. As fast as everything in-
side the PC is happening, when the device needs the CPU, it needs it now. In much the
same way that elementary students raise their hands to get noticed, each device must
have a means of getting the CPU’s attention.
If each device had control of a toggle switch that it could fli pto turn a light on when-
ever it needed services from the CPU, the CPU could constantly scan for it, even if it was
busy. When a particular device’s light went on and the CPU got to a point where it could
set aside whatever it was doing, it would take care of the new request. Each time a new
light was switched on, the CPU would interrupt what it was doing to take care of the re-
quest. Remember that the CPU does a lot more than just handle device requests.
Communicating to Devices
As soon as the CPU completes the tasks it was requested to do, it communicates back to the
requesting device that the task is completed. To do this, it must have a means—just switch-
ing off the request light would not be enough in most cases. For example, if a device asks
the CPU to get some data from memory, it needs to know where the CPU put the data. It
would be very difficult to convey the address of a data location through a toggle switch. So,
each of the devices connected to the PC is assigned its own two-way mailbox.
These mailboxes work almost like a private mail system inside the PC. Devices get
messages and data from their own mailboxes and they pass messages and data to other