edited by
29,287 views
73 73 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$

7 Answers

Best answer
121 121 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
7 7 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
3 3 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.
2 2 votes

$Programmed\quad IO:$

1) CPU polls continuously while the device prepares data in the buffer.

2) CPU transfers the data to main memory.

 

$Interrupt\quad driven\quad IO:$

1) Device generates an interrupt when data is ready.

2) CPU handles the interrupt (interrupt overhead).

3) CPU transfers the data to main memory.


$Given:$

Device transfer rate = 10 KB/sec = 10 * 1000 = 10,000 Bytes/sec

Time per byte = $10^{-4}$ sec = $100 × 10^{-6} $ sec = 100 microseconds


$Programmed\quad IO:$

Since CPU polls continuously and the CPU to main memory transfer time is negligible (given)

CPU time per byte = device time per byte

CPU time per byte = 100 microseconds

 

$Interrupt\quad driven\quad IO:$

Interrupt overhead per byte = $4 * 10^{-6}$ seconds

CPU to main memory transfer time is negligible

 

Performance gain = Old/New


CPU time in Programmed IO = $100 * 10^{-6}$ seconds

CPU time in Interrupt driven IO = $4 * 10^{-6}$ seconds


Performance gain = $(100 * 10^{-6}) / (4 * 10^{-6})$ = 25

1 1 vote
ans is 25
edited by
1 1 vote
Programmed i/o time=status register rad time+ data transfer time

Given data trasfer time is negligible =0

status register time(defaultly taken of one byte)

10kb---1sec

1b=1/10ksec

1b=0.1milisecond

Programmed i/o time=0.1milisecond+0=0.1milisecond=100microsecond

 

interrupt driven time=data transfer time+interrupt overhead=0+4microecond=4 microsecond

performance gain=100microsecond/4microsecond=25
Answer:
Position:
Show:

Related questions

196 196 votes
8 answers 8 answers
76.5k
76.5k views
Kathleen asked Sep 22, 2014
76,468 views
A $5$ stage pipelined CPU has the following sequence of stages:IF – instruction fetch from instruction memoryRD – Instruction decode and register readEX – Execute: ALU op...
32 32 votes
3 answers 3 answers
15.2k
15.2k views
gatecse asked Sep 21, 2014
15,211 views
Let $f(x)$ be the continuous probability density function of a random variable $x$, the probability that $a < x \leq b$, is :$f(b-a)$$f(b) - f(a)$$\int\limits_a^b f(x) dx...
78 78 votes
15 answers 15 answers
38.5k
38.5k views
go_editor asked Apr 24, 2016
38,547 views
Consider the following data path of a $\text{CPU}.$The $\text{ALU},$ the bus and all the registers in the data path are of identical size. All operations including increm...
67 67 votes
7 answers 7 answers
38.8k
38.8k views
Kathleen asked Sep 22, 2014
38,780 views
Consider the following data path of a $\text{CPU}.$The $\text{ALU},$ the bus and all the registers in the data path are of identical size. All operations including increm...