SlideShare a Scribd company logo
1 of 17
{
Deadlocks
 Definition
 System model
 Deadlock characterization
• Deadlock with mutex locks
• Necessary conditions
• Resource-allocation graph
 Methods for handling deadlocks
 Deadlock prevention
• Mutual Exclusion
• Hold and Wait
• No pre-emption
• Circular wait
 Conclusion
 A process requests resources; if the resources are not available at that
time, the process enters a waiting state. Sometimes, a waiting process is
never again able to change state, because the resources it has requested
are held by other waiting processes. This situation is called a deadlock.
Definition
Deadlock
System model
Deadlock characterization
Mutual
exclusion
Hold and
Wait
No Pre-
emption
Circular
Wait
Necessary conditions
 Deadlocks can be described more precisely in terms of a directed graph
called a system resource-allocation graph.
 Request edge
 Assignment edge.
Resource Allocation Graph
Methods
• We can use a protocol to prevent or avoid deadlocks, ensuring that the
system will never enter a deadlocked state.
• We can allow the system to enter a deadlocked state, detect it , and
recover.
• We can ignore the problem altogether and pretend that deadlocks never
occur in the system
 Deadlock prevention
 Deadlock avoidance
 Mutual exclusion
 Hold and Wait
 No pre-emption
 Circular Wait
Deadlock prevention
Preventing deadlocks by constraining how requests for resources can be made
in the system and how they are handled (system design).
The goal is to ensure that at least one of the necessary conditions for deadlock
can never hold.
Mutual Exclusion
Hold and Wait
No pre-emption
Circular Wait
Conclusion
Avoiding any one of the condition you can
prevent deadlock!!!
Deadlock's

More Related Content

Similar to Deadlock's

Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)WajeehaBaig
 
Operating-System-Neil-Eder-Report-PPT-Final (1).pptx
Operating-System-Neil-Eder-Report-PPT-Final (1).pptxOperating-System-Neil-Eder-Report-PPT-Final (1).pptx
Operating-System-Neil-Eder-Report-PPT-Final (1).pptxJuvil2
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-SystemsVenkata Sreeram
 
Deadlocks by wani zahoor
Deadlocks by wani zahoorDeadlocks by wani zahoor
Deadlocks by wani zahoorWani Zahoor
 
DEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptxDEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptxPugalenthiSomasundar
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinalmarangburu42
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456marangburu42
 
deadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxdeadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxSaba651353
 
Os case study word
Os case study wordOs case study word
Os case study wordDhol Yash
 
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjffOs presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjffZeelGoyani
 

Similar to Deadlock's (20)

Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
 
Operating-System-Neil-Eder-Report-PPT-Final (1).pptx
Operating-System-Neil-Eder-Report-PPT-Final (1).pptxOperating-System-Neil-Eder-Report-PPT-Final (1).pptx
Operating-System-Neil-Eder-Report-PPT-Final (1).pptx
 
operating system
operating systemoperating system
operating system
 
operating system
operating systemoperating system
operating system
 
Deadlocks Part- I.pdf
Deadlocks Part- I.pdfDeadlocks Part- I.pdf
Deadlocks Part- I.pdf
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Deadlocks by wani zahoor
Deadlocks by wani zahoorDeadlocks by wani zahoor
Deadlocks by wani zahoor
 
DEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptxDEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptx
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinal
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456
 
Rdbms
RdbmsRdbms
Rdbms
 
Deadlocks final
Deadlocks finalDeadlocks final
Deadlocks final
 
deadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxdeadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptx
 
Os case study word
Os case study wordOs case study word
Os case study word
 
Chapter06.ppt
Chapter06.pptChapter06.ppt
Chapter06.ppt
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
chapter06-new.pptx
chapter06-new.pptxchapter06-new.pptx
chapter06-new.pptx
 
06-Deadlocks.ppt
06-Deadlocks.ppt06-Deadlocks.ppt
06-Deadlocks.ppt
 
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjffOs presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 

Recently uploaded

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 

Recently uploaded (20)

Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 

Deadlock's

  • 1.
  • 2. { Deadlocks  Definition  System model  Deadlock characterization • Deadlock with mutex locks • Necessary conditions • Resource-allocation graph  Methods for handling deadlocks  Deadlock prevention • Mutual Exclusion • Hold and Wait • No pre-emption • Circular wait  Conclusion
  • 3.  A process requests resources; if the resources are not available at that time, the process enters a waiting state. Sometimes, a waiting process is never again able to change state, because the resources it has requested are held by other waiting processes. This situation is called a deadlock. Definition Deadlock
  • 6.
  • 8.  Deadlocks can be described more precisely in terms of a directed graph called a system resource-allocation graph.  Request edge  Assignment edge. Resource Allocation Graph
  • 9.
  • 10. Methods • We can use a protocol to prevent or avoid deadlocks, ensuring that the system will never enter a deadlocked state. • We can allow the system to enter a deadlocked state, detect it , and recover. • We can ignore the problem altogether and pretend that deadlocks never occur in the system  Deadlock prevention  Deadlock avoidance
  • 11.  Mutual exclusion  Hold and Wait  No pre-emption  Circular Wait Deadlock prevention Preventing deadlocks by constraining how requests for resources can be made in the system and how they are handled (system design). The goal is to ensure that at least one of the necessary conditions for deadlock can never hold.
  • 16. Conclusion Avoiding any one of the condition you can prevent deadlock!!!