Exams › GATE › Technical
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?
- There is a RAW dependency on R3 between I1 and I2
- There is a WAR dependency on R3 between I1 and I3
- There is a RAW dependency on R3 between I2 and I3
- There is a WAW dependency on R3 between I3 and I4
Correct answer: There is a RAW dependency on R3 between I1 and I2
Solution
I1 writes R3, and I2 reads R3 as its source operand, so there is a read-after-write (RAW) dependency between I1 and I2. The other options do not match the register usage pattern in the sequence.
Related GATE Technical questions
- Consider the following representation of a number in IEEE 754 single-precision floating-point format with a bias of 127: S: 1 E: 10000001 F: 11100000000000000000000 Here S, E, and F denote the sign, exponent, and fraction components of the floating-point representation. The above representation, rounded to 2 decimal places, is
- Which one of the following statements is false?
- Consider two set-associative cache memory architectures: WBC, which uses the write-back policy, and WTC, which uses the write-through policy. Both use the LRU (Least Recently Used) block replacement policy. The cache memory is connected to main memory. Which of the following statements is/are TRUE?
- Suppose a program is running on a non-pipelined single-processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR) to serve this interrupt. The following steps, not necessarily in order, are taken by the processor when the interrupt arrives: (i) The processor saves the content of the program counter. (ii) The program counter is loaded with the start address of the ISR. (iii) The processor finishes the present instruction. Which ONE of the following is the correct sequence of steps?
- The number $-6$ can be represented as $1010$ in 4-bit 2’s complement representation. Which of the following is/are CORRECT 2’s complement representation(s) of $-6$?
- A partial datapath of a processor is given in the figure, where RA, RB, and RZ are 32-bit registers. Which option(s) is/are CORRECT related to arithmetic operations using the datapath as shown?
⚔️ Practice GATE Technical free + battle 1v1 →