GATE Computer ScienceHardGATE CS (PYQ pattern)

An unpipelined multiplier is busy for 4 cycles starting in the cycle a multiply issues; a later multiply that reaches issue while it is busy waits, and all other instructions issue one per cycle. 10% of instructions are multiplies. After a multiply, the next instruction is another multiply in 40% of cases; in a further 20% of cases the next instruction is not a multiply but the one after it is. Ignore cases with three multiplies within four instructions. What is the CPI (ideal 1)?

  1. A. 1.16
  2. B. 1.12
  3. C. 1.18
  4. D. 1.30

Correct answer: A. 1.16

A multiply issued at t frees the unit at t + 4. One right behind it would issue at t + 1 → 3 stalls; one two places behind (t + 2) → 2 stalls. CPI = 1 + 0.1 × (0.4 × 3 + 0.2 × 2) = 1.16. Counting only back-to-back pairs gives 1.12; charging 3 for both cases gives 1.18.

More Computer Organization and Architecture questions

Exams that ask this topic