GATE Computer ScienceVery hardGATE CS (PYQ pattern)

A device streams 2 MB/s (1 MB = 10⁶ B) into memory on a 1.5 GHz CPU. With interrupt-driven I/O every 4-byte word costs 600 CPU cycles. With DMA, each block costs 1500 cycles of set-up plus a 1000-cycle completion interrupt, and the DMA's CPU load must not exceed 0.05%. Block sizes are powers of two bytes (1 KB = 1024 B). What is the smallest allowed block size, and about how many times lower is the CPU load then than with word-by-word interrupts?

  1. A. 8 KB; about 492 times
  2. B. 4 KB; about 246 times
  3. C. 16 KB; about 983 times
  4. D. 8 KB; about 123 times

Correct answer: A. 8 KB; about 492 times

DMA load = (2×10⁶ / B) × 2500 / 1.5×10⁹ ≤ 0.0005 → B ≥ 6667 bytes, so the smallest power of two is 8192 B. Then 244 blocks/s × 2500 = 6.1×10⁵ cycles/s, versus 5×10⁵ words/s × 600 = 3×10⁸ cycles/s for interrupts: ratio ≈ 492. Rounding down to 4 KB breaks the 0.05% limit; counting bytes as words gives 123.

More Computer Organization and Architecture questions

Exams that ask this topic