retagged by
6,510 views
4 votes
4 votes
Consider a system employing interrupt driven input/output for a particular device that transfers data at an average of 16 KB/s on a continuous basis. Assume that interrupt processing takes 50 μsec (i.e., the jump to the interrupt service routine (ISR), execute it and return to main program). The fraction of processor time is consumed by this input/output device if it interrupt for every byte is _______ (Upto 3 decimal places).
retagged by

4 Answers

Best answer
9 votes
9 votes

The question asked here comes under  "Interrupt-driven I/O " .

 In this question  " on a continuous basis"  is mention ,  that means CPU does not have to wait for the device , when that device is going to prepare or transmit data .  So that 'waiting' component is NULL . That is why, we need to consider only the time CPU is busy due to the particular I/O device

if "on a continuous basis" is not given then, (x/x+y)*100  have to use because it comes under " programmed I/O " ,  in this situation the CPU waits for a long time for the I/O device to be ready for data transmission.

so in this second case we should consider x/x+y where y = time taken by io device to prepare data. and x=time taken by cpu in interrupt processing

hence need to add both x and y .

But in first case while CPU is not waiting we only consider x/y .

selected by
5 votes
5 votes

device generates 16*103 bytes per sec.so generates 1 byte in 106/(16*103)µs=62.5µs.

it is given that device is transferring data on continuous basis.so,as long as interrupt service routine is running in cpu,then also the device is busy for producing data.As interrupt overhead is 50µs,so another (62.5-50)=12.5µs is required to further interrupting the cpu.Because at this time 1 byte data is completely produced by the device.

so fraction of cpu time consumed by the device is=50/62.5=0.8

2 votes
2 votes

The device generates 16x103 bytes per second or a rate of 1B every 62.5 µs. If each interrupt consumes 50 µs, then the fraction of processor time consumed is 50/62.5=0.80

0 votes
0 votes
data transfer rate = 16Kbps means 16 X 10^3 bytes per second

for every byte there is an interrupt so number of interrupt in one second = 16 X 10^3

time taken by interrupt in one second is = 16 X 10^3 x 50 x 10^(-6) =>0.819
edited by
Answer:

Related questions

3 votes
3 votes
2 answers
2
1 votes
1 votes
1 answer
3
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?
1 votes
1 votes
1 answer
4
Na462 asked Sep 24, 2018
801 views