GateAI
Instruction Pipelining

GATE CSE 2024 Set 2 · Q58

NAT2 marksMedium

Time

A non-pipelined instruction execution unit operating at 2 GHz takes an average of 6 cycles to execute an instruction of a program P. The unit is then redesigned to operate on a 5-stage pipeline at 2 GHz. Assume that the ideal throughput of the pipelined unit is 1 instruction per cycle. In the execution of program P, 20% instructions incur an average of 2 cycles stall due to data hazards and 20% instructions incur an average of 3 cycles stall due to control hazards. The speedup (rounded off to one decimal place) obtained by the pipelined design over the non-pipelined design is ________

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 3 (±0.1) (±0.1)

Instruction Pipelining

To calculate the speedup obtained by the pipelined design over the non-pipelined design:

  1. Non-pipelined Processor:

    • Average cycles per instruction: CPInon-pipe=6\text{CPI}_{\text{non-pipe}} = 6

    • Clock frequency: f=2 GHzf = 2\text{ GHz}

    • Average execution time per instruction:

      ETnon-pipe=CPInon-pipef=62 GHz\text{ET}_{\text{non-pipe}} = \frac{\text{CPI}_{\text{non-pipe}}}{f} = \frac{6}{2\text{ GHz}}
  2. Pipelined Processor:

    • Ideal CPI=1\text{CPI} = 1

    • Stalls due to data hazards = 20%×2=0.20×2=0.4 cycles/instruction20\% \times 2 = 0.20 \times 2 = 0.4\text{ cycles/instruction}

    • Stalls due to control hazards = 20%×3=0.20×3=0.6 cycles/instruction20\% \times 3 = 0.20 \times 3 = 0.6\text{ cycles/instruction}

    • Average CPIpipe=1+0.4+0.6=2.0\text{CPI}_{\text{pipe}} = 1 + 0.4 + 0.6 = 2.0

    • Average execution time per instruction:

      ETpipe=CPIpipef=2.02 GHz\text{ET}_{\text{pipe}} = \frac{\text{CPI}_{\text{pipe}}}{f} = \frac{2.0}{2\text{ GHz}}
  3. Speedup:

    Speedup=ETnon-pipeETpipe=CPInon-pipeCPIpipe=62.0=3.0\text{Speedup} = \frac{\text{ET}_{\text{non-pipe}}}{\text{ET}_{\text{pipe}}} = \frac{\text{CPI}_{\text{non-pipe}}}{\text{CPI}_{\text{pipe}}} = \frac{6}{2.0} = 3.0

Thus, the speedup is 3.0 (acceptable range: 2.9 to 3.1).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Instruction Pipelining previous year question is Q58 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Instruction Pipelining in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Instruction Pipelining PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Instruction Pipelining in GATE CSE

Instruction Pipelining has 25 GATE CSE PYQs across 20 papers from 2011 to 2026. 16 of them are 2-mark NAT questions like this one, and GATE CSE 2024 Set 2 has 2.

How GATE tests Instruction Pipelining

More from GATE CSE 2024 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 2 · Q58 · NAT

A non-pipelined instruction execution unit operating at 2 GHz takes an average of 6 cycles to execute an instruction of a program P. The unit is then redesigned to operate on a 5-stage pipeline at 2 GHz. Assume that the ideal throughput of the pipelined unit is 1 instruction per cycle. In the execution of program P, 20% instructions incur an average of 2 cycles stall due to data hazards and 20% instructions incur an average of 3 cycles stall due to control hazards. The speedup (rounded off to one decimal place) obtained by the pipelined design over the non-pipelined design is …

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.