pipelinehazards
Pipeline hazards refer to conditions that prevent a processor’s instruction pipeline from delivering a steady stream of results. They occur when the execution of one instruction cannot proceed to the next stage in the usual order because of dependencies, resource conflicts, or changes in control flow. Hazards can reduce instruction throughput and increase latency if not managed.
Data hazards arise when instructions depend on the results of earlier instructions that are not yet available.
Control hazards occur when the pipeline fetches instructions without knowing whether a branch will be taken.
Structural hazards happen when two instructions simultaneously require the same hardware resource, such as a single
Modern CPUs often use out-of-order execution, deep pipelines, and sophisticated prediction and buffering to mask hazards.