edited by
19,329 views
51 votes
51 votes

A device with data transfer rate $10$ KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be $4\mu$sec. The byte transfer time between the device interface register and CPU or memory is negligible. What is the minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode?

  1. $15$
  2. $25$
  3. $35$
  4. $45$
edited by

5 Answers

Best answer
101 votes
101 votes
In Programmed I/O, the CPU issues a command and waits for I/O operations to complete.

So here, CPU will wait for $1\text{ sec}$ to transfer $10\ KB$ of data.

The minimum performance gain for interrupt mode happens for the smallest unit of data transfer – which here is $1$ byte.

Time to transfer $1$ byte of data in programmed I/O mode $=\dfrac{1}{10\; KBps} = 100 \mu s$

In Interrupt mode, to transfer $1$ byte of data, overhead is $4 \times 10^{-6}s = 4\mu s$
Performance gain  $=\dfrac{100}{4}= 25$

Thus, (b) is correct answer.
edited by
6 votes
6 votes
In programmed I/O, CPU does continuous polling,

To transfer 1B CPU polls for 10^(-4) sec or 100 micro-sec of processing (since transfer speed is 10KBps)

In interrupt mode CPU is interrupted on completion of i\o,

To transfer 1B CPU does 4 micro-sec of processing(since transfer time between other components is negligible).

Gain = 100 / 4 = 25
2 votes
2 votes
Just calculate the time taken for 1 Byte transfer for both I/o and interrupt.

For I/O it is given 10kb/sec so 1 byte transfer will take 10^-4 sec or 0.1 milli sec for each byte.

For interrupt they have given 4 micro sec as overhead meaning 4 micro sec for 1 byte transfer.

Now they are asking about performance. They are asking performance of interrupt in comparison to I/O so just do simple division  

performance = 0.1 millisec / 4 micro sec

                     = 100/4 = 25

I don’t know why there is so much confusion over this here.Its pretty simple.
1 votes
1 votes
ans is 25
edited by
Answer:

Related questions

55 votes
55 votes
12 answers
1
47 votes
47 votes
6 answers
2