Consider three different processors P1, P2, and P3 executing the same instructio
ID: 3682447 • Letter: C
Question
Consider three different processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz clock rate and a CPI of 2.2. Which processor has the highest performance expressed in instructions per second? Your answer must state the instructions per second for all three processors. If processor P1 executes a program in 10 seconds, find the number of cycles and the number of instructions in the program. We are trying to reduce the execution time by 30% for P1, but this leads to an increase of 20% in the CPI. What clock rate should we have to get this time reduction for P1?Explanation / Answer
1)
P1: 3GHz / 1.5 = 2 * 10^9 instructions per second
P2: 2.5GHz / 1.0 = 2.5 * 10^9 instructions per second
P3: 4GHz / 2.2 = 1.82 * 10^9 instructions per second
seeing the above values, we get that P2 has the highest performance among the three.
2)
Number of Cycles:
P1: 3GHz * 10 = 3 * 10^10 cycles
P2: 2.5GHz * 10 = 2.5 * 10^10 cycles
P3: 4GHz * 10 = 4 * 10^10 cycles
Number of instructions:
P1: 3GHz * 10 / 1.5 = 2 * 10^10 instructions
P2: 2.5GHz * 10 / 1.0 = 2.5 * 10^10 instructions
P3: 4GHz * 10 / 2.2 = 1.82 * 10^10 instructions
3)
Execution time = (Number 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 = (Number 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 will now become:
P1: 3GHz * 1.71 = 5.13 GHz
P2: 2.5GHz * 1.71 = 4.27 GHz
P3: 4GHz * 1.71 = 6.84 GHz
So the clock rate will now be 1.71 * Clock rate