Principles of I/O Hardware
Devices & Controllers
- block devices stores information in fixed-size blocks, each one with its own address.
- character devices delivers or accepts a stream of characters, without regard to any block structure.
- device controller/adapter takes the form of a chip on the parentboard or a printed circuit card that can be inserted into a (PCI) expansion slot.
Each control register is assigned a unique memory address to which no memory is assigned.
- if special I/O instructions are needed to read/write the device control registers, access to them requires nothing more than standard C code, otherwise needs the use of addembly code.
- with memory-mapped I/O, no special protection mechanism is needed to keep user processes from performing I/O.
- With memory-mapped I/O, every instruction that can reference memory can also reference control registers.
- most computers nowadays have some form of caching of memory words. Caching a device control register would be disastrous.
- If there is only one address space, then all memory modules and all I/O devices must examine all memory references to see which ones to respond to.