Consider three different processors P1 P2 and P3 executing t
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 has a CPI of 2.2.
A) Which processor has the highest performance expressed in instructions per second?
B) If the processors each execute a program in 10 seconds, find the number of cycles and the number of instructions.
C) We are trying to reduce the execution time by 30% but this lead to an increase of 20% in the CPI. What clock rate should we have to get this time reduction?
Solution
Given,
A) Highest performance expressed in instructions per second:
Performance=(Clock Rate/CPI) instructions per second;
For P1: 3GHz / 1.5 = 2 * 10^9 instructions per second
For P2: 2.5GHz / 1.0 = 2.5 * 10^9 instructions per second
For P3: 4GHz / 2.2 = 1.82 * 10^9 instructions per second
So, From above it is clear that P2 has the highest performance expressed in instructions per second.
B) If the processors each execute a program in 10 seconds,
Then, Number of Cycles: (Clock Rate * 10) cycles.
For P1: 3GHz * 10 = 3 * 10^10 cycles
For P2: 2.5GHz * 10 = 2.5 * 10^10 cycles
For P3: 4GHz * 10 = 4 * 10^10 cycles.
And, Number of instructions: ((Clock Rate * 10) / 1.5)
For P1: ((3GHz * 10) / 1.5) = 2 * 10^10 instructions
For P2: ((2.5GHz * 10) / 1.0) = 2.5 * 10^10 instructions
For P3: ((4GHz * 10) / 2.2) = 1.82 * 10^10 instructions.
C) We know that,
Execution time = ((Number of instructions * CPI) / (Clock rate))
So, If we are trying to reduce the execution time by 30% but this lead to an increase of 20% in the CPI, Then. we have:
Execution time * 0.7 = ((Number of instructions * CPI * 1.2) / (New Clock rate))
Where, New Clock rate = ((Clock rate * 1.2) / 0.7) = 1.71 * Clock rate
Now, we have to find out New Clock rate for each processor so that we have to get this time reduction::
For P1: 3GHz * 1.71 = 5.13 GHz
For P2: 2.5GHz * 1.71 = 4.27 GHz
For P3: 4GHz * 1.71 = 6.84 GHz.
| Processors | Clock Rate (GHz) | CPI |
| P1 | 3 | 1.5 |
| P2 | 2.5 | 1.0 |
| P3 | 4.0 | 2.0 |

