We have been working very hard since 2009 to facilitate in learning Read More. We can't keep up without your support. Donate.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# CS501 Assignment Solution Spring 2011

1. What percentage of time will a 20 MIPS processor spend in the busy waitloop of 65-character line printer when it takes 3 m-sec to print a characterand a total of 457 instructions need to be executed to print 65 characterlines? Assume that 4 instructions are executed in the polling loop?

Solution:

Out of the total 457 instructions executed to print a line, 65x4=260 is required for polling.For a 20MIPS processor, the execution of the remaining 197 instructions takes 197/(20x106) = 9.85 sec.Since the printing of 65 characters takes 65*3 msec, (195 – 0.00985) = 194.99 msec isspent in the polling loop before the next 65 characters can be printed. This is 194.99/195= 99.99 % of the total time

2. Suppose that a certain program takes 500 seconds of elapsed time to execute.Out of these 500 seconds, 280seconds is the CPU time and the rest is I/O time.What will be the elapsed time?

Solution:

Elapsed time = CPU time + I/O time.This gives us the I/O time = 500 – 280 = 220 seconds at the beginning, which is 44 % ofthe elapsed time.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 74

### Replies to This Discussion

it is old assignment assignment no 4 is also uploaded by VU so please discuss it here

## Latest Activity

S ι у α ♡ updated their profile
3 hours ago
5 hours ago
5 hours ago
+ !! Ήලᵯᵯℹ Ⲥⱨ !! + posted discussions
5 hours ago
5 hours ago
5 hours ago
+ ⵑⵑ ӍᎥŞŞ ⲤһᵘʳһშᎥⵏ ⵑⵑ + updated their profile
5 hours ago
+ !! Ήලᵯᵯℹ Ⲥⱨ !! + liked Ammara Sabir's discussion !!!!!!Muhabbat!!!!!!
5 hours ago
6 hours ago
6 hours ago
6 hours ago
6 hours ago

1

2

3

4

5