234k views
3 votes
Suppose one machine, A, executes a program with an average CPI of 1.9. Suppose another machine, B (with the same instruction set and an enhanced compiler), executes the same program with 20% less instructions and with a CPI of 1.1 at 800MHz. In order for the two machines to have the same performance, what does the clock rate of the first machine need to be

1 Answer

5 votes

Answer:

the clock rate of the first machine need to be 1.7 GHz

Step-by-step explanation:

Given:

CPI of A = 1.9

CPI of B = 1.1

machine, B executes the same program with 20% less instructions and with a CPI of 1.1 at 800MHz

To find:

In order for the two machines to have the same performance, what does the clock rate of the first machine need to be

Solution:

CPU execution time = Instruction Count * Cycles per Instruction/ clock rate

CPU execution time = (IC * CPI) / clock rate

(IC * CPI) (A) / clock rate(A) = (IC * CPI)B / clock rate(B)

(IC * 1.9) (A) / clock rate(A) = (IC * (1.1 * (1.0 - 0.20)))(B) / 800 * 10⁶ (B)

Notice that 0.20 is basically from 20% less instructions

(IC * 1.9) / clock rate = (IC * (1.1 * (1.0 - 0.20))) / 800 * 10⁶

(IC * 1.9) / clock rate = (IC*(1.1 * ( 0.8))/800 * 10⁶

(IC * 1.9) / clock rate = (IC * 0.88) / 800 * 10⁶

clock rate (A) = (IC * 1.9) / (IC * 0.88) / 800 * 10⁶

clock rate (A) = (IC * 1.9) (800 * 10⁶) / (IC * 0.88)

clock rate (A) = 1.9(800)(1000000) / 0.88

clock rate (A) = (1.9)(800000000) / 0.88

clock rate (A) = 1520000000 / 0.88

clock rate (A) = 1727272727.272727

clock rate (A) = 1.7 GHz

User Mark Nguyen
by
8.5k points