CPUs and architecture
In a pipeline, when the next instruction immediately uses the result of the previous one (a data hazard), which technique passes the result directly to the next instruction without waiting for it to be written to the register?
- AForwarding (bypassing)
- BVirtual memory
- CBranch prediction
Show answer and explanation
Answer: A. Forwarding (bypassing)
Forwarding (bypassing) routes the ALU output directly to the input of the following instruction without waiting for it to be written to the register file. It reduces pipeline stalls caused by data hazards. Branch prediction addresses control hazards caused by branches.
- A. Correct. The result is routed directly to the next instruction.
- B. Virtual memory manages address spaces and is not a hazard countermeasure.
- C. Branch prediction addresses control hazards from branches.