Interrupts, Device Drivers, DMA, and I/O Management
The I/O planet explores how the OS communicates with devices like keyboards, disks, network cards, and displays using interrupts and device drivers.
You'll understand:
Interrupt: Hardware signal that CPU must handle immediately
Device Driver: OS code that knows how to control a specific device
Interrupt Handler: Kernel code that runs when interrupt fires
DMA: Device transfers data directly to RAM without CPU
I/O Blocking: Process waits (WAITING state) for I/O to complete
Async I/O: Process continues while I/O happens in background
Think of I/O devices like delivery trucks:
Interrupt-Driven I/O:
DMA Transfer:
When a process does I/O:
This is why I/O is "expensive" - context switches, waiting, interrupts all add overhead.
Keyboard: Each keypress generates interrupt
Network card: Receives packet → interrupt → kernel processes
Disk: read() blocks process → disk interrupt → process ready
Display: GPU writes directly to video RAM (DMA-like)
USB: Devices hotplug → driver loads → device ready
We're building an interactive I/O visualization that will let you: