• retagged by
35,607 views
74 74 votes

Which of the following are NOT true in a pipelined processor?

  1. Bypassing can handle all RAW hazards
  2. Register renaming can eliminate all register carried WAR hazards
  3. Control hazard penalties can be eliminated by dynamic branch prediction
  1. I and II only
  2. I and III only
  3. II and III only 
  4. I, II and III

4 Answers

Best answer
128 128 votes
(B) I and III

I - False    Bypassing can't handle all RAW hazard, consider when any instruction depends on the result of LOAD instruction, now LOAD updates register value at Memory Access Stage (MA), so data will not be available directly on Execute stage.

II - True, register renaming can eliminate all WAR Hazard.

III- False, It cannot completely eliminate, though it can reduce Control Hazard Penalties
• selected by
15 15 votes

Bypassing (also called forwarding) cannot handle all RAW (Read After Write) hazards.

Let’s explain clearly:


What is a RAW hazard?

A Read After Write (RAW) hazard occurs when an instruction needs to read a value from a register before a previous instruction has written its result to that register.

Example:

1. ADD R1, R2, R3   ; R1 = R2 + R3
2. SUB R4, R1, R5   ; R4 = R1 - R5   ← Needs result of previous instruction

What is bypassing/forwarding?

Bypassing means taking the output of an instruction directly from a pipeline stage (like EX or MEM), before it is written back to the register file, and sending it to the next instruction that needs it.


Bypassing can handle:

  • Most RAW hazards where the value is needed in EX stage and is available from the previous instruction’s EX/MEM/WB stages.

For example:

1. ADD R1, R2, R3   ; EX stage produces R1
2. SUB R4, R1, R5   ; Needs R1 in EX → Forward from EX/MEM

This can be handled by forwarding.


 Bypassing cannot handle:

  • Cases where the consumer instruction is too close, and the producer hasn’t computed the result yet.

Example with load-use hazard:

1. LW  R1, 0(R2)    ; R1 gets data from memory (available in MEM stage)
2. ADD R3, R1, R4   ; Needs R1 in EX stage

Here, R1 is not ready in time for instruction 2’s EX stage, because the load instruction gets data only at the end of MEM.

Even with bypassing, the second instruction must be stalled for one cycle.


Conclusion:

  • Bypassing can handle most RAW hazards.

  • But not all — especially load-use hazards need stalls.

1 1 vote

The correct answer is: II and III only

Explanation:

I. Bypassing can handle all RAW hazards:

  • True. Bypassing (also known as data forwarding) is a technique in pipelined processors to mitigate data hazards. It allows the result of an instruction in a later stage of the pipeline to be directly forwarded to an earlier stage that needs that result. This helps in handling Read-After-Write (RAW) hazards and improving pipeline efficiency.

II. Register renaming can eliminate all register-carried WAR hazards:

  • False. Register renaming helps in eliminating Write-After-Read (WAR) hazards, not Register-Carried Write-After-Read (WAR) hazards. Register renaming is a technique that assigns multiple physical registers to a single architectural register to allow independent execution of instructions, preventing write-after-read hazards. However, it does not eliminate all register-carried WAR hazards.

III. Control hazard penalties can be eliminated by dynamic branch prediction:

  • False. While dynamic branch prediction can significantly reduce the impact of control hazards, it cannot eliminate all control hazards. Dynamic branch prediction techniques aim to predict the outcome of branches and speculatively execute instructions based on those predictions. However, mispredictions can still occur, leading to control hazard penalties.

Therefore, the correct answer is "II and III only."

 

 

 

 

3 flags:
✌ Edit necessary (js__)
✌ Edit necessary (vxi lin)
✌ Low quality (ShivankXD)
Answer:
Position:
Show:

Related questions

197 197 votes
9 answers 9 answers
77.9k
77.9k views
Kathleen asked Sep 22, 2014
77,947 views
A $5$ stage pipelined CPU has the following sequence of stages:IF – instruction fetch from instruction memoryRD – Instruction decode and register readEX – Execute: ALU op...
79 79 votes
7 answers 7 answers
26.5k
26.5k views
go_editor asked Apr 23, 2016
26,537 views
Delayed branching can help in the handling of control hazardsThe following code is to run on a pipelined processor with one branch delay slot:I1: ADD $R2 \leftarrow R7 + ...
94 94 votes
5 answers 5 answers
29.3k
29.3k views
Kathleen asked Sep 12, 2014
29,347 views
Delayed branching can help in the handling of control hazardsFor all delayed conditional branch instructions, irrespective of whether the condition evaluates to true or f...
78 78 votes
11 answers 11 answers
33.7k
33.7k views
go_editor asked Sep 28, 2014
33,674 views
Consider a $6$-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is exec...