A given application written in Java runs 20 seconds on a desktop processor A new
ID: 3930333 • Letter: A
Question
A given application written in Java runs 20 seconds on a desktop processor A new Java compiler is released that requires only 0.6 as many instructions as the old compiler Bu. It increases CPI by 1.2. How fast can we expect the application to run using this new compiler? Assume that a processors P has a 3 GHz clock rate and a CPI of 1.5. and executes a program in 10 seconds Find the number of cycles and the number of instructions. We are trying to reduce the execution time by 20% but this leads to an increase of 14% in the CPI What clock rate should we have to get this time reduction?Explanation / Answer
Answer
1.
20 seconds = InsA * CPIA * ClockRate
ClockRate = 20 seconds / (InsA * CPIA)
TimeB = (0.6 * InsA) * (1.2 * CPIA) * 20 seconds / (InsA * CPIA)
= 0.6 * 1.2 * 20 seconds = 14.4 seconds (Answer)
2.
1.
clock rate = 3 GHz
CPI = 1.5
Execution time = 10 seconds = clock cycles / clock rate
clock cycles = execution time * clock rate
= 10 seconds * 3 * 109 cycles/seconds
= 30 * 109 cycles
Number of instructions = clock cycles / CPI
= 30 * 109 / 1.5
= 20 * 109 instructions
2.
Reduced execution time = 10(1 - 0.2) = 10 * .8 = 8 seconds
Increased CPI = 1.5 * (1 + .14)
= 1.5 * 1.14
= 1.71
Time = instruction count * CPI * execution time
= 20 * 109 instructions * 1.71 * 8 seconds
= 273.6 * 109 seconds
Therefore, clock rate = 1/time
= 1/(273.6*109) seconds
= 0.00365 * 10-9
= 0.00365 GHz
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.