878 views
Consider two processors P1 and P2 executing the same instruction set. Assume that under identical conditions, for the same input, a program running on P2 takes 25% less time but incurs 20% more CPI (clock cycles per instruction) as compared to the program running on P1. If the clock frequency of P1 is 1GHz, then the clock frequency of P2 (in GHz) is _________.

0

Total execution time, E = No. of instructions executed( #I) $\times$ CPI / clock frequency (F)
$E_{P2} = 0.75 \times E_{P1}$

$\implies 0.75 \times \#I_{P1} \times CPI_{P1} / F_{P1} = \#I_{P2} \times CPI_{P2}/F_{P2}$

$\implies 0.75 \times \#I_{P1} \times CPI_{P1} / F_{P1} = \#I_{P1} \times 1.2 \times CPI_{P1}/F_{P2}$

$\implies 0.75 \times F_{P1} = 1.2 /F_{P2}$

$\implies F_{P2} = 1.2 /(0.75 \times F_{P1})$

$\implies F_{P2} = 1.2 /(0.75 \times 1) = 1.6$ GHz
edited by
0
The answer is correct except for the fact that the first line is wrong it should be E_{p2}=0.75*E{p1}

+1 vote
1
2