GateAI
Instruction Pipelining

GATE CSE 2024 Set 2 · Q31

MSQ1 markEasy

Time

An instruction format has the following structure: Instruction Number: Opcode destination reg, source reg-1, source reg-2 Consider the following sequence of instructions to be executed in a pipelined processor: I1: DIV R3, R1, R2I2: SUB R5, R3, R4I3: ADD R3, R5, R6I4: MUL R7, R3, R8 Which of the following statements is/are TRUE?

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: A) There is a RAW dependency on R3 between I1 and I2

Instruction Pipelining

Let us analyze the read and write sets for each instruction based on the given format (Opcode dest,src1,src2\text{Opcode } \text{dest}, \text{src1}, \text{src2}):

  • I1\text{I1}: Writes to R3\text{R3}, Reads from {R1,R2}\{\text{R1}, \text{R2}\}

  • I2\text{I2}: Writes to R5\text{R5}, Reads from {R3,R4}\{\text{R3}, \text{R4}\}

  • I3\text{I3}: Writes to R3\text{R3}, Reads from {R5,R6}\{\text{R5}, \text{R6}\}

  • I4\text{I4}: Writes to R7\text{R7}, Reads from {R3,R8}\{\text{R3}, \text{R8}\}

Now, evaluating each given option:

  • (A) I1\text{I1} writes to R3\text{R3} and I2\text{I2} reads from R3\text{R3}. Since I1\text{I1} precedes I2\text{I2}, this is a Read-After-Write (RAW) data dependency on R3\text{R3}. Thus, statement (A) is TRUE.

  • (B) I1\text{I1} writes to R3\text{R3} and I3\text{I3} writes to R3\text{R3}. This is a Write-After-Write (WAW) dependency, not a WAR dependency. Thus, statement (B) is FALSE.

  • (C) I2\text{I2} reads from R3\text{R3} and I3\text{I3} writes to R3\text{R3}. Since the read occurs before the write, this is a Write-After-Read (WAR) dependency, not RAW. Thus, statement (C) is FALSE.

  • (D) I3\text{I3} writes to R3\text{R3} and I4\text{I4} reads from R3\text{R3}. This is a Read-After-Write (RAW) dependency, not WAW. Thus, statement (D) is FALSE.

Hence, only statement (A) is correct.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Instruction Pipelining previous year question is Q31 of the GATE CSE 2024 Set 2 paper. Find more GATE CSE PYQs on Instruction Pipelining in Computer Organization and Architecture, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Instruction Pipelining PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Instruction Pipelining in GATE CSE

Instruction Pipelining has 25 GATE CSE PYQs across 20 papers from 2011 to 2026. 2 of them are 1-mark MSQs like this one, and GATE CSE 2024 Set 2 has 2.

How GATE tests Instruction Pipelining

More from GATE CSE 2024 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2024 Set 2 · Q31 · MSQ

An instruction format has the following structure: Instruction Number: Opcode destination reg, source reg-1, source reg-2 Consider the following sequence of instructions to be executed in a pipelined processor: I1: DIV R3, R1, R2 I2: SUB R5, R3, R4 I3: ADD R3, R5, R6 I4: MUL R7, R3, R8 Which of the following statements is/are TRUE?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.