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

Q-1 Suppose that a certainprogram takes 300 seconds of elapsed time to execute.

ID: 3611731 • Letter: Q

Question

Q-1 Suppose that a certainprogram takes 300 seconds of elapsed time to execute. Out ofthese 300
seconds, 280seconds is the CPU time and the rest is I/O time. Whatwill be the elapsed time? [5]

Q-2 Consider an I/O bus that can transfer 6 bytes of data in onebus cycle. Suppose that a designer is
planning to attach the following two components to this bus.

Hard drive with a transfer rate of 100 M bytes/sec
Video card with a transfer rate of 128 M bytes/sec

What will be the maximum bandwidth from these two components? (Themaximum frequency of the bus
is 30 MHz) [5]


Q-3 What percentage of time will a 20 MIPS processor spend in thebusy wait loop of an 85-character line
printer when it takes 2 msec to print a character and a total of765 instructions need to be executed to
print an 85 character line? Assume that 4 instructions are executedin the polling loop? [5]

Explanation / Answer

Q1)
The formula of Elapsed time is           Elapsedtime=CPU TIME+I/O Time                        300=280+20. Q2) ->The maximum frequency of the bus is 30 MHz. and bustransfer data 6 bytes. So,the maximum bandwidth of this bus is 30 x6 = 180. ->Hard drive transfer rate 100 M bytes/sec and Video cardtransfer rate 128 M bytes/sec. So,the bandwidth from these two componentswill 128 + 100 =228 .This is less than the 180Mbytes/sec that the bus provide.Finally,If designer use twocomponents with bus, one or both components will operating atdeduced bandwidth. Q3) -> Total instructions= 765 executed.
-> To print a line 85 charcter and assume 4 instructions then(85 x 4)=340 is required for polling. ->The execution for the remaining instructionsare 765-340=425. ->It takes 425/ (20x106) =21.25sec.
->Since the printing of 85 characters takes 85ms, (85-0.02125) =84.97msec is spent in the polling loop before the next 85characters can be printed. ->Therefore, This is 84.97/85 =99.96% of the total time. ITS HELPFUL TO YOU.... Q2) ->The maximum frequency of the bus is 30 MHz. and bustransfer data 6 bytes. So,the maximum bandwidth of this bus is 30 x6 = 180. ->Hard drive transfer rate 100 M bytes/sec and Video cardtransfer rate 128 M bytes/sec. So,the bandwidth from these two componentswill 128 + 100 =228 .This is less than the 180Mbytes/sec that the bus provide.Finally,If designer use twocomponents with bus, one or both components will operating atdeduced bandwidth. Q3) -> Total instructions= 765 executed.
-> To print a line 85 charcter and assume 4 instructions then(85 x 4)=340 is required for polling. ->The execution for the remaining instructionsare 765-340=425. ->It takes 425/ (20x106) =21.25sec.
->Since the printing of 85 characters takes 85ms, (85-0.02125) =84.97msec is spent in the polling loop before the next 85characters can be printed. ->Therefore, This is 84.97/85 =99.96% of the total time. ITS HELPFUL TO YOU.... -> Total instructions= 765 executed.
-> To print a line 85 charcter and assume 4 instructions then(85 x 4)=340 is required for polling. ->The execution for the remaining instructionsare 765-340=425. ->It takes 425/ (20x106) =21.25sec.
->Since the printing of 85 characters takes 85ms, (85-0.02125) =84.97msec is spent in the polling loop before the next 85characters can be printed. ->Therefore, This is 84.97/85 =99.96% of the total time. ITS HELPFUL TO YOU....