GATE Computer ScienceHardGATE CS (PYQ pattern)

A 5-stage pipeline with full forwarding has a measured CPI of 1.40 (ideal 1). 25% of instructions are loads, and 40% of loads are immediately followed by a dependent instruction (1 stall each). 20% of instructions are branches; the machine predicts not-taken and every taken branch costs 3 cycles. What fraction of branches is taken, and what would the CPI be with predict-taken (1 cycle per taken branch, 3 per not-taken branch)?

  1. A. 66.7% taken; CPI 1.43
  2. B. 50% taken; CPI 1.40
  3. C. 60% taken; CPI 1.46
  4. D. 50% taken; CPI 1.50

Correct answer: D. 50% taken; CPI 1.50

1.40 = 1 + 0.25 × 0.4 × 1 + 0.2 × 3t → 0.30 = 0.6t → t = 0.50. Predict-taken: 1 + 0.10 + 0.2 × (0.5 × 1 + 0.5 × 3) = 1.50, worse at this taken rate. Forgetting the load stalls gives t = 66.7%.

More Computer Organization and Architecture questions

Exams that ask this topic