Similar questions 10 more →
Pipelining & Hazards

Answer & solution
Official answer: 4
1. Method and setup. Measure time in units of one pipeline stage. Without pipelining an instruction consumes six such units; in steady state the pipeline completes one instruction per cycle plus stalls. Weight the stall penalty by the fraction of affected instructions rather than adding two cycles to every instruction.
2. Work through the result and its assumptions. The average cycles per instruction is 1+0.25·2=1.5. A nonpipelined instruction takes six balanced stage times, so steady-state speedup is 6/1.5=4. This ignores fill/drain effects; for a finite N-instruction run with exactly N/2 stall cycles, the usual timing is 6N/(1.5N+5), approaching4.