Consider a system employing an interrupt driven I/O for a articular de...
Calculation of Fraction of Processor Time Consumed
To determine the fraction of processor time consumed by the I/O device, we need to consider the time taken for interrupt processing and the time taken for data transfer.
Interrupt Processing Time
The interrupt processing time is given as 100 microseconds per interrupt. Since the device transfers data at an average of 8 KB/s, we can calculate the number of interrupts per second as follows:
Number of interrupts per second = (Data transfer rate) / (Data transferred per interrupt)
Number of interrupts per second = (8 KB/s) / (1 byte/interrupt)
Number of interrupts per second = 8,000 interrupts/s
Therefore, the total time spent in interrupt processing per second is:
Total interrupt processing time per second = (Number of interrupts per second) * (Interrupt processing time)
Total interrupt processing time per second = (8,000 interrupts/s) * (100 microseconds/interrupt)
Total interrupt processing time per second = 0.8 seconds
Data Transfer Time
The data transfer rate is given as 8 KB/s. Since we are considering interrupts for every byte transferred, the average time per byte transferred can be calculated as:
Average time per byte transferred = (Data transfer rate) / (Number of interrupts per second)
Average time per byte transferred = (8 KB/s) / (8,000 interrupts/s)
Average time per byte transferred = 1 millisecond/byte
Fraction of Processor Time Consumed
To calculate the fraction of processor time consumed by the I/O device, we need to consider the total time spent in interrupt processing and the average time per byte transferred.
Total time per second = Total interrupt processing time per second + Data transfer time per second
Total time per second = 0.8 seconds + (Data transferred per second) * (Average time per byte transferred)
Total time per second = 0.8 seconds + (8 KB/s) * (1 millisecond/byte)
Now, we can calculate the fraction of processor time consumed as:
Fraction of processor time consumed = Total interrupt processing time per second / Total time per second
Fraction of processor time consumed = 0.8 seconds / (0.8 seconds + (8 KB/s) * (1 millisecond/byte))
Using this formula, we can substitute the given values to find the fraction of processor time consumed by the I/O device.
Consider a system employing an interrupt driven I/O for a articular de...
The I/O device generates 8 × 1024 = 8192 bytes per second (or equivalently, 8192 bytes per 1000 ms ). This means, one byte is generated every
1000/8192 ≈ 0.122 ms. CPU is busy for 100 ms once in every 0.122 ms. So, fraction of time busy is given by: 100/0.122 = 819.68
If it is 100μs, then answer would be
100/122 = 0.81968. Approximately, 82% of processor time.
CPU is blocked during this time. So, the same percentage of the time, CPU remains in the blocked state.
Hence, the correct answer is 0.82.