Redirected
edited by
2,338 views
3 votes
3 votes
Consider a system employing interrupt driven I/O for a particular device that transfer data at an average of 8 KB/sec on a continuous basis. Consider interrupt processing takes about 100 μsec i.e. time to jump to ISR, execute it and return to main program. The fraction of processor time consumed by this I/O device if interrupts occur for every byte is ________. [Assume 1 K = 1024] (Upto 2 decimal places)

Ans. 0.81
edited by

5 Answers

3 votes
3 votes

Here they say data is transferred  at an average of 8 KB/sec on a continuous basis, so that means in each second 8KB of data is sent

i.e 1 Byte of data is sent in each period of 122 μsec  and within this, 100 μsecs are used for interrupt processing (which is the CPU time required)

therefore,

fraction of processor time consumed by this I/O device if interrupts occur for every byte is

=  (interrupt service time) / (total time)

= $\frac{100}{122}$

= 0.819

2 votes
2 votes

Device interrupts for every byte and it can send 16KB/sec at a time, so time taken to send 1 byte=  1/(16*103)= 0.0625msec

Now, it is given that interrupt processing takes time= 50 micro sec

So, fraction of time consumed by I/O device if it interrupts for every byte= time taken to process interrupt / time taken by device to send data= 50 * 10-6 / (0.0625 * 10-3) = 0.8

P.S as per hint in question (upto 3 decimal places).. so they are considering 1KB= 210 bytes. Hence, answer might vary accordingly i.e 16*210 * 50*10-6 = 0.819 

1 votes
1 votes
Data Transfer Rate=8Kbps

so in 1 sec 8kb data is transferred. Interrupt service time=100micro sec

in question,interrupt occurs for every bytes of data so total interrupt service time for 8kb data is=8*2^10*100*10^(-6)=>0.8192 sec

so fraction of time consumed by cpu is (0.82)/1=>0.82
0 votes
0 votes
Here K means 1024 not 1000

so, $\frac{1}{8K}s$ = 122 μs

So, 1B is ready every 122 μs and 100 μs is used by cpu to proess the interrupt.

cpu recieves interrupt every 122 μs continously, as soon as it recieves it starts processing.

so cpu utilised = 100/122 = 81.96 %

Related questions

2 votes
2 votes
1 answer
1
kimaya asked Jul 8, 2017
770 views
The solution says that the answer should be 80, but applying the formula (x/y)*100, where x is 250 and y is 200 fraction comes out to be greater than 1. Am i making a mis...