edited by
6,929 views
4 votes
4 votes
Consider a system employing interrupt-driven I/O for a particular device that transfers data at an average of 8 KB/s on a continuous basis. Assume that interrupt processing takes about 100 microsecond (i.e., the time to jump to the interrupt service routine (ISR), execute it, and return to the main program). Determine what fraction of processor time is consumed by this I/O device if it interrupts for every byte.

Is it same as percentage of time CPU is in blocked state ?
edited by

1 Answer

Best answer
8 votes
8 votes
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 $\frac{1000}{8192}\approx 0.122$ms. CPU is busy for 100 ms once in every 0.122 ms. So fraction of time busy is given by: $\frac{100}{0.122}=819.68$

NB: Do you really mean $100$ms or 100$\mu$s? If it is 100$\mu$s, then answer would be $\frac{100}{122}=0.81968$. Approximately, 82% of processor time.

CPU is blocked during this time. So the same percentage of time, CPU remains in blocked state.
selected by
Answer:

Related questions

1 votes
1 votes
1 answer
2
Ayush Upadhyaya asked Oct 30, 2018
1,175 views
I think percentage of processor time consumed should be $\frac{ \,ISR\,time}{ISR\,time+\,Data\,Transfer\,Time}=\frac{100}{100+122}$.Is it correct?
2 votes
2 votes
2 answers
3
Na462 asked Oct 21, 2018
1,682 views
1 votes
1 votes
1 answer
4
Na462 asked Sep 24, 2018
801 views