• retagged by
569 views
1 1 vote

A device with data transfer rate 20 KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be 10 microseconds.

  1. What is the total time required in programmed I/O for 10 bytes data transfer?

  2. What is the total time required in interrupt I/O for 10 bytes data transfer?

  3. What is the minimum performance gain of operating the device under interrupt mode over operating it under program controlled mode?

1 Answer

1 1 vote
\textbf{1. Programmed I/O Time:}

The data transfer rate is $20~\text{KB/s}$.  
Since no data processing time is given, we assume that the CPU is polling continuously and receives one byte per poll.

\[
\text{Time for 1 byte} = \frac{1}{20 \times 10^3} = 0.00005~\text{s} = 0.05~\text{ms}
\]

\[
\text{Time for 10 bytes} = 10 \times 0.05 = 0.5~\text{ms}
\]

---

\textbf{2. Interrupt-Driven I/O Time:}

Since an interrupt is generated for each byte and no data processing time is given:

\[
\text{Time for 1 byte} = 0.01~\text{ms}
\]

\[
\text{Time for 10 bytes} = 10 \times 0.01 = 0.1~\text{ms}
\]

---

\textbf{3. Performance Gain (Speedup):}

\[
\text{Gain} = \frac{\text{Programmed I/O Time}}{\text{Interrupt I/O Time}}
= \frac{0.5}{0.1} = 5
\]

\[
\boxed{\text{Interrupt-driven I/O is 5 times faster than Programmed I/O}}
\]
 
Position:
Show:

Related questions

1 1 vote
0 0 answers
19
19 views
NIL DAS asked Dec 11, 2025
19 views
This post was deleted with below mentioned reason.
Delete Reason Name: Add your approach/doubt where you were struck while solving it in the question itself.
Delete Reason Note:
Has Author Submitted Revision Edit?: NOT YET
The post is awaiting revision edit from its author accordingly with mentioned reason.
Assume the number of clock cycles for a polling operation, including transferring to the polling routine, accessing the device, and restarting the user program, is 400 cy...
1 1 vote
1 answers 1 answer
1.7k
1.7k views
Ayush Upadhyaya asked Oct 30, 2018
1,664 views
I think percentage of processor time consumed should be $\frac{ \,ISR\,time}{ISR\,time+\,Data\,Transfer\,Time}=\frac{100}{100+122}$.Is it correct?
1 1 vote
1 1 answer
1.6k
1.6k views
Na462 asked Sep 24, 2018
1,600 views
4 4 votes
1 answers 1 answer
2.4k
2.4k views
Na462 asked Aug 13, 2018
2,367 views
Please Explain Every Point :)Ans. All are Correct