Professional Documents
Culture Documents
Mc210200630 th
Deadline
30 of January, 2023
Please carefully read the following instructions before attempting the assignment.
You should consult the recommended books to clarify your concepts as handouts are not sufficient.
You are supposed to submit your assignment in Doc or Docx format.
Any other formats like scan images, PDF, ZIP, RAR, PPT, BMP, etc. will not be accepted.
Topic Covered:
The objective of this assignment is to increase the learning capabilities of the students about
Understanding the
o Input Output Interface
o Interrupt Driven I/O
o Interrupt Hardware and Software
o Interrupt Priority and Nested Interrupts
NOTE
No assignment will be accepted after the due date via email in any case (whether it is the case of load
shedding or internet malfunctioning etc.). Hence refrain from uploading assignments in the last hour
of the deadline. It is recommended to upload the solution file at least two days before its closing date.
If you people find any mistake or confusion in the assignment (Question statement), please consult
with your instructor before the deadline. After the deadline, no queries will be entertained in this
regard.
For any query, feel free to email at:
cs501@vu.edu.pk
Question 20 marks
A processor with a 500 MHz clock requires 1000 clock cycles to perform a context switch and
start an ISR. Assume each interrupt takes 10,000 cycles to execute the ISR and the device makes
200 interrupt requests per second. Also, assume that the processor polls every 0.5msec during the
time when there are no interrupts. Further assume that polling an I/O device requires 500 cycles.
Compute the following:
a. How many cycles per second does the processor spend handling I/O from the
device if only interrupts are used? [10 marks]
Solution:
The device makes 200 interrupt requests per second, each of which takes time
= 12,000 cycles.
b. What fraction of the CPU time is used in interrupt handling for part? [10 marks]
Solution: