Consider a system employing an interrupt driven I/O for a articular de...
The device generates
bytes/sec
i.e. 1 second 8192 bytes
Given that each interrupt consumes 100 us.
∴ Fraction of proce ssor time consumed in
(for every byte)=0.82
View all questions of this test
Consider a system employing an interrupt driven I/O for a articular de...
Solution:
Given parameters:
- Data transfer rate = 8 KB/s
- Interrupt processing time = 100 microseconds
To determine the fraction of processor time consumed by this I/O device when it is interrupted for every byte, we need to calculate the following:
- Number of interrupts per second
- Time consumed by interrupt processing per second
- Total time available for processing per second
- Fraction of processor time consumed by interrupts
1. Number of interrupts per second:
- Data transfer rate = 8 KB/s = 8000 bytes/s
- Therefore, the number of interrupts per second = 8000 interrupts/s
2. Time consumed by interrupt processing per second:
- Interrupt processing time = 100 microseconds = 0.0001 seconds
- Therefore, time consumed by interrupt processing per second = 8000 interrupts/s * 0.0001 seconds/interrupt = 0.8 seconds/s
3. Total time available for processing per second:
- The total time available for processing per second is the inverse of the time taken by one interrupt, which is the data transfer time per byte plus the interrupt processing time per byte.
- Data transfer time per byte = 1 byte / 8 KB/s = 0.000125 seconds/byte
- Total time taken by one interrupt = Data transfer time per byte + Interrupt processing time per byte = 0.000125 seconds/byte + 0.0001 seconds/byte = 0.000225 seconds/byte
- Therefore, the total time available for processing per second = 1 / 0.000225 seconds/byte = 4444.4 bytes/s
4. Fraction of processor time consumed by interrupts:
- Fraction of processor time consumed by interrupts = Time consumed by interrupt processing per second / Total time available for processing per second = 0.8 seconds/s / 4444.4 bytes/s = 0.00018 seconds/byte
- To convert to a fraction, we divide this value by the time taken by one interrupt: 0.00018 seconds/byte / 0.000225 seconds/byte = 0.8
- Therefore, the fraction of processor time consumed by this I/O device when it is interrupted for every byte is 0.82.
Final answer: 0.82