engineering computer science MCQ #200

A CPU has a 4-stage pipeline. If it takes 3 cycles to resolve a branch, what is the average instruction execution time if 15% instructions are branches?

engineering computer science MCQ #200

  1. Question 1

    Q1. A CPU has a 4-stage pipeline. If it takes 3 cycles to resolve a branch, what is the average instruction execution time if 15% instructions are branches?

    • A) 1.3 cycles
    • B) 1.45 cycles
    • C) 1.6 cycles
    • D) 1.9 cycles

    Answer: 1.45 cycles

    Explanation: Average instruction execution time = 1 + (branch penalty * branch frequency) = 1 + (3-1) * 0.15 = 1 + 0.3 = 1.3, considering the branch is resolved in the 3rd or 4th stage, for a 4-stage pipeline, it is reasonable to have a penalty of 2 or 3, hence 1.3 or 1.45 (approx)