Answer: Data hazards are the factor behind the damage/problem created in the data of the CPU . There are three types of data hazards which are as follows:-
By considering two element "A" and "B"
- RAW(Read after write)- If the element A tries to read the value before the element B has written it then element A will receive the previous value which is accordingly incorrect .
- WAR(Write after read)-Element B write a value for element A which not read by it.So, it incorrectly gets a new destination assigned.
- WAW(Write after write)-Element B tries to write the value for the element A before element A writes it, thus creating a hazard.