A system transfer data blocks of 2000 bytes with programmed I/O, each byte…
2026
A system transfer data blocks of 2000 bytes with programmed I/O, each byte transfer takes 6 CPU cycles, with direct memory access (DMA), the block transfer takes 3000 Cycles total, with CPU setup overhead of 200 cycles. The CPU clock is 1 GHZ.
How many CPU cycles are spent using programmed I/O?
- A.
2000
- B.
6000
- C.
12000
- D.
20000
Attempted by 49 students.
Show answer & explanation
Correct answer: C
To determine the CPU cycles spent using programmed I/O, we must calculate the total time required for the entire data block transfer. The problem states that a system transfers data blocks of 2000 bytes using programmed I/O. In this mode, the CPU handles every byte transfer individually.\nGiven that each byte transfer takes 6 CPU cycles, we multiply the total number of bytes by the cycles per byte. The calculation is straightforward: 2000 bytes × 6 cycles/byte = 12,000 CPU cycles.\nThis result matches Option C. The information regarding Direct Memory Access (DMA) and the CPU clock speed of 1 GHz is extraneous for this specific question, as it asks only about the programmed I/O overhead. Distractor B (6000) might result from incorrectly halving the block size or misinterpreting the cycles, while Distractor D (20000) could stem from adding the DMA setup overhead incorrectly to the programmed I/O total. The key takeaway is that for programmed I/O, the CPU cycles equal the block size multiplied by the per-byte transfer cost.