Skip to content
Official PYQ · 2021

GATE CS 2021 Set 1 Q53 — Instruction Pipelining

Explain with AI
A five-stage pipeline has stage delays of 150,120,150,160150, 120, 150, 160 and 140140 nanoseconds. The registers that are used between the pipeline stages have a delay of 55 nanoseconds each.
The total time to execute 100100 independent instructions on this pipeline, assuming there are no pipeline stalls, is _______ nanoseconds.
View worked solution

Answer: 17160 : 17160

To find the total time required to execute the instructions on the pipeline, we first determine the clock cycle time (TclockT_{\text{clock}}) of the pipeline.

1. Determine the Clock Cycle Time (TclockT_{\text{clock}})

The clock cycle time of a pipelined processor is determined by the delay of the slowest stage plus the register overhead (delay of the interface registers):

Tclock=max⁡(Stage Delays)+Register DelayT_{\text{clock}} = \max(\text{Stage Delays}) + \text{Register Delay}

Given stage delays are 150,120,150,160,150, 120, 150, 160, and 140140 ns, and the register delay is 55 ns:

max⁡(150,120,150,160,140)=160 ns\max(150, 120, 150, 160, 140) = 160\text{ ns} Tclock=160 ns+5 ns=165 nsT_{\text{clock}} = 160\text{ ns} + 5\text{ ns} = 165\text{ ns}

2. Calculate Total Execution Time

For a kk-stage pipeline executing nn independent instructions with no stalls, the total number of clock cycles required is:

Total Cycles=k+n−1\text{Total Cycles} = k + n - 1

Given:

  • Number of stages (kk) = 55
  • Number of instructions (nn) = 100100
Total Cycles=5+100−1=104 cycles\text{Total Cycles} = 5 + 100 - 1 = 104\text{ cycles}

The total execution time (TtotalT_{\text{total}}) is:

Ttotal=Total Cycles×TclockT_{\text{total}} = \text{Total Cycles} \times T_{\text{clock}} Ttotal=104×165 ns=17160 nsT_{\text{total}} = 104 \times 165\text{ ns} = 17160\text{ ns}

Thus, the total time to execute 100100 independent instructions is 17160 nanoseconds.

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

Published
Report a correction
Keep exploringMore Instruction Pipelining questions