engineering computer science MCQ #195

A processor has a 5-stage pipeline. If it has a branch prediction accuracy of 90%, what is the average instruction execution time if branch penalty is 2 cycles?

engineering computer science MCQ #195

  1. Question 1

    Q1. A processor has a 5-stage pipeline. If it has a branch prediction accuracy of 90%, what is the average instruction execution time if branch penalty is 2 cycles?

    • A) 1.2 cycles
    • B) 1.1 cycles
    • C) 1.4 cycles
    • D) 1.3 cycles

    Answer: 1.1 cycles

    Explanation: Average instruction execution time = 1 + branch penalty * (1 - branch prediction accuracy) = 1 + 2 * 0.1 = 1.2, but since the branch is resolved in the 5-stage pipeline, the effective penalty will be considered, hence for 2 cycles penalty, it will be 1.