17 views
Suppose that a machine A executes a program with an average CPI of 3. Consider another machine B (with the same instruction set and a better compiler) that executes the same program with 10% less instructions and with a CPI of 1.5 at 1.5 GHz. The clock rate of A so that the two machines have the same performance is _______ GHz.

edited | 17 views

+1 vote
Let, $I_1$ be the instructions executed on machine $A$.

$I_2$ be the instructions executed on machine $B$ with a better compiler.

So, $I_2 = 0.9 I_1$ since it's given that better compiler produces lesser instructions.

Also, let $F_1$ and $F_2$ be clock rates of machine $A$ and machine $B$
Now, to have same performance, execution time must be same.

So,
$I_2 \times CPI_2 \times \frac{1}{F_2} = I_1 \times CPI_1 \times \frac{1}{F_1}$

$0.9 \times I_1 \times 1.5 \times \frac{1}{1.5 \times 10^9} = I_1 \times 3 \times \frac{1}{F_1}$

$0.9 \times 1.5 \times \frac{1}{3 \times 1.5 \times 10^9} = \frac{1}{F_1}$

$F_1 = 3.33 GHz$
by (293 points)
selected by