A system transfers data blocks of 2,000 bytes using programmed I/O. Each byte…

2026

A system transfers data blocks of 2,000 bytes using programmed I/O. Each byte transfer takes 6 CPU cycles. With direct memory access (DMA), the entire block transfer takes 3,000 cycles, including 200 cycles of CPU setup overhead. The CPU clock frequency is 1 GHz. How many CPU cycles are spent when programmed I/O is used?

Answer: C. 12000ConceptIn programmed I/O, the CPU participates in each data-unit transfer. Therefore, the total CPU-cycle cost is the number of transferred units multiplied…

  1. A.

    2000

  2. B.

    6000

  3. C.

    12000

  4. D.

    20000

Attempted by 155 students.

Show answer & explanation

Correct answer: C

Concept

In programmed I/O, the CPU participates in each data-unit transfer. Therefore, the total CPU-cycle cost is the number of transferred units multiplied by the CPU cycles required per unit.

Application

  1. Number of bytes in the block = 2,000.

  2. CPU cost per byte = 6 cycles.

  3. Total programmed-I/O cycles = 2,000 bytes × 6 cycles/byte = 12,000 cycles.

Cross-check

The units reduce to cycles: bytes × cycles/byte = cycles. The DMA transfer time, DMA setup overhead, and 1 GHz clock frequency are not used because the question asks for a cycle count under programmed I/O.

Result: 12,000 CPU cycles.

Explore the full course: Isro

Loading lesson…