Dependency vs Hazards Last Updated : 12 Nov, 2025 Comments Improve Suggest changes Like Article Like Report In pipelined processors, dependencies indicate the order in which instructions must be executed because some instructions rely on the results of others. Hazards, on the other hand, are problems that occur due to these dependencies, potentially delaying or stalling the pipeline. In simple terms:Dependency defines the order of tasks.Hazard is the trouble that arises because of that order.Example 1: Is DATA Dependency Always Create RAW Hazards?→ May or may not→ Now RAW Hazards Concept Along with Data Dependencies.InstructionOperationDestinationSource 1Source 2I₁ADDr₀r₁r₂I₂MULr₃r₁₃r₄I₃DIVr₅r₁₄r₆I₄MULr₇r15r₈I₅ADDr₉r₀r₁₀I₆MULr₁₁r₀r₁₂Data Dependencies in this question:I₅ ← I₁I₆ ← I₁Explanation:Now in this question 2 there is a 2 Data Dependency b/w (I₅ ← I₁) & (I₆ ← I₁). Now check it creates RAW Hazards (Stalls) or not?RISC: 5 stage IF, ID, EX, MA, WB At CC5 (Clock cycle 5) we getting the value of Register R₀ of Instruction I₁.After CC5, if R₀ is need, then there is no Hazards (No stalls).Example 2: Data Dependency Creating RAW HazardExecution: one instruction in a normal pipeline manner.If there is a stall/bubble/extra cycle due to dependency, it creates stalls.InstructionOperationDestinationSource 1Source 2I₁ADDr₀r₁r₂I₂MULr3r0r₄Data Dependencies in this question:I₁ → I₂ (I₂ depends on result of I₁)RISC 5 Stage: IF, ID, EX, MA, WB Explanations:At CC3: I₂ read wrong value of r₀At CC4: I₂ read wrong value of r₀At CC5: I₂ read wrong value of r₀The correct value for r₀ becomes available only at the end of CC5 (after write-back of I₁).Hence, I₂ must be stalled for 3 cycles (inserting bubbles in the pipeline) until the correct value of r₀ is ready. Create Quiz Comment V vijaylcqkp Follow 0 Improve V vijaylcqkp Follow 0 Improve Article Tags : Computer Organization & Architecture Explore Basic Computer InstructionsWhat is a Computer? 6 min read Issues in Computer Design 1 min read Difference between assembly language and high level language 2 min read Addressing Modes in 8086 7 min read Difference between Memory based and Register based Addressing Modes 4 min read Von Neumann Architecture 5 min read Harvard Architecture 3 min read Interaction of a Program with Hardware 3 min read Simplified Instructional Computer (SIC) 4 min read Instruction Set used in simplified instructional Computer (SIC) 1 min read Instruction Set used in SIC/XE 2 min read RISC vs CISC 3 min read Vector processor classification 5 min read Essential Registers for Instruction Execution 3 min read Single Accumulator Based CPU Organization 3 min read Stack based CPU Organization 3 min read Machine Control Instructions in Microprocessor 4 min read Very Long Instruction Word (VLIW) Architecture 3 min read Input and Output SystemsPrimary Instruction Cycles 4 min read Machine Instructions 5 min read Instruction Formats 6 min read Difference between 2-address instruction and 1-address instructions 4 min read Difference between 3-address instruction and 0-address instruction 4 min read Register content and Flag status after Instructions 3 min read Debugging a machine level program 3 min read Vector Instruction Format in Vector Processors 7 min read Vector Instruction Types 4 min read Instruction Design and FormatALU Functions and Bus Organization 5 min read Computer Arithmetic | Set - 1 5 min read Computer Arithmetic | Set - 2 4 min read 1's Complement Representation vs 2's Complement Representation 4 min read Restoring Division Algorithm For Unsigned Integer 4 min read Non-Restoring Division For Unsigned Integer 3 min read Booth's Algorithm 4 min read How the Negative Numbers are Stored in Memory? 2 min read Microprogrammed ControlMicro-Operation 3 min read Instruction Set Architecture and Microarchitecture 3 min read Program Control Instructions 4 min read Difference between CALL and JUMP instructions 5 min read Hardwired and Micro-programmed Control Unit 3 min read Implementation of Micro Instructions Sequencer 4 min read Performance of Computer in Computer Organization 5 min read Introduction to Control Unit and its Design 5 min read Computer Organization | Amdahl's law and its proof 2 min read Subroutine: Nesting and Stack memory 3 min read Different Types of RAM (Random Access Memory ) 8 min read Random Access Memory (RAM) and Read Only Memory (ROM) 8 min read 2D and 2.5D Memory organization 4 min read Input and Output OrganizationPriority Interrupts 5 min read I/O Interface (Interrupt and DMA Mode) 4 min read DMA Controller 8257/8237 2 min read Computer Organization | Asynchronous input output synchronization 7 min read Programmable peripheral interface 8255 4 min read Synchronous Data Transfer in Computer Organization 4 min read Introduction of Input-Output Processor 5 min read MPU Communication in Computer Organization 4 min read Memory Mapped I/O and Isolated I/O 5 min read Memory OrganizationIntroduction to memory and memory units 2 min read Memory Hierarchy Design and its Characteristics 6 min read Register Allocations in Code Generation 6 min read Cache Memory 4 min read Cache Organization | Set 1 (Introduction) 3 min read Multilevel Cache Organisation 6 min read Difference between RAM and ROM 7 min read Difference Between CPU Cache and TLB 4 min read Introduction to Solid-State Drive (SSD) 4 min read Read and Write operations in Memory 3 min read PipeliningInstruction Level Parallelism 5 min read Execution and Throughput 5 min read Pipelining Types and Stalling 3 min read Computer Organization and Architecture | Pipelining | Set 2 (Dependencies and Data Hazard) 6 min read Last Minute Notes Computer Organization 15+ min read Like