The CPU execution time formula is:
T=fI×CPI where:
I is the instruction count,
CPI is the average cycles per instruction,
f is the clock frequency.
Since both processors run the same program with the same instruction set and input, the instruction count is the same for both:
I1=I2=I From the problem statement:
T2=(1−0.25)T1=0.75T1
CPI2=(1+0.20)CPI1=1.20CPI1
f1=1 GHz
Expressing the ratio of execution times:
T1T2=f1I×CPI1f2I×CPI2=(CPI1CPI2)×(f2f1) Substitute the given values:
0.75=1.20×f21 f2=0.751.20=1.6 GHz Thus, the clock frequency of P2 is 1.6 GHz.