6.2k 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 | 6.2k 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??
+1
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$

by (327 points)
edited
+3
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.

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

0

hI @Chhotu

I have one basic doubt , i interrupt i/o , it will also take 1 sec to transfer 10KB apart from 4*10$^{-2}$ sec.

But processor will not devote 1 sec , processor will keep on doing other work.

Right?

0

@Chhotu

I don't think CPU is waiting in case of any synchronous I/O. It's the process that is waiting for the I/O operation to be completed. CPU is executing some other process in the meantime.

+1
Can you tell me if this approach is correct?

For Interrupt mode overhead = 4 micro sec

For programmed I/O mode : For 10*1024 B time needed = 1sec

For 1 B (since, minimum asked) time needed = 10^6/(10*1024) micro sec = 97.65 micro sec

Performance gain = 97.65/4 = (nearly 25)
0
Same question
A device with data transfer rate of 20 KBps is connected to a CPU byte wise. Assume byte transfer time between the device and CPU is negligible and interrupt overhead is 20 μsec. The performance gain under interrupt mode over program controlled mode is ________. (Upto 1 decimal place)

Can any explain what the meaning of this line
"What is the minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode?"
It bit confusing
Is it mean  interrupt mode/program controlled mode
ans is 25
by (119 points)
edited
0

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