SlideShare a Scribd company logo
1 of 9
Deadlock
Ruchi D. Desai
1
Outline
• What is Deadlock?
• Resource Utilization
• Deadlock Characterization
• Methods For Handling Deadlock
• Conclusion
2
What is Deadlock?
• A set of blocked processes each holding a resource and
waiting to acquire a resource held by another process in the
set.
• Example
• System has 2 disk drives.
• P1 and P2 each hold one disk drive and each needs another one.
3
Resource Utilization
Under the normal mode of operation, Each process may
utilizes a resource in following sequence:
• Request
• Use
• Release
4
Deadlock Characterization
Deadlock can arise if four
conditions hold
simultaneously.
• Mutual exclusion: only one
process at a time can use a
resource.
• Hold and wait: a process
holding at least one resource
is waiting to acquire
additional resources held by
other processes.
5
• No pre-emption: a resource
can be released only voluntarily
by the process holding it, after
that process has completed its
task.
• Circular wait: there exists a set
{P0, P1, …, P0} of waiting
processes such that P0 is
waiting for a resource that is
held by P1, P1 is waiting for a
resource that is held by P2, …,
Pn–1 is waiting for a resource
that is held by Pn, and Pn is
waiting for a resource that is
held by P0.
6
Methods For Handling Deadlock
We can deal with Deadlock problem in 3-ways:
• Prevention/Avoidance
• Ensure that the system will never enter a deadlock state.
• Detection/Correction
• Allow system to enter a deadlock state and then recover.
• Ignorance
• Ignore problem and pretend that deadlock never occur.
• Used by most operating systems, including UNIX.
7
Conclusion
8
• Deadlock occurs when a process waiting for resources that are
held by another process. To resolve this deadlock condition
some algorithms like Banker’s algorithm(Avoidance
algorithm), Safety Algorithm(Avoidance algorithm), Detection
algorithm, Ostrich algorithm etc. are helpful.
9

More Related Content

Viewers also liked

TIC_SESION 2_Leidy Johana Montoya Ocampo
TIC_SESION 2_Leidy Johana Montoya Ocampo TIC_SESION 2_Leidy Johana Montoya Ocampo
TIC_SESION 2_Leidy Johana Montoya Ocampo Johamontoyaocampo
 
Noticia tecnologica yesica
Noticia tecnologica yesicaNoticia tecnologica yesica
Noticia tecnologica yesicalizethkathe
 
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQ
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQFor Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQ
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQwtsadvisors
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorialnikhilsh66131
 
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO cdoecrt
 
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х Компаний
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х КомпанийValue Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х Компаний
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х КомпанийАндрей Макарский
 
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_StdsIRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_StdsDavid G. Peterson, PMP
 

Viewers also liked (15)

TIC_SESION 2_Leidy Johana Montoya Ocampo
TIC_SESION 2_Leidy Johana Montoya Ocampo TIC_SESION 2_Leidy Johana Montoya Ocampo
TIC_SESION 2_Leidy Johana Montoya Ocampo
 
Gost 30494-96
Gost 30494-96Gost 30494-96
Gost 30494-96
 
Karambola
KarambolaKarambola
Karambola
 
Noticia tecnologica yesica
Noticia tecnologica yesicaNoticia tecnologica yesica
Noticia tecnologica yesica
 
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQ
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQFor Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQ
For Sale Nasdaq 100 stock index ETF trading algorithm---Symbol QQQ
 
Html beginners tutorial
Html beginners tutorialHtml beginners tutorial
Html beginners tutorial
 
Wesleyan
WesleyanWesleyan
Wesleyan
 
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO
CÓDIGO ESCRITO - SUMINISTRE DE LA APOCALIPSISEL SALVADOR DEL MUNDO CANTO
 
chili sub sector paln_RED
chili sub sector paln_REDchili sub sector paln_RED
chili sub sector paln_RED
 
Rice sub sector paln_RED
Rice sub sector paln_REDRice sub sector paln_RED
Rice sub sector paln_RED
 
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х Компаний
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х КомпанийValue Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х Компаний
Value Traps - Как не Попасть в Капкан Вэлью Инвестиций на Примере 3-х Компаний
 
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_StdsIRS_DGP_Modernization_Oracle_DB_Naming_Stds
IRS_DGP_Modernization_Oracle_DB_Naming_Stds
 
Alphabetical list of companies
Alphabetical list of companiesAlphabetical list of companies
Alphabetical list of companies
 
Murugeswari S
Murugeswari SMurugeswari S
Murugeswari S
 
Veg sub sector paln_RED_LGED comments
Veg sub sector paln_RED_LGED commentsVeg sub sector paln_RED_LGED comments
Veg sub sector paln_RED_LGED comments
 

Similar to Deadlock Prevention and Detection Methods

Similar to Deadlock Prevention and Detection Methods (20)

24 to 25 deadlockprevention
24 to 25 deadlockprevention24 to 25 deadlockprevention
24 to 25 deadlockprevention
 
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
 
4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
Deadlocks Part- I.pdf
Deadlocks Part- I.pdfDeadlocks Part- I.pdf
Deadlocks Part- I.pdf
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating System
 
The Functions of the Operating System
The Functions of the Operating SystemThe Functions of the Operating System
The Functions of the Operating System
 
deadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptxdeadlock and starvation resources allocation.pptx
deadlock and starvation resources allocation.pptx
 
6. Deadlock_1640227623705.pptx
6. Deadlock_1640227623705.pptx6. Deadlock_1640227623705.pptx
6. Deadlock_1640227623705.pptx
 
3 (1) [Autosaved].ppt
3 (1) [Autosaved].ppt3 (1) [Autosaved].ppt
3 (1) [Autosaved].ppt
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
chapter06-new.pptx
chapter06-new.pptxchapter06-new.pptx
chapter06-new.pptx
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Operating system Deadlock
 
06-Deadlocks.ppt
06-Deadlocks.ppt06-Deadlocks.ppt
06-Deadlocks.ppt
 
Deadlocks1
Deadlocks1Deadlocks1
Deadlocks1
 
Deadlocks2
Deadlocks2Deadlocks2
Deadlocks2
 
Chapter06.ppt
Chapter06.pptChapter06.ppt
Chapter06.ppt
 
DEADLOCK
DEADLOCKDEADLOCK
DEADLOCK
 
deadlocks.pptx
deadlocks.pptxdeadlocks.pptx
deadlocks.pptx
 

Recently uploaded

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 

Recently uploaded (20)

Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 

Deadlock Prevention and Detection Methods

  • 2. Outline • What is Deadlock? • Resource Utilization • Deadlock Characterization • Methods For Handling Deadlock • Conclusion 2
  • 3. What is Deadlock? • A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. • Example • System has 2 disk drives. • P1 and P2 each hold one disk drive and each needs another one. 3
  • 4. Resource Utilization Under the normal mode of operation, Each process may utilizes a resource in following sequence: • Request • Use • Release 4
  • 5. Deadlock Characterization Deadlock can arise if four conditions hold simultaneously. • Mutual exclusion: only one process at a time can use a resource. • Hold and wait: a process holding at least one resource is waiting to acquire additional resources held by other processes. 5
  • 6. • No pre-emption: a resource can be released only voluntarily by the process holding it, after that process has completed its task. • Circular wait: there exists a set {P0, P1, …, P0} of waiting processes such that P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that is held by P2, …, Pn–1 is waiting for a resource that is held by Pn, and Pn is waiting for a resource that is held by P0. 6
  • 7. Methods For Handling Deadlock We can deal with Deadlock problem in 3-ways: • Prevention/Avoidance • Ensure that the system will never enter a deadlock state. • Detection/Correction • Allow system to enter a deadlock state and then recover. • Ignorance • Ignore problem and pretend that deadlock never occur. • Used by most operating systems, including UNIX. 7
  • 8. Conclusion 8 • Deadlock occurs when a process waiting for resources that are held by another process. To resolve this deadlock condition some algorithms like Banker’s algorithm(Avoidance algorithm), Safety Algorithm(Avoidance algorithm), Detection algorithm, Ostrich algorithm etc. are helpful.
  • 9. 9