CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

For a pipelined CPU with a single ALU, consider the following situations

1. The j+1st instruction uses the result of the jth instruction as an operand

2. The execution of a conditional jump instruction

3. The jth and j+1st instructions require the ALU at the same time

Which of the above can cause a hazard?

A
1 and 2 only
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
B
All the three
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
3 only
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
D
2 and 3 only
No worries! Weā€˜ve got your back. Try BYJUā€˜S free classes today!
Open in App
Solution

The correct option is B All the three
(i) The j+1st instruction uses the result of the jth instruction as an operand then read-after-write (RAW) hazard occurs. It is a part of data dependency.

(ii) The execution of a conditional jump instruction causes a flushing so conditional dependency occurs.

(iii) The jth and j+1st instructions require the ALU at the same time causes write-after-read (WAR) hazard.

flag
Suggest Corrections
thumbs-up
1
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Consequences of the Mutiny
HISTORY
Watch in App
Join BYJU'S Learning Program
CrossIcon