GATE / CS ARCHIVE

SIMILAR QUESTIONS / COMPUTER ORGANIZATION & ARCHITECTURE

Classify causes of pipeline hazards

2 questions solved the same way, newest first. Back to Computer Organization & Architecture

How these are solved

Evaluate each proposed pipeline condition for resource contention, operand dependency or control disruption. The 2002 question includes unequal stage delays in its performance question, whereas 2003 uses a conditional jump and a single ALU.

1 mark · MCQ
Report issue

Three pipeline hazard classes

Pipelining & Hazards

Question 10, GATE 2003: For a pipelined CPU with one ALU, consider I. Instruction j+1 uses instruction j’s result; II. A conditional jump executes; III. Instructions j and j+1 need the ALU simultaneously. Which can cause a hazard? A. I and II only; B. II and III only; C. III only; D. All three.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

1. A data hazard concerns operand availability, a control hazard concerns which instruction address to fetch, and a structural hazard concerns resource availability. These are separate reasons a pipeline may need a stall or other mitigation. A single ALU does not eliminate the data or control cases.

2. Using a preceding result can cause a data hazard; a conditional branch causes a control hazard; simultaneous demand for the single ALU causes a structural hazard. Therefore all three can cause hazards, D. The question asks possibility, not that every instance necessarily stalls.

Original paper, page 2

2 marks · MCQ
Report issue

Pipeline performance hazards

Pipelining & Hazards

Question 2.6, GATE 2002: Which condition harms pipelined-processor performance?
(A) Unequal stage delays; (B) Dependencies between consecutive instructions; (C) Shared hardware resources among stages; (D) All of these.
Question 2.6, GATE 2002: Which condition harms pipelined-processor performance?
(A) Unequal stage delays; (B) Dependencies between consecutive instructions; (C) Shared hardware resources among stages; (D) All of these.
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step 1: Separate three causes of lost pipeline throughput.

Step 2: Stage imbalance makes the clock period depend on the slowest stage. A dependence can make an instruction wait until its operand is available. A structural conflict occurs when two stages need one shared resource simultaneously. These are independent mechanisms, so an answer listing only one omits other valid possibilities.

Conclusion: Unequal stage delays leave faster stages waiting for the slowest. Data dependence can require stalls, and shared hardware can create structural conflicts. Each can reduce performance, so D. Suitable forwarding, scheduling or duplicated resources may mitigate particular cases, rather than making the hazards impossible.

Original paper, page 4