SlideShare a Scribd company logo
1 of 9
Computer
Architecture
Topic: Pipeline Hazards
Pipeline
Hazards
A pipeline hazard occurs when th
e pipeline, or some portion of the
pipeline, must stall because
conditions do not permit
continued execution.
Referred to as also a pipeline
bubble.
Types of
Pipeline
Hazards
Data
Hazard
Recourse
Hazard
Control
Hazard
01
02
03
There are three types of hazards:
Resource
Hazards
A resource hazard occurs when two (or more)
instructions that are already in the pipeline need the
same resource. The result is that the instructions
must be executed in serial rather than parallel for a
portion of the pipeline.
Sometime referred to as a structural hazard.
Data
Hazards
Occurs when there is a conflict in the access of an
operand location. Two instructions in a program are to
be executed in sequence and both access a particular
memory or register operand. If the two instructions
are executed in strict sequence, no problem occurs.
However, if the instructions are executed in a pipeline,
then it is possible for the operand value to be updated
in such a way as to produce a different result than
would occur with strict sequential execution. In other
words, the program produces an incorrect result
because of the use of pipelining
Types of Data Hazards
1
2
3
An instruction modifies a register or memory location and a
succeeding instruction reads the data in that memory or register
location. A hazard occurs if the read takes place before the write
operation is complete
Read after write (RAW), or true dependency
An instruction reads a register or memory location and a succeedin
g instruction writes to the location. A hazard occurs if the write
operation completes before the read operation takes place
Write after read (WAR), or anti-dependency
Two instructions both write to the same location. A hazard occurs if
the write operations take place in the reverse order of the intended
sequence
Write after write (WAW), or output dependency
Control
Hazards
Also known as a branch hazard,
occurs when the pipeline makes
the wrong decision on a branch
prediction and therefore brings
Instructions into the pipeline that
must subsequently be discarded.
Ankon Gopal Banik
Front End Developer
WWF (Web With Friends)
m: +8801771981989
p: 027730402
e: agbanik2081@outlook.com
75-B, Kyetpara, Dhamrai, Dhaka, Bangladesh
www.wwfriends.org
Prepared by:
Thank you

More Related Content

What's hot

Pipelining
PipeliningPipelining
PipeliningAJAL A J
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of PipeliningSHAKOOR AB
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline MechanismAshik Iqbal
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipeliningMazin Alwaaly
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMKamran Ashraf
 
Instruction pipeline
Instruction pipelineInstruction pipeline
Instruction pipelineajay_a
 
Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazardWaed Shagareen
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorSmit Shah
 
Chapter 04 the processor
Chapter 04   the processorChapter 04   the processor
Chapter 04 the processorBảo Hoang
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with PipeliningAneesh Raveendran
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipeliningTech_MX
 

What's hot (20)

Pipelining
PipeliningPipelining
Pipelining
 
Concept of Pipelining
Concept of PipeliningConcept of Pipelining
Concept of Pipelining
 
Pipeline Mechanism
Pipeline MechanismPipeline Mechanism
Pipeline Mechanism
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Pipelining In computer
Pipelining In computer Pipelining In computer
Pipelining In computer
 
Pipelining
PipeliningPipelining
Pipelining
 
INSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISMINSTRUCTION LEVEL PARALLALISM
INSTRUCTION LEVEL PARALLALISM
 
Pipelining in computer architecture
Pipelining in computer architecturePipelining in computer architecture
Pipelining in computer architecture
 
Instruction pipeline
Instruction pipelineInstruction pipeline
Instruction pipeline
 
pipelining
pipeliningpipelining
pipelining
 
Pipeline and data hazard
Pipeline and data hazardPipeline and data hazard
Pipeline and data hazard
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline Processor
 
Assembly p1
Assembly p1Assembly p1
Assembly p1
 
Pipelining
PipeliningPipelining
Pipelining
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 
Chapter6 pipelining
Chapter6  pipeliningChapter6  pipelining
Chapter6 pipelining
 
Chapter 04 the processor
Chapter 04   the processorChapter 04   the processor
Chapter 04 the processor
 
Performance Enhancement with Pipelining
Performance Enhancement with PipeliningPerformance Enhancement with Pipelining
Performance Enhancement with Pipelining
 
pipelining
pipeliningpipelining
pipelining
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 

Similar to Pipeline hazard

hazard new.ppt
hazard new.ppthazard new.ppt
hazard new.pptView20
 
Pipelining understandingPipelining is running multiple stages of .pdf
Pipelining understandingPipelining is running multiple stages of .pdfPipelining understandingPipelining is running multiple stages of .pdf
Pipelining understandingPipelining is running multiple stages of .pdfarasanlethers
 
Networking lectures unit 2, MCA VII
Networking lectures unit 2, MCA VIINetworking lectures unit 2, MCA VII
Networking lectures unit 2, MCA VIIVasanti Dutta
 
chaos-monkey-increasing (1) (1)
chaos-monkey-increasing (1) (1)chaos-monkey-increasing (1) (1)
chaos-monkey-increasing (1) (1)Michael Alan Chang
 
What is active-active
What is active-activeWhat is active-active
What is active-activeSaif Ahmad
 
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...Engr. Md. Jamal Uddin Rayhan
 
Cisco Switch Security
Cisco Switch SecurityCisco Switch Security
Cisco Switch Securitydkaya
 
Enery efficient data prefetching
Enery efficient data prefetchingEnery efficient data prefetching
Enery efficient data prefetchingHimanshu Koli
 
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...ijdms
 
Maintaining data consistency in
Maintaining data consistency inMaintaining data consistency in
Maintaining data consistency inIMPULSE_TECHNOLOGY
 
Chapter 2 LAN redundancy
Chapter 2   LAN  redundancyChapter 2   LAN  redundancy
Chapter 2 LAN redundancyJosue Wuezo
 

Similar to Pipeline hazard (20)

Instruction Pipelining
Instruction PipeliningInstruction Pipelining
Instruction Pipelining
 
Data link control
Data link controlData link control
Data link control
 
hazard new.ppt
hazard new.ppthazard new.ppt
hazard new.ppt
 
Pipelining understandingPipelining is running multiple stages of .pdf
Pipelining understandingPipelining is running multiple stages of .pdfPipelining understandingPipelining is running multiple stages of .pdf
Pipelining understandingPipelining is running multiple stages of .pdf
 
Networking lectures unit 2, MCA VII
Networking lectures unit 2, MCA VIINetworking lectures unit 2, MCA VII
Networking lectures unit 2, MCA VII
 
Chapter 2 pc
Chapter 2 pcChapter 2 pc
Chapter 2 pc
 
Chap2 slides
Chap2 slidesChap2 slides
Chap2 slides
 
Hazards in pipeline
Hazards in pipelineHazards in pipeline
Hazards in pipeline
 
Pipelining & All Hazards Solution
Pipelining  & All Hazards SolutionPipelining  & All Hazards Solution
Pipelining & All Hazards Solution
 
chaos-monkey-increasing (1) (1)
chaos-monkey-increasing (1) (1)chaos-monkey-increasing (1) (1)
chaos-monkey-increasing (1) (1)
 
Chapter 6 pc
Chapter 6 pcChapter 6 pc
Chapter 6 pc
 
What is active-active
What is active-activeWhat is active-active
What is active-active
 
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...
Combined Bank Question Solution(Updated) 25/10/2021 Assistant Hardware Engine...
 
Cisco Switch Security
Cisco Switch SecurityCisco Switch Security
Cisco Switch Security
 
Enery efficient data prefetching
Enery efficient data prefetchingEnery efficient data prefetching
Enery efficient data prefetching
 
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
HIGH AVAILABILITY AND LOAD BALANCING FOR POSTGRESQL DATABASES: DESIGNING AND ...
 
Lecture 19
Lecture 19Lecture 19
Lecture 19
 
Chapter 2 program-security
Chapter 2 program-securityChapter 2 program-security
Chapter 2 program-security
 
Maintaining data consistency in
Maintaining data consistency inMaintaining data consistency in
Maintaining data consistency in
 
Chapter 2 LAN redundancy
Chapter 2   LAN  redundancyChapter 2   LAN  redundancy
Chapter 2 LAN redundancy
 

More from AnkonGopalBanik

Synchronous & Asynchronous data transmission
Synchronous & Asynchronous data transmission  Synchronous & Asynchronous data transmission
Synchronous & Asynchronous data transmission AnkonGopalBanik
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: ProcessAnkonGopalBanik
 
Operating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionOperating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionAnkonGopalBanik
 

More from AnkonGopalBanik (6)

Register
RegisterRegister
Register
 
Synchronous & Asynchronous data transmission
Synchronous & Asynchronous data transmission  Synchronous & Asynchronous data transmission
Synchronous & Asynchronous data transmission
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
IEEE 488
IEEE 488IEEE 488
IEEE 488
 
Operating system || Chapter 3: Process
Operating system || Chapter 3: ProcessOperating system || Chapter 3: Process
Operating system || Chapter 3: Process
 
Operating system || Chapter 1: Introduction
Operating system || Chapter 1: IntroductionOperating system || Chapter 1: Introduction
Operating system || Chapter 1: Introduction
 

Recently uploaded

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 

Recently uploaded (20)

How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 

Pipeline hazard

  • 2. Pipeline Hazards A pipeline hazard occurs when th e pipeline, or some portion of the pipeline, must stall because conditions do not permit continued execution. Referred to as also a pipeline bubble.
  • 4. Resource Hazards A resource hazard occurs when two (or more) instructions that are already in the pipeline need the same resource. The result is that the instructions must be executed in serial rather than parallel for a portion of the pipeline. Sometime referred to as a structural hazard.
  • 5. Data Hazards Occurs when there is a conflict in the access of an operand location. Two instructions in a program are to be executed in sequence and both access a particular memory or register operand. If the two instructions are executed in strict sequence, no problem occurs. However, if the instructions are executed in a pipeline, then it is possible for the operand value to be updated in such a way as to produce a different result than would occur with strict sequential execution. In other words, the program produces an incorrect result because of the use of pipelining
  • 6. Types of Data Hazards 1 2 3 An instruction modifies a register or memory location and a succeeding instruction reads the data in that memory or register location. A hazard occurs if the read takes place before the write operation is complete Read after write (RAW), or true dependency An instruction reads a register or memory location and a succeedin g instruction writes to the location. A hazard occurs if the write operation completes before the read operation takes place Write after read (WAR), or anti-dependency Two instructions both write to the same location. A hazard occurs if the write operations take place in the reverse order of the intended sequence Write after write (WAW), or output dependency
  • 7. Control Hazards Also known as a branch hazard, occurs when the pipeline makes the wrong decision on a branch prediction and therefore brings Instructions into the pipeline that must subsequently be discarded.
  • 8. Ankon Gopal Banik Front End Developer WWF (Web With Friends) m: +8801771981989 p: 027730402 e: agbanik2081@outlook.com 75-B, Kyetpara, Dhamrai, Dhaka, Bangladesh www.wwfriends.org Prepared by: