Ask Question
17 August, 06:25

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?

+2
Answers (1)
  1. 17 August, 06:49
    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?
Find 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 you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers