Pipeline Hazard Interview Questions (Part 3)
Hazards are where pipelining interviews get serious — this is the round that separates candidates who memorized definitions from those who understand out-of-order execution. RAW, WAR, WAW, structural and control hazards, scoreboarding, and Tomasulo's algorithm, explained with examples.
Intro Why This Guide
Pipeline hazards are the single most tested topic in computer architecture interviews for RTL, DV, and physical design roles — and for good reason. Understanding RAW, WAR, and WAW hazards, and how a processor resolves them, is directly relevant to writing correct, high-performance hardware and to verifying that it behaves correctly under every corner case.
This is Part 3 of our five-part series. It covers the 25 questions asked most often about hazards: the three classic data hazards, load-use stalls, structural and control hazards, register renaming, scoreboarding, Tomasulo's algorithm, and how out-of-order processors track dependencies without violating program correctness.
If you're interviewing for a verification role in particular, expect this section to be probed the hardest — hazard handling logic is exactly the kind of design that UVM testbenches and scoreboards are built to verify.
Context Why These Questions Are Asked in Interviews
Hazard questions test whether you understand data dependencies at an instruction level — the same reasoning used to design and verify forwarding paths, scoreboards, and out-of-order execution logic in real processors.
For verification roles specifically, these questions map almost one-to-one onto the kind of corner cases a UVM testbench needs to generate and check — which is why interviewers spend extra time here.
How to use this list
Use the search box below to jump to a specific question, or expand every answer at once to read through the whole section. Tap any question to reveal its full answer.
25 questions
Q66–Q71 Data Hazards — RAW, WAR & WAW
Q66 What is a data hazard? ▸
Q67 Explain Read After Write (RAW) hazard with an example. ▸
Q68 Explain Write After Read (WAR) hazard with an example. ▸
Q69 Explain Write After Write (WAW) hazard with an example. ▸
Q70 What is a load-use hazard? ▸
Q71 How does forwarding (bypassing) resolve data hazards? ▸
Q72–Q79 Structural & Control Hazards, Dependencies
Q72 What is a structural hazard? ▸
Q73 What is a control hazard? ▸
Q74 How can structural hazards be resolved? ▸
Q75 What is register renaming and how does it eliminate hazards? ▸
Q76 What is a data dependency graph? ▸
Q77 What happens when a data hazard is not handled? ▸
Q78 How does the compiler help avoid pipeline hazards? ▸
Q79 What is the difference between true dependency and name dependency? ▸
Q80–Q86 Scoreboarding, Tomasulo & Out-of-Order Execution
Q80 What is a scoreboard and how does it handle hazards? ▸
Q81 What is Tomasulo's algorithm? ▸
Q82 What is the Common Data Bus (CDB) in Tomasulo's algorithm? ▸
Q83 How does out-of-order execution handle data hazards? ▸
Q84 What is the difference between a stall and a flush for handling hazards? ▸
Q85 How do memory hazards differ from register hazards? ▸
Q86 What is a pipeline interlock mechanism? ▸
Q87–Q90 CPI Components & Memory-Level Parallelism
Q87 What are the three components of CPI in a pipelined processor? ▸
Q88 What is a load-store queue and how does it handle memory hazards? ▸
Q89 What is false sharing and how does it cause performance issues? ▸
Q90 What is memory-level parallelism (MLP)? ▸
Prep Tips for Freshers & Experienced Engineers
For Freshers
- Learn RAW, WAR, and WAW with a simple two-instruction example for each — interviewers will almost always ask you to write one on the spot.
- Understand that WAR and WAW hazards only occur in out-of-order or multi-stage-write pipelines, not in a simple in-order five-stage pipeline — this distinction is a common trick question.
- Be able to explain forwarding/bypassing as the primary hardware technique for resolving RAW hazards without stalling.
For Experienced Engineers
- Be ready to compare scoreboarding and Tomasulo's algorithm in detail — including why Tomasulo's approach (register renaming + common data bus) scales better for out-of-order execution.
- If you have verification experience, be prepared to discuss how you'd construct test scenarios to catch hazard-handling bugs in an out-of-order design.
- Interviewers may push into memory hazards and load-store queues — know how these differ from register hazards, since memory disambiguation is a frequent senior-level topic.
Avoid Common Mistakes
- Mixing up RAW with WAR — RAW is a true dependency (read must wait for a prior write), while WAR is a name dependency that only matters in out-of-order pipelines.
- Saying hazards can always be fully eliminated — in reality they're detected and resolved (via stalls, forwarding, or renaming), not eliminated from the ISA.
- Not knowing the difference between a stall and a flush when explaining hazard resolution — this comes up again here in the context of control hazards.
- Treating scoreboarding and Tomasulo's algorithm as interchangeable — they solve the same problem with meaningfully different mechanisms.
FAQ Frequently Asked Questions
Which hazard type is asked about most in interviews?
Do I need to know Tomasulo's algorithm in full detail for a fresher interview?
Are hazard questions different for DV (verification) roles vs RTL design roles?
What's the difference between a data hazard and a memory hazard?
Wrap-up Conclusion
Hazards are where architecture interviews test real understanding, not memorization — RAW, WAR, WAW, structural and control hazards, and the mechanisms (forwarding, scoreboarding, Tomasulo's algorithm) that resolve them. With this foundation, you're ready for Part 4, where we cover branch prediction — the technique modern processors use to keep the pipeline full despite control hazards.
Ready for the next round?
Keep the momentum going — work through all five parts back to back, or jump straight to the topic your next interview is focused on.
Part 4: Continue Learning
Comments
Post a Comment