Anonymous user menu

Clock Frequency of Processors in pipeline

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 _________.
 

1Comment
Sourav Mishra @sourav
18 Jun 2016 09:28 pm

CPU TIME \((T)\) = No. of Instructions \((I)\) * No. of Cycles per Instruction \((c)\) * Cycle Time \((t)\)

                                                                             OR

CPU TIME \((T)\) = No. of Instructions \((I)\) * No. of Cycles per Instruction \((c)\) * Clock Frequency \((f^-1)\)

 

A program running on P2 takes 25% less time that of P1. So, \(T2 = 0.75 * T1\) 

A program running on P2 takes 20% more CPI than P1. So, \(c2 = 1.2 * c1\)

No. of Instructions is same for both. So, \(I1 = I2\)

Clock Frequency of P1 ie. \(f1\) = 1GHz.

Now, substituting all of them in the formula we get -

T1 = I1 * c1 * f1-1                                   -------------- (1)

T2 = I2 * c2 * f2 -1                                  -------------- (2)

=> (f1 * T1) / c1 = (f2 * T2) / c2         (equating 1 & 2 over \(I\))

=> f2 = (c2/c1) * (T1/T2) *f1

=> f2 = 1.2 * (1/0.75) * 1

=> f2 = 1.6 GHz.