The GATE Grind

GATE 2013 CS (CS1) – Question 55

Computer Organization and Architecture · Instruction Pipelining and Pipeline Hazards · 2 marks · Multiple choice

A pipeline has FI,DI,FO,EI,WO stage delays 5,7,10,8,6 ns, with one-ns buffers after stages and no branch prediction. A twelve-instruction program has only branch I₄, targeting I₉. The branch is taken. Find total completion time in ns.

  1. 132
  2. 165
  3. 176
  4. 328

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (B) 165

Explanation

The bottleneck clock is max(5,7,10,8,6)+1=11 ns. Executed instructions are I₁–I₄ and I₉–I₁₂, eight instructions. An ordinary five-stage run takes 8+4=12 cycles. Waiting for the branch to resolve at EI introduces three extra fetch cycles, totaling fifteen. Time is 15×11=165 ns, B.

More Instruction Pipelining and Pipeline Hazards questions

All Instruction Pipelining and Pipeline Hazards questions →