engineering computer science MCQ #187

A CPU has a 3-stage pipeline. If branch prediction accuracy is 80%, what is the average instruction execution time if branch penalty is 2 cycles?

engineering computer science MCQ #187

  1. Question 1

    Q1. A CPU has a 3-stage pipeline. If branch prediction accuracy is 80%, what is the average instruction execution time if branch penalty is 2 cycles?

    • A) 1.4 cycles
    • B) 1.2 cycles
    • C) 1.6 cycles
    • D) 1.8 cycles

    Answer: 1.4 cycles

    Explanation: Average instruction execution time = 1 + branch penalty * (1 - branch prediction accuracy) = 1 + 2 * 0.2 = 1.4