GATE Computer ScienceHardGATE CSE

A 5-stage pipeline has ideal CPI 1. 20% of instructions are branches, 60% of which are taken; branches are predicted not-taken and a taken branch costs 3 stall cycles. 15% of instructions are loads and 40% of loads are immediately followed by a dependent instruction, costing 1 stall cycle. The average CPI is

  1. A. 1.75
  2. B. 1.51
  3. C. 1.42
  4. D. 1.33

Correct answer: C. 1.42

CPI = 1 + 0.2·0.6·3 + 0.15·0.4·1 = 1 + 0.36 + 0.06 = 1.42.

More Computer Organization and Architecture questions

Exams that ask this topic