GATE 2013 CS (CS1) – Question 55
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.
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.