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.
- A. I, II and III only
- B. II, III and IV only
- C. I and III only
- 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.
Practise more Computer Organization and Architecture questionsComputer Organization and Architecture: notes and key points
More Computer Organization and Architecture questions
- A 6-stage pipeline has stage delays 120, 180, 150, 210, 90 and 160 ps with a 30 ps latch after each stage; the unpipelined machine takes…
- A nested loop's inner back-edge branch has the outcome pattern T T T T N (the inner loop runs 5 times) for each of 4 outer iterations (20…
- The expression a − (b − (c − (d − e))) is evaluated by a stack machine in which a binary operator takes the left operand from the…
- A 128-byte, 2-way set-associative cache with 16-byte blocks and LRU replacement is empty. The processor reads these byte addresses in…
- A process maps 100 separate regions, each 1 MB + 4 KB long and each starting on a 2 MB boundary (1 MB = 1024 KB). With 4 KB pages, how…
- A 48-bit virtual address space uses 4 KB pages and a 4-level page table in which every table is one 4 KB page of 512 eight-byte entries (9…