Information Technology Reference
In-Depth Information
CPU
CPU
Memory Bus
Main
Memory
I/O
Controller
I/O Bus
Disk
Controller
Keyboard
Controller
Audio
Controller
Figure11.8: I/O devices are attached to the I/O bus, which is attached to
the memory bus.
11.3.3
Device access
How should an operating system's device drivers communicate with and control
a storage device? At first blush, a storage device seems very different from the
memory and CPU resources we have discussed so far. For example, a disk drive
includes several motors, a sensor for reading data, and an electromagnet for
writing data.
Memory mapped I/O. As Figure 11.8 illustrates, I/O devices are typically
connected to an I/O bus that is connected to the system's memory bus. Each
I/O device has controller with a set of registers that can be written and read to
transmit commands and data to and from the device. For example, a a simple
keyboard controller might have one register that can be read to learn the most
recent key pressed and another register than can be written to turn the caps-lock
light on or off.
To allow I/O control registers to be read and written, systems implement
memory mapped I/O. Memory mapped I/O maps each device's control registers
Definition: Memory
mapped I/O
to a range of physical addresses on the memory bus. Reads and writes by the
CPU to this physical address range do not go to main memory. Instead, they
 
Search WWH ::




Custom Search