CS FundamentalsHardGATE CS

A device delivers data at 2 MB/s. Per-byte interrupts would cost 5 µs each; instead DMA moves 4 KB blocks and raises one interrupt per block costing 20 µs. What fraction of CPU time do the interrupts take in each case?

  1. A. Per-byte: impossible, it would need 10 CPU-seconds per second; DMA: about 1%
  2. B. Per-byte: about 10%; DMA: about 0.01%
  3. C. Per-byte: 100%; DMA: about 1%
  4. D. Per-byte: impossible; DMA: about 0.24%

Correct answer: A. Per-byte: impossible, it would need 10 CPU-seconds per second; DMA: about 1%

Per byte: 2 × 10⁶ × 5 µs = 10 s of work per second, so it cannot keep up. DMA: 2 × 10⁶ / 4096 ≈ 488 interrupts/s × 20 µs ≈ 9.8 ms per second ≈ 1%. 0.24% uses 5 µs per DMA interrupt.

More Operating Systems questions

Exams that ask this topic