Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q-1 Supposethat a certain program takes 300 seconds of elapsed time toexecute. O

ID: 3611871 • Letter: Q

Question

Q-1 Supposethat a certain program takes 300 seconds of elapsed time toexecute. Out of these 300

seconds,280seconds is the CPU time and the rest is I/O time. What will bethe elapsed time? [5]

Q-2 Consideran I/O bus that can transfer 6 bytes of data in one bus cycle.Suppose that a designer is

planning toattach the following two components to thisbus.

Hard drivewith a transfer rate of 100 M bytes/sec

Video cardwith a transfer rate of 128 M bytes/sec

What will bethe maximum bandwidth from these two components? (The maximumfrequency of the bus

is 30 MHz)[5]

Q-3 Whatpercentage of time will a 20 MIPS processor spend in the busy waitloop of an 85-character line

printer whenit takes 2 msec to print a character and a total of 765instructions need to be executed to

print an 85character line? Assume that 4 instructions are executed in thepolling loop? [5]

Explanation / Answer

the formula for Elapsed timeis         Elapsed time =CPU Time + I/O Time

I/O time = 300-280 = 20

    CPU Time = 280 seconds

The maximum frequency of the bus is 30 MHz.
the maximum bandwidth of this bus is 30 x 6 = 180 . Thedemand for bandwidth from these two components will  128+ 100 = 228
This is more than the 180 Mbytes/sec that the bus provide.
If designer usetwo components with bus, one or both components willoperating at deduced bandwidth.

This is 84.97/85 = 99.96% of the total time.