GateAI
Instruction Pipelining

GATE CSE 2017 Set 1 · Q50

NAT2 marksMedium

Time

Instruction execution in a processor is divided into 5 stages, Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Execute (EX), and Write Back (WB). These stages take 5, 4, 20, 10, and 3 nanoseconds (ns) respectively. A pipelined implementation of the processor requires buffering between each pair of consecutive stages with a delay of 2 ns. Two pipelined implementations of the processor are contemplated: (i) a naive pipeline implementation (NP) with 5 stages and (ii) an efficient pipeline (EP) where the OF stage is divided into stages OF1 and OF2 with execution times of 12 ns and 8 ns respectively. The speedup (correct to two decimal places) achieved by EP over NP in executing 20 independent instructions with no hazards is _________.

Your answerNumerical answer

Enter a value to check

Solution

Step-by-step verified solution

Official answer: 1.51 (±0.02) (±0.02)

Instruction Pipelining

To find the speedup achieved by the Efficient Pipeline (EP) over the Naive Pipeline (NP) for n=20n = 20 instructions:

### 1. Naive Pipeline (NP):

  • Number of stages, kNP=5k_{NP} = 5 (IF, ID, OF, EX, WB) with delays 5, 4, 20, 10, 3 ns respectively.

  • Buffer delay =2 ns= 2\text{ ns}.

  • Clock cycle time, tNP=max⁡(5,4,20,10,3)+2=20+2=22 nst_{NP} = \max(5, 4, 20, 10, 3) + 2 = 20 + 2 = 22\text{ ns}.

  • Total execution time for n=20n = 20 instructions:

TNP=(kNP+n−1)×tNP=(5+20−1)×22=24×22=528 nsT_{NP} = (k_{NP} + n - 1) \times t_{NP} = (5 + 20 - 1) \times 22 = 24 \times 22 = 528\text{ ns}

### 2. Efficient Pipeline (EP):

  • Number of stages, kEP=6k_{EP} = 6 (IF, ID, OF1, OF2, EX, WB) with delays 5, 4, 12, 8, 10, 3 ns respectively.

  • Buffer delay =2 ns= 2\text{ ns}.

  • Clock cycle time, tEP=max⁡(5,4,12,8,10,3)+2=12+2=14 nst_{EP} = \max(5, 4, 12, 8, 10, 3) + 2 = 12 + 2 = 14\text{ ns}.

  • Total execution time for n=20n = 20 instructions:

TEP=(kEP+n−1)×tEP=(6+20−1)×14=25×14=350 nsT_{EP} = (k_{EP} + n - 1) \times t_{EP} = (6 + 20 - 1) \times 14 = 25 \times 14 = 350\text{ ns}

### 3. Speedup:

Speedup=TNPTEP=528350≈1.50857≈1.51\text{Speedup} = \frac{T_{NP}}{T_{EP}} = \frac{528}{350} \approx 1.50857 \approx 1.51

Thus, the speedup achieved is 1.51 (acceptable range: 1.49 to 1.52).

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 Q50 of the GATE CSE 2017 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 it is the only one in GATE CSE 2017 Set 1.

How GATE tests Instruction Pipelining

More from GATE CSE 2017 Set 1

Share this solution

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

GateAI solution cardGATE CSE 2017 Set 1 · Q50 · NAT

Instruction execution in a processor is divided into 5 stages, Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Execute (EX), and Write Back (WB). These stages take 5, 4, 20, 10, and 3 nanoseconds (ns) respectively. A pipelined implementation of the processor requires buffering between each pair of consecutive stages with a delay of 2 ns. Two pipelined implementations of the processor are contemplated: (i) a naive pipeline implementation (NP) with 5 stages and (ii) an efficient pipeline (EP) where the OF stage is divided into stages OF1 and OF2 with execution times of 12 ns and 8 ns respectively. The speedup (correct to two decimal places) achieved by EP over NP in executing 20 independent instructions with no hazards 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.