How can we avoid hazards

How can we avoid hazards?

E

Expert

Verified

Structural Hazard takes place if some functional unit is not completely pipelined. Then the series of instructions using which un-pipelined unit can’t carry on at the rate of one per clock cycle. Any other ordinary way which it might emerge is when some resources are not duplicated enough to permit all combination of instructional the pipeline to implement. So by completely pipe lining the stages and duplicating resources will shun structural pipeline.

Data Hazards: A main result of pipelining is to alter the relative timing of instructions through overlapping their implementation. This overlap brings the data and control hazards. Data hazards take place when the pipeline modifies the order of read or write accesses to operands so that the order varies from the order seen by sequentially implementing instructions on an un-pipelined processor. It can be minimized through easy hardware method called forwarding or through adding stalls.

Control Hazards: They are as well named as Branch Hazards. The simplest method to switch branches hazard is to flush or freeze the pipeline, holding or deleting any instructions after the branch till the branch destination is known. In this case branch penalty is fixed and can’t be lessened by software. The other method is predicted-untaken or predicted not taken and delayed branch.

   Related Questions in Computer Engineering

©TutorsGlobe All rights reserved 2022-2023.