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 Computer Architecture and processor
• 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 Computer Architecture and processor
• 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 Computer Architecture and processor
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 Computer Architecture and processor (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)

PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPT
Project quality management in manufacturing
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
PPTX
Geodesy 1.pptx...............................................
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Internet of Things (IOT) - A guide to understanding
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
R24 SURVEYING LAB MANUAL for civil enggi
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
Project quality management in manufacturing
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
CYBER-CRIMES AND SECURITY A guide to understanding
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Geodesy 1.pptx...............................................
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Mechanical Engineering MATERIALS Selection
Internet of Things (IOT) - A guide to understanding
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
bas. eng. economics group 4 presentation 1.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Operating System & Kernel Study Guide-1 - converted.pdf
Foundation to blockchain - A guide to Blockchain Tech
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
R24 SURVEYING LAB MANUAL for civil enggi
Ad

Data Hazards Computer Architecture and processor

  • 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?