SlideShare ist ein Scribd-Unternehmen logo
1 von 14
Topic
Deadlock
Presented by
Ali Haider
What is Deadlock?
• A dead-lock is a situation in which two devices or computer programs
sharing the same resource are affectively stopping each other from
accessing the resource.
• Final result in both programs closing to function.
Four conditions for Deadlocks?
1. Mutual Exclusion condition
2. Hold & wait condition
3. No preemption condition
4. Circular wait condition
Deadlock Modeling?
How Deadlock Occur?
How to Handle deadlocks?
• Four major areas of interest in deadlock research
1) Deadlock prevention
2) Deadlock Avoidance
3) Deadlock detection
4) Deadlock Recovery
Deadlock prevention?
• Prevention eliminates one of four conditions
1. Elimination of Mutual Exclusion
2. Elimination of Hold & wait condition
3. Elimination of No preemption condition
4. Elimination Of Circular Wait Condition
How deadlock can be avoided?
• We can avoid the situation of
deadlocked by:
1. Safe state
2. Banker’s Algorithm
3. Resource Allocation Graph
Safe state
• State is safe because OS can definitely avoid deadlock by
blocking any new requests until safe order is executed.
 This avoids circular wait condition.
 Process waits until safe state is guaranteed.
Banker’s Algorithm
Resource Allocation Graph
• If we have a resource allocation system with only one instance of each
process, a variant of the resource allocation graph can be used for
deadlock avoidance.
Deadlock Detection?
• Determines if deadlock has occurred.
• Identifies those processes & resources involved in the
deadlock.
Any Question!
Thanks

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock Avoidance in Operating System
Deadlock Avoidance in Operating SystemDeadlock Avoidance in Operating System
Deadlock Avoidance in Operating System
 
Operating System: Deadlock
Operating System: DeadlockOperating System: Deadlock
Operating System: Deadlock
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
 
Semaphore
SemaphoreSemaphore
Semaphore
 
Bankers
BankersBankers
Bankers
 
BANKER'S ALGORITHM
BANKER'S ALGORITHMBANKER'S ALGORITHM
BANKER'S ALGORITHM
 
Deadlock dbms
Deadlock dbmsDeadlock dbms
Deadlock dbms
 
System calls
System callsSystem calls
System calls
 
OS - Deadlock
OS - DeadlockOS - Deadlock
OS - Deadlock
 
Peterson Critical Section Problem Solution
Peterson Critical Section Problem SolutionPeterson Critical Section Problem Solution
Peterson Critical Section Problem Solution
 
Deadlock Presentation
Deadlock PresentationDeadlock Presentation
Deadlock Presentation
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
File system structure
File system structureFile system structure
File system structure
 
Threads (operating System)
Threads (operating System)Threads (operating System)
Threads (operating System)
 
Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
MULTI THREADING IN JAVA
MULTI THREADING IN JAVAMULTI THREADING IN JAVA
MULTI THREADING IN JAVA
 
Producer consumer
Producer consumerProducer consumer
Producer consumer
 

Ähnlich wie Dead Lock in operating system

Ähnlich wie Dead Lock in operating system (20)

Deadlock Slides
Deadlock SlidesDeadlock Slides
Deadlock Slides
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
Rdbms
RdbmsRdbms
Rdbms
 
Os case study word
Os case study wordOs case study word
Os case study word
 
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
 
3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx3.6 Deadlock-operating system unit 3.pptx
3.6 Deadlock-operating system unit 3.pptx
 
What is a deadlock
What is a deadlockWhat is a deadlock
What is a deadlock
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
osvishal-160830131208 (1).pdf
osvishal-160830131208 (1).pdfosvishal-160830131208 (1).pdf
osvishal-160830131208 (1).pdf
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock in operating systems
Deadlock in operating systemsDeadlock in operating systems
Deadlock in operating systems
 
Overview of Deadlock unit 3 part 1
Overview of Deadlock unit 3 part 1Overview of Deadlock unit 3 part 1
Overview of Deadlock unit 3 part 1
 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlockpresentation.pptx
Deadlockpresentation.pptxDeadlockpresentation.pptx
Deadlockpresentation.pptx
 
Java concurrency in practice
Java concurrency in practiceJava concurrency in practice
Java concurrency in practice
 
Deadlock in Operating Systems
Deadlock in Operating SystemsDeadlock in Operating Systems
Deadlock in Operating Systems
 

Mehr von Ali Haider

Introduction to Philosophy
Introduction to PhilosophyIntroduction to Philosophy
Introduction to PhilosophyAli Haider
 
Information Literacy Instructions in Schools
Information Literacy Instructions in SchoolsInformation Literacy Instructions in Schools
Information Literacy Instructions in SchoolsAli Haider
 
Cultural appropriation
Cultural appropriationCultural appropriation
Cultural appropriationAli Haider
 
What is software Engineering!
What is software Engineering!What is software Engineering!
What is software Engineering!Ali Haider
 
How to give an effective presentation!
How to give an effective presentation! How to give an effective presentation!
How to give an effective presentation! Ali Haider
 
Network Topologies
Network Topologies Network Topologies
Network Topologies Ali Haider
 

Mehr von Ali Haider (6)

Introduction to Philosophy
Introduction to PhilosophyIntroduction to Philosophy
Introduction to Philosophy
 
Information Literacy Instructions in Schools
Information Literacy Instructions in SchoolsInformation Literacy Instructions in Schools
Information Literacy Instructions in Schools
 
Cultural appropriation
Cultural appropriationCultural appropriation
Cultural appropriation
 
What is software Engineering!
What is software Engineering!What is software Engineering!
What is software Engineering!
 
How to give an effective presentation!
How to give an effective presentation! How to give an effective presentation!
How to give an effective presentation!
 
Network Topologies
Network Topologies Network Topologies
Network Topologies
 

Kürzlich hochgeladen

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxShobhayan Kirtania
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 

Kürzlich hochgeladen (20)

Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptxThe byproduct of sericulture in different industries.pptx
The byproduct of sericulture in different industries.pptx
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
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
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
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
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 

Dead Lock in operating system

  • 2. What is Deadlock? • A dead-lock is a situation in which two devices or computer programs sharing the same resource are affectively stopping each other from accessing the resource. • Final result in both programs closing to function.
  • 3. Four conditions for Deadlocks? 1. Mutual Exclusion condition 2. Hold & wait condition 3. No preemption condition 4. Circular wait condition
  • 6. How to Handle deadlocks? • Four major areas of interest in deadlock research 1) Deadlock prevention 2) Deadlock Avoidance 3) Deadlock detection 4) Deadlock Recovery
  • 7. Deadlock prevention? • Prevention eliminates one of four conditions 1. Elimination of Mutual Exclusion 2. Elimination of Hold & wait condition 3. Elimination of No preemption condition 4. Elimination Of Circular Wait Condition
  • 8. How deadlock can be avoided? • We can avoid the situation of deadlocked by: 1. Safe state 2. Banker’s Algorithm 3. Resource Allocation Graph
  • 9. Safe state • State is safe because OS can definitely avoid deadlock by blocking any new requests until safe order is executed.  This avoids circular wait condition.  Process waits until safe state is guaranteed.
  • 11. Resource Allocation Graph • If we have a resource allocation system with only one instance of each process, a variant of the resource allocation graph can be used for deadlock avoidance.
  • 12. Deadlock Detection? • Determines if deadlock has occurred. • Identifies those processes & resources involved in the deadlock.