Consider two different processors P1 and P2 executing the same instruction set w
ID: 3765905 • Letter: C
Question
Consider two different processors P1 and P2 executing the same instruction set with the clock rates and CPIs given in the following table.
If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions for each processor.
We are trying to reduce the program execution time by 30%, but this leads to an increase of 20% in the CPI. What clock rate should we have to get this time reduction for each processor?
2
Processor Clock Rate CPI P1 3 GHz 1.8 P2 3.5 GHz2
Explanation / Answer
Answer for Question A) is>. To find the Number of Cyccles per each process..
Cycles:
P1: 3GHz * 10 = 3 * 10^10 cycles
P2: 2.5GHz * 10 = 2.5 * 10^10 cycles
P3: 4GHz * 10 = 4 * 10^10
cycles
Num of instructions:
P1: 3GHz * 10 / 1.5 = 2 * 10 ^ 10 instructions
P2: 2.5GHz * 10 / 1.0 = 2.5 * 10^10 instructions
Answer for Question B is:
Execution time = (Num of instructions * CPI) / ( Clock rate )
So if we want to reduce the execution time by 30%, and CPI increases by 20%, we have:
Execution time * 0.7 = (Num of instructions * CPI * 1.2 ) / ( New Clock rate)
New Clock rate = Clock rate * 1.2 / 0.7 = 1.71 * Clock rate
New Clock rate for each processor:
P1: 3GHz * 1.71 = 5.13 GHz
P2: 2.5GHz * 1.71 = 4.27 GHz