Apex › Hardware

Polling, interrupts & DMA — how the CPU talks to devices

A disk or network card has bytes for memory. The CPU can poll (spin on a status register and copy each byte — simple but 100% busy), take an interrupt per byte (free between bytes but a fixed overhead each — a fast stream drowns it), or hand off to a DMA controller (program it once, get one interrupt at the end — constant CPU cost no matter the size). Slide the transfer size and watch where the CPU's time goes.

More in Hardware