Question No 1
What percentage of time will a 10 MIPS processor spend in the busy wait loop of an 65 - character line printer when it takes 1 msec to print a character and a total of 950 instructions need to be executed to print an 85 character line? Assume that 3 instructions are executed in
the polling loop?
Here we are given that 950 instructions are required to 85 character line, but we are required to print
65 characters on a line therefore, number of instructions required to print 65 character line will be calculated as under
instructions required for printing 65 character line 950
65 85
instructions required for printing 65 character line 950 65 726.47 or 726 instructions
85
Out of 726 instructions (65 3) 195
are required for polling
Remaining instructions = 726 195 531
For a 10 MIPS processor, the execution of remaining instructions takes
531
10 106
5.31105 sec 0.0531ms
Printing of 65 character line takes 65 × 1 = 65 ms
65ms 0.0531ms 64.9469ms
is spent on polling loop
before the 65 characters can be printed
This makes 64.9469 100 99.91% of total time
65
Question No 2
A 4 K byte block of data is read from a disk drive. What is the overall data transmission rate if
the disk drive has a latency of 9 ms, and a burst bandwidth of 1 MB per second?
Time required for execution = 4K/(1MB/s) + 9ms = 4ms + 9ms = 13ms
Above calculation can be done simply as follows
4K = 4 × 103 bytes
1MB/s = 1 × 106 bytes/sec
Overall transmission rate will be 4K/13ms = 0.30MB/s
Above calculation can be done simply as follows
4K = 4 × 103 bytes
13ms = 13 × 10-3 =0.031 sec
......Indian Songs.......
Saturday, January 23, 2010
CS501 Assignment # 5 Solution
Posted by Alisha Naaz at 10:44 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment