64.9k views
0 votes
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
leads to an increase of 20% in the CPI. What clock rate
should we have to get this time reduction?

User John Dover
by
7.4k points

1 Answer

6 votes

Answer:

Step-by-step explanation:

a. To compare the performance of the processors, we can use the following formula:

Performance = Clock rate / CPI

Using this formula, we get:

Performance of P1 = 3 GHz / 1.5 = 2 instructions per second

Performance of P2 = 2.5 GHz / 1.0 = 2.5 instructions per second

Performance of P3 = 4.0 GHz / 2.2 = 1.82 instructions per second

Therefore, P2 has the highest performance expressed in instructions per second.

b. If each processor executes a program in 10 seconds, we can use the following formula to calculate the number of cycles:

Cycles = Clock rate x Time

And we can use the following formula to calculate the number of instructions:

Instructions = Cycles x CPI

Using these formulas, we get:

For P1:

Cycles = 3 GHz x 10 s = 30 billion cycles

Instructions = 30 billion cycles x 1.5 = 45 billion instructions

For P2:

Cycles = 2.5 GHz x 10 s = 25 billion cycles

Instructions = 25 billion cycles x 1.0 = 25 billion instructions

For P3:

Cycles = 4.0 GHz x 10 s = 40 billion cycles

Instructions = 40 billion cycles x 2.2 = 88 billion instructions

c. To reduce the execution time by 30%, we need to find a new execution time of:

New execution time = 10 s x 0.7 = 7 s

To achieve this new execution time with a 20% increase in CPI, we can use the following formula:

New clock rate = (Old clock rate x Old CPI) / (New CPI x New execution time)

Using this formula and plugging in the values for P2, we get:

New clock rate = (2.5 GHz x 1.0) / (1.2 x 7 s) = 0.595 GHz or 595 MHz

Therefore, to achieve the desired time reduction, the clock rate should be reduced to 595 MHz.

User Shrey Joshi
by
8.6k points