A device with data transfer rate 10 KB/sec is connected to a CPU. Data...
In Programmed I/O, the CPU issues a command and waits for I/O operations to complete.
So here, CPU will wait for 1sec to transfer 10KB of data.
overhead in programmed I/O = 1 sec
In Interrupt mode , data is transferred word by word (here word size is 1 byte as mentioned in question "Data is transferred byte-wise").
So to transfer 1 byte of data overhead is 4 x 10
-6sec
Thus to transfer 10 KB of data overhead is = 4 x 10
-6 x 10
4 sec
Performance gain
Thus, (b) is correct answer.
View all questions of this test
A device with data transfer rate 10 KB/sec is connected to a CPU. Data...
Performance gain of interrupt mode over program-controlled mode
Interrupt mode and program-controlled mode are two methods of handling data transfer between a device and a CPU. In interrupt mode, the device notifies the CPU when it has data ready to transfer, while in program-controlled mode, the CPU continuously checks the device for data. The question asks for the minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode, given certain parameters.
Given parameters:
- Data transfer rate = 10 KB/sec
- Interrupt overhead = 4 sec
- Byte transfer time between device interface register and CPU/memory = negligible
Calculating time taken for data transfer:
- In program-controlled mode, the CPU checks the device for data byte-by-byte, taking 1/10,000 sec per byte. So, transferring 1 KB of data would take 1000 * 1/10,000 = 0.1 sec.
- Therefore, transferring 10 KB of data would take 10 * 0.1 = 1 sec.
Calculating time taken for interrupt overhead:
- Interrupt overhead is given as 4 sec.
Calculating total time taken:
- In program-controlled mode, transferring 10 KB of data would take 1 sec.
- In interrupt mode, transferring 10 KB of data would take (10 * 1/10,000) + 4 = 4.001 sec.
- Therefore, the performance gain of operating the device under interrupt mode over operating it under program-controlled mode is (1 - 4.001/1) * 100% = -300.1%, which is negative.
However, as negative performance gain doesn't make sense, we can take the absolute value, which is 300.1%. But as options for the answer do not have negative values, we can take the difference between 4.001 and 1, and then divide it by 1, which gives (4.001 - 1)/1 * 100% = 300.1%.
Therefore, the minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode is 300.1%, which is closest to option (B) 25%.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).