Input and Output (I/O) Interfaces
Input and Output (I/O) Interfaces: Polling, Interrupts, and Direct Memory Access (DMA)1. IntroductionIn our ongoing series, we have covered how binary numbers represent data, how logic gates build adders, how memory is arranged hierarchically, and how operating systems schedule processes. But computers do not operate in a vacuum. To be useful in a school lab, a computer must interact with the outside world: keyboards typing text, mice clicking buttons, network adapters receiving exam files, and SSDs reading large software packages.This brings up a fundamental hardware engineering challenge: The Central Processing Unit (CPU) operates at blazing speeds of billions of cycles per second (Gigahertz), while most external devices (I/O devices) are mechanical, electrical, or human-operated and operate thousands to millions of times slower.If a high-speed CPU had to sit idle waiting for a student to press the next key on a keyboard, it would waste millions of productive clock cycles doing nothi...