GateAI
Instruction Pipelining

GATE CSE 2026 Set 1 · Q60

NAT2 marksMedium

Time

The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic instructions. Let tEXt_{EX} denote the time taken by the EX stage to perform the operation for an instruction. For each instruction type, the values of tEXt_{EX} and MM (the number of instructions of that type in a sequence of 100 instructions for a program P), are given in the table below. The duration of the pipeline clock cycle is 1 nanosecond. Assume that the latch time for the interstage buffers in the pipeline is negligible. When program P is executed, the number of clock cycles for which the pipeline is stalled due to structural hazards in the EX stage is ________. (answer in integer)

GATE CSE 2026 Set 1 Q60 diagram

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 95

Instruction Pipelining

Since the clock cycle duration is 1 ns1\text{ ns}, an instruction requiring tEXt_{EX} nanoseconds in the EX stage takes ⌈tEX/1 ns⌉=⌈tEX⌉\lceil t_{EX} / 1\text{ ns} \rceil = \lceil t_{EX} \rceil clock cycles.

Whenever an instruction occupies the EX stage for k>1k > 1 cycles, the subsequent instruction cannot enter the EX stage for k−1k - 1 cycles, leading to k−1k - 1 stall cycles per instruction due to structural hazard.

Calculating stalls for each instruction type:

  1. LOAD: tEX=1.8 ns  ⟹  ⌈1.8⌉=2t_{EX} = 1.8\text{ ns} \implies \lceil 1.8 \rceil = 2 cycles   ⟹  2−1=1\implies 2 - 1 = 1 stall cycle.

    Stalls=15×1=15\text{Stalls} = 15 \times 1 = 15
  2. IMUL: tEX=1.5 ns  ⟹  ⌈1.5⌉=2t_{EX} = 1.5\text{ ns} \implies \lceil 1.5 \rceil = 2 cycles   ⟹  2−1=1\implies 2 - 1 = 1 stall cycle.

    Stalls=10×1=10\text{Stalls} = 10 \times 1 = 10
  3. IDIV: tEX=2.5 ns  ⟹  ⌈2.5⌉=3t_{EX} = 2.5\text{ ns} \implies \lceil 2.5 \rceil = 3 cycles   ⟹  3−1=2\implies 3 - 1 = 2 stall cycles.

    Stalls=5×2=10\text{Stalls} = 5 \times 2 = 10
  4. FADD: tEX=1.7 ns  ⟹  ⌈1.7⌉=2t_{EX} = 1.7\text{ ns} \implies \lceil 1.7 \rceil = 2 cycles   ⟹  2−1=1\implies 2 - 1 = 1 stall cycle.

    Stalls=10×1=10\text{Stalls} = 10 \times 1 = 10
  5. FSUB: tEX=1.7 ns  ⟹  ⌈1.7⌉=2t_{EX} = 1.7\text{ ns} \implies \lceil 1.7 \rceil = 2 cycles   ⟹  2−1=1\implies 2 - 1 = 1 stall cycle.

    Stalls=5×1=5\text{Stalls} = 5 \times 1 = 5
  6. FMUL: tEX=2.8 ns  ⟹  ⌈2.8⌉=3t_{EX} = 2.8\text{ ns} \implies \lceil 2.8 \rceil = 3 cycles   ⟹  3−1=2\implies 3 - 1 = 2 stall cycles.

    Stalls=15×2=30\text{Stalls} = 15 \times 2 = 30
  7. FDIV: tEX=3.2 ns  ⟹  ⌈3.2⌉=4t_{EX} = 3.2\text{ ns} \implies \lceil 3.2 \rceil = 4 cycles   ⟹  4−1=3\implies 4 - 1 = 3 stall cycles.

    Stalls=5×3=15\text{Stalls} = 5 \times 3 = 15
  8. All other instructions: tEX<1.0 ns  ⟹  1t_{EX} < 1.0\text{ ns} \implies 1 cycle   ⟹  0\implies 0 stall cycles.

    Stalls=35×0=0\text{Stalls} = 35 \times 0 = 0

Summing all stall cycles:

Total stall cycles=15+10+10+10+5+30+15+0=95\text{Total stall cycles} = 15 + 10 + 10 + 10 + 5 + 30 + 15 + 0 = 95

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 Q60 of the GATE CSE 2026 Set 1 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 2026 Set 1 has 2.

How GATE tests Instruction Pipelining

More from GATE CSE 2026 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2026 Set 1 · Q60 · NAT

The EX stage of a pipelined processor performs the memory read operations for LOAD instructions, and the operations for the arithmetic and logic instructions. Let tEX denote the time taken by the EX stage to perform the operation for an instruction. For each instruction type, the values of tEX and M (the number of instructions of that type in a sequence of 100 instructions for a program P), are given in the table below. The duration of the pipeline clock cycle is 1 nanosecond. Assume that the latch time for the interstage buffers in the pipeline is negligible. When program P is executed, the number of clock cycles for which the pipeline is stalled due to structural hazards in the EX stage is … (answer in integer)

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.