Dashboard/Block 4: I/O & Advanced Topics/Week 10
Week 10I/O & Advanced Topics

I/O Systems

This week covers how the CPU communicates with I/O devices: programmed I/O, interrupt-driven I/O, and DMA (Direct Memory Access). We also study bus architectures including synchronous/asynchronous buses, arbitration, and protocols like PCI and USB.

Learning Objectives

Compare programmed I/O, interrupt-driven I/O, and DMA
Calculate DMA transfer time and CPU overhead
Understand bus arbitration and synchronous vs asynchronous protocols
Analyze bus bandwidth for PCI and USB specifications

Key Concepts

I/O Communication Methods

Three main methods for CPU-I/O communication:

  1. -Programmed I/O (Polling): CPU repeatedly checks device status register. Simple but wastes CPU cycles.
  2. -Interrupt-driven I/O: Device signals CPU when ready. CPU handles interrupt, transfers data. Good for infrequent transfers.
  3. -DMA: A DMA controller transfers data blocks between device and memory without CPU involvement. Best for large transfers.
  • -

    Polling: CPU is busy-waiting — simple but CPU can't do other work

  • -

    Interrupts: CPU is free between transfers but interrupt overhead per transfer

  • -

    DMA: CPU sets up transfer, DMA controller handles the rest. CPU overhead only at start/end

  • -

    DMA modes: cycle stealing (one word at a time), burst mode (entire block), transparent (only when bus idle)

Bus Architecture & Protocols

A bus is a shared communication link between components. Buses can be synchronous (governed by a clock) or asynchronous (using handshake protocol). Arbitration decides which device gets the bus when multiple devices compete.

  • -

    Synchronous bus: operations tied to clock edges — simple but limited by clock skew over distance

  • -

    Asynchronous bus: uses request/acknowledge handshake — more robust for long buses

  • -

    Bus arbitration: centralized (single arbiter), distributed (daisy chain), or priority-based

  • -

    PCI Express: serial, point-to-point lanes (1/2/4/8/16x), each lane ~1 GB/s (Gen 3)

  • -

    USB: serial bus, tiered star topology, USB 3.0 = 5 Gbps (SuperSpeed)