Skip to content
Official PYQ · 2023

GATE CS 2023 Q23 — Instruction Pipelining

Explain with AI
Consider a 33-stage pipelined processor having a delay of 10 ns10 \mathrm{~ns} (nanoseconds), 20 ns20 \mathrm{~ns}, and 14 ns,14 \mathrm{~ns}, for the first, second, and the third stages, respectively. Assume that there is no other delay and the processor does not suffer from any pipeline hazards. Also assume that one instruction is fetched every cycle.

The total execution time for executing 100100 instructions on this processor is _____________ ns.\mathrm{ns}.
View worked solution

Answer: 2040

To find the total execution time for executing 100100 instructions on the given 33-stage pipelined processor, we proceed as follows:

1. Determine the Clock Cycle Time (tpt_p)

The clock cycle time of a pipelined processor is determined by the delay of the slowest stage plus any register/latch delay. Since there are no other delays (such as latch delays), we have:

tp=max⁡(Stage 1 delay,Stage 2 delay,Stage 3 delay)t_p = \max(\text{Stage 1 delay}, \text{Stage 2 delay}, \text{Stage 3 delay}) tp=max⁡(10 ns,20 ns,14 ns)=20 nst_p = \max(10\text{ ns}, 20\text{ ns}, 14\text{ ns}) = 20\text{ ns}

2. Calculate the Total Execution Time

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

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

Given:

  • Number of stages, k=3k = 3
  • Number of instructions, n=100n = 100
Total Cycles=3+(100−1)=102 cycles\text{Total Cycles} = 3 + (100 - 1) = 102\text{ cycles}

Now, calculate the total execution time (TT):

T=Total Cycles×tpT = \text{Total Cycles} \times t_p T=102×20 ns=2040 nsT = 102 \times 20\text{ ns} = 2040\text{ ns}

Thus, the total execution time is 2040 ns.

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

Published
Report a correction
Keep exploringMore Instruction Pipelining questions