Skip to content
Official PYQ · 2014

GATE CS 2014 Set 1 Q43 — Instruction Pipelining

Explain with AI
Consider a 66-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is executing on this 66-stage pipeline, the speedup achieved with respect to non-pipelined execution if 2525% of the instructions incur 22 pipeline stall cycles is ____________
View worked solution

Answer: 4

To find the speedup achieved by the pipelined processor over the non-pipelined processor, we use the standard speedup formula for a large number of instructions:

Speedup=Execution Timenon-pipelinedExecution Timepipelined=CPInon-pipelined×τnon-pipelinedCPIpipelined×τpipelined\text{Speedup} = \frac{\text{Execution Time}_{\text{non-pipelined}}}{\text{Execution Time}_{\text{pipelined}}} = \frac{\text{CPI}_{\text{non-pipelined}} \times \tau_{\text{non-pipelined}}}{\text{CPI}_{\text{pipelined}} \times \tau_{\text{pipelined}}}

Given:

  • Number of pipeline stages (kk) = 66
  • The stages are perfectly balanced with no pipelining overhead. Therefore, if the clock cycle time of the pipelined processor is τ\tau, the clock cycle time of the non-pipelined processor is 6τ6\tau.
  • For a non-pipelined processor, each instruction takes 11 clock cycle of duration 6τ6\tau (or 66 cycles of duration τ\tau). Thus, CPInon-pipelined=1\text{CPI}_{\text{non-pipelined}} = 1 with cycle time 6τ6\tau.

For the pipelined processor:

  • The ideal CPIpipelined\text{CPI}_{\text{pipelined}} is 11.
  • 25%25\% of the instructions incur 22 stall cycles.
  • Average stall cycles per instruction = 0.25×2=0.50.25 \times 2 = 0.5 cycles.
  • Actual CPIpipelined=Ideal CPI+Average Stall Cycles=1+0.5=1.5\text{CPI}_{\text{pipelined}} = \text{Ideal CPI} + \text{Average Stall Cycles} = 1 + 0.5 = 1.5.

Substituting these values into the speedup formula:

Speedup=1×6τ1.5×τ=61.5=4\text{Speedup} = \frac{1 \times 6\tau}{1.5 \times \tau} = \frac{6}{1.5} = 4

Thus, the speedup achieved is 4.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Instruction Pipelining questions