You are on page 1of 3

Name Ali Muhammad Total marks = 20

Mc210200630 th
Deadline
30 of January, 2023

Advance Computer Architecture


(CS501)
Assignment # 02
Fall 2022

Please carefully read the following instructions before attempting the assignment.

RULES FOR MARKING


It should be clear that your assignment would not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or the file is corrupt.
 Strict action will be taken if the submitted solution is copied from any other student or the
internet.

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

10000 + 2x1000 (context switching to and from ISR)

= 12,000 cycles.

So a total of 200 x 12,000 = 2,400,000 cycles per second are spent

I/O processing using interrupts.

b. What fraction of the CPU time is used in interrupt handling for part? [10 marks]
Solution:

The percentage of CPU time used in interrupt processing is


2,400,000/(500x106) or 0.48%.

You might also like