A device with data transfer rate 10 KB/sec is connected to a CPU. Data is…

2005

A device with data transfer rate 10 KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be 4 microsec. The byte transfer time between the device interface register and CPU or memory is negligible. What is the minimum performance gain of operating the device under interrupt mode over operating it under program controlled mode?

  1. A.

    15

  2. B.

    25

  3. C.

    35

  4. D.

    45

Attempted by 141 students.

Show answer & explanation

Correct answer: B

Key idea: compare how long the CPU is occupied per byte in program-controlled (busy-wait) mode versus interrupt mode.

  • Step 1: Compute time between bytes.

    Time per byte = 1 / (10 KB/s) = 1 / 10000 s = 0.0001 s = 100 microseconds.

  • Step 2: Determine CPU occupancy in each mode.

    Program-controlled (busy-wait) mode: CPU is occupied for the full 100 microseconds per byte.

    Interrupt mode: CPU overhead per byte = 4 microseconds.

  • Step 3: Compute performance gain.

    Performance gain = (CPU busy time in program-controlled mode) / (CPU overhead in interrupt mode) = 100 μs / 4 μs = 25.

  • Conclusion: The minimum performance gain of operating the device under interrupt mode over program-controlled mode is 25×.

Note: If KB is taken as 1024 bytes, the time per byte is 1/10240 s ≈ 97.66 μs and the gain ≈ 97.66 / 4 ≈ 24.4, which rounds close to 25; the standard interpretation here gives 25 as the intended answer.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Gate Guidance By Sanchit Sir