A device with data transfer rate KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be sec. 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?
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 . Assuming standard decimal notation for data rates ():
The time interval between two consecutive byte transfers is:
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 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 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:
Hence, the minimum performance gain is 25.
Free practice · Your answers on this page are not saved.
