Skip to content
Official PYQ · 2005

GATE CS 2005 Q69 — I/O Interface: Interrupt and DMA Mode

Explain with AI

A device with data transfer rate 1010 KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be 4μ4\musec. 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?

Choose one option
View worked solution

Answer: B

To find the performance gain of operating the device under interrupt-driven mode over program-controlled mode, we compare the CPU time consumed per byte transfer in both modes.

1. Time Interval per Byte

The data transfer rate of the device is 10 KB/sec10\text{ KB/sec}. Assuming standard decimal notation for data rates (1 KB=103 bytes1\text{ KB} = 10^3\text{ bytes}):

Data transfer rate=10×103 bytes/sec=10,000 bytes/sec\text{Data transfer rate} = 10 \times 10^3\text{ bytes/sec} = 10,000\text{ bytes/sec}

The time interval between two consecutive byte transfers is:

Time per byte=110,000 sec=100 μsec\text{Time per byte} = \frac{1}{10,000}\text{ sec} = 100\,\mu\text{sec}

2. CPU Time Spent in Each Mode

  • Program-Controlled Mode (Polling): The CPU continuously polls the device to check if a byte is ready. Consequently, the CPU is fully occupied for the entire duration of 100 μsec100\,\mu\text{sec} per byte.
  • Interrupt-Driven Mode: The device interrupts the CPU only when a byte is ready. The CPU is busy only during the interrupt overhead, which is 4 μsec4\,\mu\text{sec} per byte (as the actual transfer time is negligible).

3. Performance Gain

The performance gain is the ratio of the CPU time consumed in program-controlled mode to that in interrupt-driven mode:

Performance Gain=CPU time in program-controlled modeCPU time in interrupt-driven mode=100 μsec4 μsec=25\text{Performance Gain} = \frac{\text{CPU time in program-controlled mode}}{\text{CPU time in interrupt-driven mode}} = \frac{100\,\mu\text{sec}}{4\,\mu\text{sec}} = 25

Hence, the minimum performance gain is 25.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore I/O Interface: Interrupt and DMA Mode questions