in CO and Architecture edited by
5,588 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 ?
in CO and Architecture edited by
5.6k views

2 Comments

It is a stalling book question. Please correct it "interrupt processing takes about 100 ms" it should be 100us
3
3
thnx bro now it is 100 us.
nd plzz check my comment on given ans and also explain for correct approach if possible.
0
0

1 Answer

8 votes
8 votes
Best answer
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

4 Comments

1KBPS generally means 10^3 Bytes per sec

this is the way bandwidth us calculated why  1024 per sec is used here
0
0
and NO it's Not Block time of CPU . CPU is the one who does interrupt processing. it's the time CPU actually works for imterrupt driven i/o
0
0

@Sneha negi He is talking about 80% of time CPU is doing this work, other 20% CPU can execute the processes

0
0
Answer: