SlideShare una empresa de Scribd logo
1 de 42
Chapter 7:  Deadlocks
Chapter 7:  Deadlocks ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Chapter Objectives ,[object Object],[object Object]
The Deadlock Problem ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bridge Crossing Example ,[object Object],[object Object],[object Object],[object Object],[object Object]
System Model ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Deadlock Characterization ,[object Object],[object Object],[object Object],[object Object],[object Object],Deadlock can arise if four conditions hold simultaneously.
Resource-Allocation Graph ,[object Object],[object Object],[object Object],[object Object],[object Object],A set of vertices  V  and a set of edges  E .
Resource-Allocation Graph (Cont.) ,[object Object],[object Object],[object Object],[object Object],P i P i R j R j
Example of a Resource Allocation Graph
Resource Allocation Graph With A Deadlock
Resource Allocation Graph With A Cycle But No Deadlock
Basic Facts ,[object Object],[object Object],[object Object],[object Object]
Methods for Handling Deadlocks ,[object Object],[object Object],[object Object]
Deadlock Prevention ,[object Object],[object Object],[object Object],[object Object],Restrain the ways request can be made.
Deadlock Prevention (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Deadlock Avoidance ,[object Object],[object Object],[object Object],Requires that the system has some additional  a priori  information  available.
Safe State ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Basic Facts ,[object Object],[object Object],[object Object]
Safe, Unsafe , Deadlock State
Resource-Allocation Graph Algorithm ,[object Object],[object Object],[object Object],[object Object]
Resource-Allocation Graph For Deadlock Avoidance
Unsafe State In Resource-Allocation Graph
Banker’s Algorithm ,[object Object],[object Object],[object Object],[object Object]
Data Structures for the Banker’s Algorithm  ,[object Object],[object Object],[object Object],[object Object],[object Object],Let  n  = number of processes, and  m  = number of resources types.
Safety Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Resource-Request Algorithm for Process  P i ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example of Banker’s Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example  P 1  Request (1,0,2) (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Deadlock Detection ,[object Object],[object Object],[object Object]
Single Instance of Each Resource Type ,[object Object],[object Object],[object Object],[object Object],[object Object]
Resource-Allocation Graph and Wait-for Graph Resource-Allocation Graph Corresponding wait-for graph
Several Instances of a Resource Type ,[object Object],[object Object],[object Object]
Detection Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Detection Algorithm (Cont.) ,[object Object],[object Object],Algorithm requires an order of O( m  x  n 2)  operations to detect whether the system is in deadlocked state.
Example of Detection Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example (Cont.) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Detection-Algorithm Usage ,[object Object],[object Object],[object Object],[object Object],[object Object]
Recovery from Deadlock:  Process Termination ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Recovery from Deadlock: Resource Preemption ,[object Object],[object Object],[object Object]
End of Chapter 7

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Chapter 7 - Deadlocks
Chapter 7 - DeadlocksChapter 7 - Deadlocks
Chapter 7 - Deadlocks
 
Mch7 deadlock
Mch7 deadlockMch7 deadlock
Mch7 deadlock
 
Operating System Deadlock Galvin
Operating System  Deadlock GalvinOperating System  Deadlock Galvin
Operating System Deadlock Galvin
 
Operating system Dead lock
Operating system Dead lockOperating system Dead lock
Operating system Dead lock
 
Methods for handling deadlock
Methods for handling deadlockMethods for handling deadlock
Methods for handling deadlock
 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
 
deadlock avoidance
deadlock avoidancedeadlock avoidance
deadlock avoidance
 
Os module 2 d
Os module 2 dOs module 2 d
Os module 2 d
 
Gp1242 007 oer ppt
Gp1242 007 oer pptGp1242 007 oer ppt
Gp1242 007 oer ppt
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
Deadlock- System model, resource types, deadlock problem, deadlock characteri...
Deadlock- System model, resource types, deadlock problem, deadlock characteri...Deadlock- System model, resource types, deadlock problem, deadlock characteri...
Deadlock- System model, resource types, deadlock problem, deadlock characteri...
 
Os deadlock
Os deadlockOs deadlock
Os deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
O ssvv62015
O ssvv62015O ssvv62015
O ssvv62015
 
Deadlock Detection in Distributed Systems
Deadlock Detection in Distributed SystemsDeadlock Detection in Distributed Systems
Deadlock Detection in Distributed Systems
 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
 
OS_Ch8
OS_Ch8OS_Ch8
OS_Ch8
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 

Destacado

Monitoring prints with computer vision
Monitoring prints with computer visionMonitoring prints with computer vision
Monitoring prints with computer visionKarla Lopez
 
Ignite presentation Singularity 2012
Ignite presentation Singularity 2012Ignite presentation Singularity 2012
Ignite presentation Singularity 2012Karla Lopez
 
MediaEval5
MediaEval5MediaEval5
MediaEval5E6Films
 
The secret sauce of 3D printing design sales
The secret sauce of 3D printing design salesThe secret sauce of 3D printing design sales
The secret sauce of 3D printing design salesKarla Lopez
 
Party List Law Brief
Party List Law BriefParty List Law Brief
Party List Law BriefORAGON
 
Building a developer platforms for 3D printing
Building a developer platforms for 3D printingBuilding a developer platforms for 3D printing
Building a developer platforms for 3D printingKarla Lopez
 
Simpan kira imbangan duga ting 3
Simpan kira   imbangan duga ting 3Simpan kira   imbangan duga ting 3
Simpan kira imbangan duga ting 3Wan Aini
 
Pk ting 2 simpan kira
Pk ting 2   simpan kiraPk ting 2   simpan kira
Pk ting 2 simpan kiraWan Aini
 
Pengenalan kepada pemasaran
Pengenalan kepada pemasaranPengenalan kepada pemasaran
Pengenalan kepada pemasaranWan Aini
 

Destacado (11)

Monitoring prints with computer vision
Monitoring prints with computer visionMonitoring prints with computer vision
Monitoring prints with computer vision
 
Ignite presentation Singularity 2012
Ignite presentation Singularity 2012Ignite presentation Singularity 2012
Ignite presentation Singularity 2012
 
MediaEval5
MediaEval5MediaEval5
MediaEval5
 
The secret sauce of 3D printing design sales
The secret sauce of 3D printing design salesThe secret sauce of 3D printing design sales
The secret sauce of 3D printing design sales
 
Party List Law Brief
Party List Law BriefParty List Law Brief
Party List Law Brief
 
GSM 3G Market Update 161209
GSM 3G  Market Update 161209GSM 3G  Market Update 161209
GSM 3G Market Update 161209
 
Building a developer platforms for 3D printing
Building a developer platforms for 3D printingBuilding a developer platforms for 3D printing
Building a developer platforms for 3D printing
 
GSA WCDMA HSPA LTE Fact Sheet 1412009
GSA WCDMA HSPA LTE Fact Sheet 1412009GSA WCDMA HSPA LTE Fact Sheet 1412009
GSA WCDMA HSPA LTE Fact Sheet 1412009
 
Simpan kira imbangan duga ting 3
Simpan kira   imbangan duga ting 3Simpan kira   imbangan duga ting 3
Simpan kira imbangan duga ting 3
 
Pk ting 2 simpan kira
Pk ting 2   simpan kiraPk ting 2   simpan kira
Pk ting 2 simpan kira
 
Pengenalan kepada pemasaran
Pengenalan kepada pemasaranPengenalan kepada pemasaran
Pengenalan kepada pemasaran
 

Similar a Ice

Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.pptKAnurag2
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OSMsAnita2
 
14th November - Deadlock Prevention, Avoidance.ppt
14th November - Deadlock Prevention, Avoidance.ppt14th November - Deadlock Prevention, Avoidance.ppt
14th November - Deadlock Prevention, Avoidance.pptUnknown664473
 
Mca ii os u-3 dead lock & io systems
Mca  ii  os u-3 dead lock & io systemsMca  ii  os u-3 dead lock & io systems
Mca ii os u-3 dead lock & io systemsRai University
 
OSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptxOSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptxssusere16bd9
 
Module 3 Deadlocks.pptx
Module 3 Deadlocks.pptxModule 3 Deadlocks.pptx
Module 3 Deadlocks.pptxshreesha16
 
Deadlock in Real Time operating Systempptx
Deadlock in Real Time operating SystempptxDeadlock in Real Time operating Systempptx
Deadlock in Real Time operating Systempptxssuserca5764
 
deadlocks.pptx
deadlocks.pptxdeadlocks.pptx
deadlocks.pptxJOHNZHOU52
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232marangburu42
 
Deadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networkingDeadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networkingTamannaSharma70
 

Similar a Ice (20)

CH07.pdf
CH07.pdfCH07.pdf
CH07.pdf
 
Chapter 5(five).pdf
Chapter 5(five).pdfChapter 5(five).pdf
Chapter 5(five).pdf
 
Module-2Deadlock.ppt
Module-2Deadlock.pptModule-2Deadlock.ppt
Module-2Deadlock.ppt
 
Deadlock Avoidance - OS
Deadlock Avoidance - OSDeadlock Avoidance - OS
Deadlock Avoidance - OS
 
14th November - Deadlock Prevention, Avoidance.ppt
14th November - Deadlock Prevention, Avoidance.ppt14th November - Deadlock Prevention, Avoidance.ppt
14th November - Deadlock Prevention, Avoidance.ppt
 
Mca ii os u-3 dead lock & io systems
Mca  ii  os u-3 dead lock & io systemsMca  ii  os u-3 dead lock & io systems
Mca ii os u-3 dead lock & io systems
 
OSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptxOSLec14&15(Deadlocksinopratingsystem).pptx
OSLec14&15(Deadlocksinopratingsystem).pptx
 
deadlock in OS.pptx
deadlock in OS.pptxdeadlock in OS.pptx
deadlock in OS.pptx
 
Os unit 4
Os unit 4Os unit 4
Os unit 4
 
Module 3 Deadlocks.pptx
Module 3 Deadlocks.pptxModule 3 Deadlocks.pptx
Module 3 Deadlocks.pptx
 
Deadlock (1).ppt
Deadlock (1).pptDeadlock (1).ppt
Deadlock (1).ppt
 
Ch7 deadlocks
Ch7   deadlocksCh7   deadlocks
Ch7 deadlocks
 
Os5
Os5Os5
Os5
 
deadlock part5 unit 2.ppt
deadlock part5 unit 2.pptdeadlock part5 unit 2.ppt
deadlock part5 unit 2.ppt
 
Deadlock in Real Time operating Systempptx
Deadlock in Real Time operating SystempptxDeadlock in Real Time operating Systempptx
Deadlock in Real Time operating Systempptx
 
Sucet os module_3_notes
Sucet os module_3_notesSucet os module_3_notes
Sucet os module_3_notes
 
Deadlock.ppt
Deadlock.pptDeadlock.ppt
Deadlock.ppt
 
deadlocks.pptx
deadlocks.pptxdeadlocks.pptx
deadlocks.pptx
 
Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232Deadlocks 160928121516-160928183232
Deadlocks 160928121516-160928183232
 
Deadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networkingDeadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networking
 

Último

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Ice