4.1k views

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 | 4.1k views
0
Q2 :- if byte transfer time between interface register and cpu or memory is added ( let 16 micro sec) what will be performance gain of interrupt io over programmed io.

Confusion :- 1 I think this transfer time will be added to interrupt i/o only. And now performancegain will be 100/20= 5.

Is it right???     Or

Confusion :- 2  If this transfer time is known as preparation time then what will be changed??
0
What is the  reason processor have to wait in program control io is 1 sec? It is nowhere mentioned in the question.

Is it beacsue data transfer rate is 10 KB/SEC which means the processor will wait for 1 sec while data transfer is taking place?

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.

overhead in programmed I/O $=1\text{ sec}$

In Interrupt mode , data is transferred word by word (here word size is $1$ byte as mentioned in question
"Data is transferred byte-wise").
So to transfer $1$ byte of data overhead is $4 \times 10^{-6}$ sec
Thus to transfer $10\ KB$ of data overhead is= $4 \times 10^{-6} \times 10^{4}$  sec

Performance gain  $=\dfrac{1}{4 \times 10^{-6} \times 10^4} =\dfrac{1}{4 \times 10^{-2}} = 25$

Thus, (b) is correct answer.
answered by (327 points)
edited
+2
there is a doubt, In interrupt driven IO, CPU doesnt have to wait for the entire IO to complete??
0
Can one exceed the data transfer rate of a device using interrupt mode IO over programmed IO?

Isn't data transfer rate the maximum under all circumstances?
0
Why are you taking time for 10 KB transfer ,when question says that data is transferred byte wise.

Although answer remains same.

As you mentioned that in interrupt driven data is transferred word by word.Can you give some reference to that?I think it depends on the buffer capacity.It may not be one word always.
0

As you mentioned that in interrupt driven data is transferred word by word.Can you give some reference to that?

@rahul sharma 5 ji,

It is mentioned in the question.So it is assumed.

I think it depends on the buffer capacity.

Yes. Correct.

0

@sushmita ji,

there is a doubt, In interrupt driven IO, CPU doesn't have to wait for the entire IO to complete??

Not in general. Otherwise what is the purpose of interrupt.

But yes CPU can wait in some special cases if there is some data dependency or I/O operation is Synchronous Refer --> https://gateoverflow.in/487/gate2008-64-isro2009-13

Now even if it waits nothing much is specified so i think it could be assumed it is included in interrupt overhead time.

0

Can one exceed the data transfer rate of a device using interrupt mode IO over programmed IO?

@Kai ji,

I did not get you could please explain little bit more what exactly you want to ask ?

0

@Chhotu can u give some reference to study this concept of programmed and interrupt driven i o

ans is 25
answered by (119 points)
edited
0

Can you please explain what do you mean by
in programed mode
100/(100+4)=100/104 ?

1
2