Assignment
No. 03 sOLUTION
Semester Spring 2011
Advance
Computer Architecture-CS501
|
Total Marks: 15
Due Date:
09/06/2011
|
|||
Objective:
To learn and understand basic concepts of I/O and polling loop.
Instructions:
Please read
the following instructions carefully before solving & submitting
assignment:
Assignment should be in
your own wordings not copied from net, handouts or books.
It should be clear that
your assignment will not get any credit (zero marks) if:
o The assignment is submitted after due date.
o The submitted assignment does not open or file corrupt.
o The assignment is copied (from other student or copy from
handouts or internet).
o Student ID is not mentioned in the assignment File or
name of file is other than student ID.
GOOD LUCK
|
||||
Question No 1
|
Marks = 10
|
|||
Let us have a 20MIPS processor, you have to calculate the
percentage of time it spends in busy wait loop of a 75-character line
printer, when it takes 2 msec to print a character and a total of 665
instructions require to be executed to print a 75 character line.
Suppose that two instructions
are executed in the polling loop.
Solution:
Out of
the total 665 instructions executed to print a line, 75x2=150 is required for
polling. For a 20MIPS processor, the execution of the remaining 515
instructions takes 515/ (20x106) =
25.75µsec. Since the printing of 75 characters
takes 150ms, (150-0.02575) =149.97msec is spent in the polling loop before
the next 75 characters can be printed. This is 149.97/150=99.98% of the total
time.
|
||||
Question
No 2
|
Marks=5
|
|||
Let us assume that a program takes 400 seconds of elapsed
time to execute. Out of these 400
seconds, 320 seconds is the CPU time and the rest is I/O time. What
percentage of elapsed time is spent on I/O operations?
Solution:
Elapsed time = CPU time + I/O
time.
This
gives us the I/O time = 400 – 320 = 80 seconds at the beginning, which is 20
% of the elapsed time.
|
||||
Wednesday, 14 March 2012
Advance Computer Architecture-CS501 ASSIGNMENT 3 SOLUTION
Labels:
CS501
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
“You can't change the past, but you can ruin the present by worrying about the future”