SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Ähnlich wie Deadlock's

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
Juvil2
 
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjffOs presentation final.pptxjjjjjdakajwsjjdhdfjff
Os presentation final.pptxjjjjjdakajwsjjdhdfjff
ZeelGoyani
 

Ähnlich wie 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
 

Kürzlich hochgeladen

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Kürzlich hochgeladen (20)

Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
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
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 

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!!!