It is important to note that pipeline hazards in computer architecture refer to situations where a pipelined machine experiences some form of impediment on a subsequent instruction execution. The major pipeline types are categorized as structural, data-based, and control-based, which correspondingly create hazards such as structural hazards, data hazards, and control hazards. In computer architecture, it is critical to be able to distinguish between different pipeline types and their hazards in order to address them effectively.
Firstly, the structural hazard is a result of an overlapped pipelined execution coming from more than one instruction. It is stated that it arises when “hardware cannot support certain combinations of instructions (two instructions in the pipeline require the same resource)” (Shanti, 2022, para. 5). In other words, it is a demand for the limited resource by several instructions, which can be addressed by adding more hardware or replicating the resource. Secondly, the data hazards take place when an “instruction depends on the result of prior instruction still in the pipeline” (Shanti, 2022, para. 5). Thus, the results of an instruction become a necessary input for another subsequent instruction down the line, creating the dependency. Thirdly, the control hazards are “caused by the delay between the fetching of instructions and decisions about changes in control flow (branches and jumps)” (Shanti, 2022, para. 5). Therefore, branch instructions are the primary reasons for these types of pipeline hazards to emerge.
In conclusion, it is important to be able to distinguish between different pipeline types and their hazards in order to address them effectively, which include control hazards, data hazards, and structural hazards. The latter arises when several instructions demand one resource simultaneously, whereas data hazards are the result of the dependency of one instruction on the execution of another. It should be noted that control hazards are mainly attributable to branch instructions.
Reference
Shanti, A. P. (2022). Pipeline hazards. In R. Parthasarathi (Ed.), Computer architecture: Engineering and technology (pp. 11-12). Creative Commons Attribution Non-Commercial. Web.