I/O System

Keyboards, disks, network cards and displays differ in speed, in timing and in the shape of the data they exchange, and no processor can afford a bespoke driver for every one of them. The I/O system exists to put a single uniform interface between the CPU and that variety, so that a small number of generic mechanisms can serve all of them.

The chapter begins with the devices themselves and how they are classified, then introduces the I/O interface — the circuitry that sits between a device and the bus, with its data, status and control registers — and explains what each of those registers is for. The central section compares the ways a CPU can move data: programmed polling, interrupt-driven transfer, and direct memory access, each examined for how much processor time it consumes and how well it keeps the device busy. A transfer method that leaves the CPU spinning in a wait loop is fine for a keyboard and hopeless for a disk, and the chapter exists largely to make that difference measurable. It closes with the metrics used to evaluate an I/O system, so that a claim about performance can be checked rather than believed.

Chapters

Found an issue with this content?

Tell us what could be improved.