GATE Computer ScienceVery hardGATE CS (PYQ pattern)

On a 5-stage pipeline with forwarding, 30% of instructions are loads. Half of them are followed immediately by a dependent instruction costing one stall. A compiler reordering pass removes 60% of these stalls but increases the dynamic instruction count by 4%. If cycle time is unchanged, by what percentage does execution time change (negative means faster)?

  1. A. -4.1%
  2. B. -5.4%
  3. C. -7.8%
  4. D. -0.1%

Correct answer: A. -4.1%

Before: CPI = 1.15. After: stalls 0.15·0.4 = 0.06 → CPI 1.06, instructions ×1.04. Time ratio = 1.06·1.04/1.15 = 0.9586, i.e. −4.1% (not the −7.8% you get by forgetting the longer program).

More Computer Organization and Architecture questions

Exams that ask this topic