GATE Computer ScienceHardGATE CS (PYQ pattern)

Consider a classic in-order 5-stage pipeline in which registers are read in ID, written in WB, and every instruction passes through all five stages in order. Which of the following statements are correct? I. A RAW hazard between adjacent instructions can still cost a stall even with full forwarding. II. A WAR hazard can occur between two instructions. III. A load immediately followed by an instruction using its result still needs one stall even with forwarding. IV. A WAW hazard can occur between two instructions.

  1. A. I, II and III only
  2. B. II, III and IV only
  3. C. I and III only
  4. D. I and II only

Correct answer: C. I and III only

RAW hazards can force a stall (load-use) even with forwarding, so I and III are true. Since reads occur early (ID) and writes late (WB) in a single in-order path, a later instruction can never write before an earlier one reads or writes: WAR and WAW cannot occur.

More Computer Organization and Architecture questions

Exams that ask this topic