engineering computer science MCQ #176

A CPU has a 3-stage pipeline. If branch instructions are 20% of total, what is the average CPI?

engineering computer science MCQ #176

  1. Question 1

    Q1. A CPU has a 3-stage pipeline. If branch instructions are 20% of total, what is the average CPI?

    • A) 1.4
    • B) 1.2
    • C) 1.6
    • D) 1

    Answer: 1.4

    Explanation: Assuming 2-cycle penalty for branch instructions, average CPI = (1 * 0.8) + (2 * 0.2) = 0.8 + 0.4 = 1.2, but since the pipeline has 3 stages, the branch penalty is 2 (or more) cycles, so the average CPI = 1 + (2 * 0.2) = 1.4.