GATE CS 2024 Set 2 | Question 31

Computer Organization & Architecture › Pipelining · MSQ · 1 mark · Answer: A

  1. Question 31Computer Organization & Architecturemsq1 mark
    Instructions: I1: DIV R3,R1,R2; I2: SUB R5,R3,R4; I3: ADD R3,R5,R6; I4: MUL R7,R3,R8. Which dependencies hold?
    • A.
      RAW on R3 between I1 and I2
      ✓
    • B.
      WAR on R3 between I1 and I3
    • C.
      RAW on R3 between I2 and I3
    • D.
      WAW on R3 between I3 and I4

    Answer: A

    Solution

    Answer: (A) I1: DIV R3,... I2: SUB R5,R3,... I3: ADD R3,... I4: MUL R7,R3,... - (A) I1 writes R3, I2 reads R3 -> Read-After-Write on R3 between I1 and I2. TRUE. - (B) A WAR needs an earlier READ then a later WRITE; I1 does not read R3, so there is no WAR between I1 and I3 (the actual WAR is between I2 and I3). FALSE. - (C) I2 reads R3 and I3 writes R3 - that is WAR, not RAW (RAW needs a write then a read, but I2 does not write R3). FALSE. - (D) I3 writes R3 and I4 only reads R3 - no WAW between them. FALSE. Only (A) holds.

More GATE PYQ on Pipelining

All GATE CS Computer Organization & Architecture PYQ →

Attempt GATE CS 2024 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →