Ask Question
10 February, 19:53

Consider two different implementations of the same instruction set architecture. the instructions can be divided into four classes according to their cpi (classes a, b, c, and d). p1 with a clock rate of 2.5 ghz and cpis of 1, 2, 3, and 3, and p2 with a clock rate of 3 ghz and cpis of 2, 2, 2, and 2. given a program with a dynamic instruction count of 1.0e6 instructions divided into classes as follows: 10% class a, 20% class b, 50% class c, and 20% class d, which is faster: p1 or p2?

+3
Answers (1)
  1. 10 February, 22:53
    0
    Class A: 10^5 instr. Class B: 2 x 10^5 instr. Class C: 5 x 10^5 instr. Class D: 2 x 10^5 instr.

    Time = no instr x CPI / Clock rate

    Total time P1 = (10^5 + 2 x 10^5 x 2 + 5 x 10^5 x 3 + 2 x 10^5 x 3) / (2.5 x 10^9) = 10.4 x 10^-4s

    Total Time P2 = (10^5 x 2 + 2 x 10^5 x 2 + 5 x 10^5 x 2 + 2 x 10^5 x 2) / (3 x 10^9) = 6.66 x 10^-4s

    CPI (P1) = 10.4 x 10^-4 x 3 x 10^9/10^6 = 2.6

    CPI (P2) = 6.66 x 10^-4 x 3 x 10^9/10^6 = 2.0

    Therefore, P2 is faster.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider two different implementations of the same instruction set architecture. the instructions can be divided into four classes ...” in 📙 Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers