Fill This Form To Receive Instant Help
Homework answers / question archive / 1) A processor having a clock cycle time of 0
1) A processor having a clock cycle time of 0.25 nsec will have a clock rate of ------------MHz.
2) A program is running on a machine which has a total of 500 instructions, average cycles per instruction for the program is 2.5, and CPU clock rate is 1.78GHz.The execution time of the program will be --------------------- second.
3) Consider a program whose instruction count is 60,000, average CPI is 2.4 and clock rate is 1.9 GHz. Suppose we use a new compiler on the same program for which the new instruction count is 50,000 and new CPI is 4.1, which is running on a faster machine with clock rate 2.5GHz. The speedup achieved will be..................
5) Perform signed magnitude multiplication to calculate m * n. (m is the sum of last four digits of your register number, n is the negative value of the sum of last two digit in register number. For eg. Reg no: 19bce0453, then m = 0+4+5+3=12 and n = - 8).
1) A Tclock clock cycle of 0.25 nsec means 0.25 * 10-9 seconds. The clock rate (also called) frequency f is 1/Tclock. So,
f = 1/Tclock = 1 / (0.25 * 10-9) = 4 * 109 = 4 GHz.
So the clock rate is f = 4 GHz = 4000 MHz.
2) Ninstructions = 500 , CPI = 2.5, and f = 1.78 * 109.
Based on f we compute the Tclock = 1 / (1.78 * 109) = 1 / 1.78 * 10-9 seconds = 0.5617 * 10-9 seconds.
So Tclock = 0.5617 * 10-9 seconds.
We have Ninstructions to execute. Each one needs CPI clock cycles, so the total number of clock cycles is Ninstructions * CPI = 1250.
Since each clock cycle takes Tclock seconds to execute, the total time Ttotal is:
Ttotal = Ninstructions * CPI * Tclock = 1250 * 0.5617 * 10-9 seconds = 702.12 * 10-9 seconds = 0.70 microseconds
So Ttotal = 702125 * 10-9 seconds = 0.70 microseconds.
3) Ninstructions = 60,000, CPI = 2.4, and f = 1.9 GHz.
Based on f we compute the Tclock = 1 / (1.9 * 109) = 1 / 1.9 * 10-9 seconds = 0.5263 * 10-9 seconds.
So Tclock = 0.5263 * 10-9 seconds.
We have Ninstructions to execute. Each one needs CPI clock cycles, so the total number of clock cycles is Ninstructions * CPI = 144000.
Since each clock cycle takes Tclock seconds to execute, the total time Ttotal is:
Ttotal = Ninstructions * CPI * Tclock = 60000 * 2.4 * 0.5263 * 10-9 seconds = 75789 * 10-9 seconds = 75.78 microseconds.
So Ttotal = 75.78 microseconds.
For the new compiler, the formula becomes:
Ttotal' = Ninstructions' * CPI' * Tclock' = 50000 * 4.1 * 0.4 * 10-9 seconds = 82000 * 10-9 seconds = 82 microseconds.
So Ttotal' = 82 microseconds.
The speedup achieved will be Speedup = Ttotal' / Ttotal = 82 / 75.78 = 1.08.
So Speedup = 1.08.
4)
Ninstructions_A = 25 * 106
Ninstructions_B = 15 * 106
Ninstructions_C = 10 * 106
Ninstructions_D = 5 * 106
The total number of instructions executed is
Ninstructions_TOTAL = Ninstructions_A + Ninstructions_B + Ninstructions_C + Ninstructions_D = 55 * 106
So Ninstructions_TOTAL = 55 * 106.
The frequency is f = 2 * 109 Hertz, which means Tclock = 1 / f = 0.5 * 10-9 seconds.
So Tclock = 0.5 * 10-9.
The number of clock cycles need to execute the instructions is
No_of_cycles = Ninstructions_A * CPIA + Ninstructions_B * CPIB + Ninstructions_C * CPIC + Ninstructions_D * CPID = (25 * 1.3 + 15 * 1.9 + 10 * 2.5 + 5 * 3.8) * 106 = 105 * 106
So No_of_cycles = 105 * 106
So we have Ninstructions_TOTAL = 55 * 106 instructions which are executed in No_of_cycles = 105 * 106 clock cycles, and each clock cycle takes Tclock = 0.5 * 10-9 seconds.
This means that the total execution time is
Texec_time = No_of_cycles * Tclock = 105 * 106 * 0.5 * 10-9 seconds
Texec_time = 52.5 * 10-3 seconds
So our processor executes Ninstructions_TOTAL = 55 * 106 instructions in Texec_time = 52.5 * 10-3 seconds. This means
MIPS = Ninstructions_TOTAL / Texec_time = (55 * 106) / (52.5 * 10-3) = 1.0476 * 109 = 1047.6 * 106
In other words, our processor executes about one billion instructions per second, or 1047.6 Mega instructions per second.
So MIPS = 1047.6.