Problem Statement
Explain programmed I O, interrupt-driven I O and direct memory access (DMA).
Explanation
Programmed I O is the simplest I O method where the CPU repeatedly checks device status and then transfers data, causing the CPU to be busy with I O. Interrupt-driven I O improves efficiency: the device signals the CPU when it is ready and the CPU handles the transfer only then. Direct Memory Access (DMA) is the most efficient: the device controller or DMA hardware moves data between memory and device without busy CPU, freeing the CPU for other tasks. The trade-off is added complexity in hardware and handling synchronization of memory and bus access.
