78.2k views
1 vote
consider two processors p₁ and p₂ executing the same instruction set. assume that under identical conditions, for the same input, a program running on p₂ takes 25% less time but incurs 20% more cpi (clock cycles per instruction) as compared to the program running on p₁. if the clock frequency of p₁ is 1ghz, then the clock frequency of p₂ (in Ghz) is .

User KNDheeraj
by
7.6k points

1 Answer

5 votes

Final answer:

To find the clock frequency of processor P2, we consider the 25% reduced execution time and 20% increased CPI compared to P1. After calculating, we find that P2's clock frequency is approximately 1.11 GHz when P1's frequency is 1 GHz.

Step-by-step explanation:

To calculate the clock frequency of processor P2, we need to consider the execution time ratio and the CPI (clock cycles per instruction) increase. Processor P1 has a clock frequency of 1 GHz, and processor P2 takes 25% less time to execute the same program. This means that if P1 takes 100 units of time, P2 takes only 75 units of time to execute the same program. However, P2 also incurs 20% more CPI than P1. If the CPI of P1 is 'C', then CPI of P2 is '1.2C'. To find the frequency of P2, we use the formula: frequency = 1 / (CPI ∙ execution time per instruction). Let 'F' be the frequency of P1 and 'F2' be the frequency of P2.

Since F = 1 GHz and execution time of P2 is 0.75 times that of P1, and CPI of P2 is 1.2C, the relationship is:

F2 = F / (0.75 ∙ 1.2) = (1 GHz) / 0.9 = 1.111... GHz

Therefore, the clock frequency of P2 is approximately 1.11 GHz.

User Woody
by
8.5k points