SlideShare a Scribd company logo
Data Hazards
An overview of data hazards in computer
architecture and their impact on execution.
Aashiq
Ilahi
230071601246
230071601234
23007160197
Syed Ashiq
Ameer
Thananjai
• In computer architecture, data hazards occur when there are dependencies
between instructions that can lead to errors or delays in execution.
Data Hazards
• Read After Write (RAW) hazard, also known as true dependency, occurs when an instruction
depends on the result of a previous instruction. This situation arises in a pipeline when the
data being read has not yet been written back by the preceding instructions. Proper handling
of RAW hazards is essential to maintain data integrity and correct program execution.
Read After Write (RAW)
Types of Data Hazards
Data Hazards Pipeline MC and Architecture
• Write After Read (WAR) hazard, also known as anti-dependency, arises when an instruction writes
to a location before a previous instruction has read from that location. This can lead to incorrect
program behavior, as the reading instruction may not access the original data. Techniques such
as instruction reordering can help mitigate this hazard in pipelined processing.
Write After Read
(WAR)
Types of Data Hazards
• Write After Write (WAW) hazard occurs when two instructions attempt to write to the same
location, with the order of writes affecting the final outcome. This type of hazard can cause
incorrect results if the writing instructions are executed out of order. Managing WAW hazards is
vital for maintaining data consistency in pipelined architectures, often requiring techniques such
as careful scheduling and resource management.
Write After Write
(WAW)
Types of Data Hazards
• Data forwarding, also known as data bypassing, is a technique used to reduce the impact of
data hazards by directly connecting outputs of one instruction to the inputs of another without
writing to memory. This allows subsequent instructions to utilize the most recent data quickly,
thereby reducing latency and enhancing overall execution speed in a pipelined environment.
Data Forwarding
Handling Data Hazards
Data Hazards Pipeline MC and Architecture
• Pipeline stalls are a straightforward method to handle data hazards, where the pipeline is
temporarily halted to allow time for prior instructions to complete their execution. Although
this approach can effectively prevent hazards, it may lead to performance degradation due to
increased cycle times and resource underutilization in scenarios with frequent stalls.
Pipeline stalls
Handling Data Hazards
Data Hazards Pipeline MC and Architecture
Questions
1. What are Data Hazards? Mention it’s types.
2. Compare ‘Write after Read (WAR)’ data hazard and
‘Write after Write after Write (WAW)’ data hazard
3. What are some methods to handle Data Hazards?
Thank you!

More Related Content

PPTX
Pipelining Hazards important points .pptx
PPTX
Data Hazards and its Handling Methods.pptx
PPTX
Pipeline hazard
PPT
High Performance Computer Architecture
PPT
module2.ppt
PDF
Hazards in pipeline
PPTX
Hazard.pptx
PDF
Pipeline and data hazard
Pipelining Hazards important points .pptx
Data Hazards and its Handling Methods.pptx
Pipeline hazard
High Performance Computer Architecture
module2.ppt
Hazards in pipeline
Hazard.pptx
Pipeline and data hazard

Similar to Data Hazards Pipeline MC and Architecture (20)

PPT
hazard new.ppt
PPTX
Data Hazard and Solution for Data Hazard
PPT
Pipelinig hazardous
PPT
Pipelining & All Hazards Solution
PPT
PipelineHazards _
PPT
Ct213 processor design_pipelinehazard
PPTX
Computer architecture presentation
PPTX
pipelining and hazards occure in assembly language.
PPTX
unit -4-Hardwired Control & Microprogrammed Control.pptx
PPTX
Superscalar processor
PPT
Pipeline hazard
PPTX
4. Pipeline Hazards.pptx
PPTX
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
PDF
Computer SAarchitecture Lecture 6_Pip.pdf
PDF
2-Advanced Computer Architecture Pipelining
PPT
Presentation copy
PPTX
pipleling hazard SN PERFOEMANCE OPTIMAZITION
PPT
12 processor structure and function
PPTX
Instruction Pipelining
PPT
12 processor structure and function
hazard new.ppt
Data Hazard and Solution for Data Hazard
Pipelinig hazardous
Pipelining & All Hazards Solution
PipelineHazards _
Ct213 processor design_pipelinehazard
Computer architecture presentation
pipelining and hazards occure in assembly language.
unit -4-Hardwired Control & Microprogrammed Control.pptx
Superscalar processor
Pipeline hazard
4. Pipeline Hazards.pptx
Pipeline hazards | Structural Hazard, Data Hazard & Control Hazard
Computer SAarchitecture Lecture 6_Pip.pdf
2-Advanced Computer Architecture Pipelining
Presentation copy
pipleling hazard SN PERFOEMANCE OPTIMAZITION
12 processor structure and function
Instruction Pipelining
12 processor structure and function
Ad

Recently uploaded (20)

DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Construction Project Organization Group 2.pptx
PPTX
additive manufacturing of ss316l using mig welding
PDF
Well-logging-methods_new................
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
Geodesy 1.pptx...............................................
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
Digital Logic Computer Design lecture notes
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPT
Project quality management in manufacturing
PPTX
Welding lecture in detail for understanding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
OOP with Java - Java Introduction (Basics)
Construction Project Organization Group 2.pptx
additive manufacturing of ss316l using mig welding
Well-logging-methods_new................
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
Mechanical Engineering MATERIALS Selection
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Operating System & Kernel Study Guide-1 - converted.pdf
Digital Logic Computer Design lecture notes
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
bas. eng. economics group 4 presentation 1.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
CYBER-CRIMES AND SECURITY A guide to understanding
Project quality management in manufacturing
Welding lecture in detail for understanding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Model Code of Practice - Construction Work - 21102022 .pdf
Ad

Data Hazards Pipeline MC and Architecture

  • 1. Data Hazards An overview of data hazards in computer architecture and their impact on execution. Aashiq Ilahi 230071601246 230071601234 23007160197 Syed Ashiq Ameer Thananjai
  • 2. • In computer architecture, data hazards occur when there are dependencies between instructions that can lead to errors or delays in execution. Data Hazards
  • 3. • Read After Write (RAW) hazard, also known as true dependency, occurs when an instruction depends on the result of a previous instruction. This situation arises in a pipeline when the data being read has not yet been written back by the preceding instructions. Proper handling of RAW hazards is essential to maintain data integrity and correct program execution. Read After Write (RAW) Types of Data Hazards
  • 5. • Write After Read (WAR) hazard, also known as anti-dependency, arises when an instruction writes to a location before a previous instruction has read from that location. This can lead to incorrect program behavior, as the reading instruction may not access the original data. Techniques such as instruction reordering can help mitigate this hazard in pipelined processing. Write After Read (WAR) Types of Data Hazards
  • 6. • Write After Write (WAW) hazard occurs when two instructions attempt to write to the same location, with the order of writes affecting the final outcome. This type of hazard can cause incorrect results if the writing instructions are executed out of order. Managing WAW hazards is vital for maintaining data consistency in pipelined architectures, often requiring techniques such as careful scheduling and resource management. Write After Write (WAW) Types of Data Hazards
  • 7. • Data forwarding, also known as data bypassing, is a technique used to reduce the impact of data hazards by directly connecting outputs of one instruction to the inputs of another without writing to memory. This allows subsequent instructions to utilize the most recent data quickly, thereby reducing latency and enhancing overall execution speed in a pipelined environment. Data Forwarding Handling Data Hazards
  • 9. • Pipeline stalls are a straightforward method to handle data hazards, where the pipeline is temporarily halted to allow time for prior instructions to complete their execution. Although this approach can effectively prevent hazards, it may lead to performance degradation due to increased cycle times and resource underutilization in scenarios with frequent stalls. Pipeline stalls Handling Data Hazards
  • 11. Questions 1. What are Data Hazards? Mention it’s types. 2. Compare ‘Write after Read (WAR)’ data hazard and ‘Write after Write after Write (WAW)’ data hazard 3. What are some methods to handle Data Hazards?