Question

Please explain in detail..... for an easy understanding1. Describe the following types of data hazards. R

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hazards are the problems associated with the CPU, there are different type of hazards depending on the operation by which it is caused...

1. RAW (Read After Write) :-
When instruction 2 tries to read the source before instruction 1 writes to it. This can occur because even though an instruction is executed after a prevoius instruction, the previous instruction has not been completely processed through the pipeline.

ex.

1. R2 <- R1 + R3
2. R4 <- R2 + R3

Here the first instruction is calculating a value to be saved in register R2 and second is going to use this value to compute a result for R4.

2. WAR (Write after Read) :-
In this type of hazard the instruction 2 tries to write destination before it is read by instruction 1.

ex.

1. R4 <- R1 + R5
2. R5 <- R1 + R2

Here concurrent execution may cause this hazard.

3. WAW (Write After Write) :-
In this type of hazad instruction 2 tries to write the source before the instruction 1 writes the result to the source.

ex.

1. R2 <- R4 + R7
2. R2 <- R1 + R3

Add a comment
Know the answer?
Add Answer to:
Please explain in detail..... for an easy understanding 1. Describe the following types of data hazards....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT