+1 vote

Rt denotes destination register and Rs denotes source register.


An instruction pipeline consists of 5 stages Instruction Fetch(IF), Instruction Decode(ID), Execute(EX), Memory(MEM) and Register Write(RW).

Which of the following hazard is detected by the above code fragment?

(A) Control hazard

(B) Data hazard

(C) Structural hazard

(D) Reordering hazard

asked Jun 12 in Computer Organization by gbmentor (7,990 points)
reshown Jun 13 by gbmentor

2 Answers

0 votes
Best answer
Data hazard is the correct answer.

If there is a  memory read and the destination register is used either as source or destination by next instruction then it will be detected by this code.
This is detecting data hazard.
answered 6 days ago by getgatebook (22,170 points)
selected 6 days ago by getgatebook
0 votes
I think b but not sure
answered Jun 13 by tsnikhilsharmagate2018 (7,480 points)