SlideShare a Scribd company logo
1 of 15
OVERVIEW OF DEADLOCK
(Part –I )
CONTENTS
What is Deadlock?
 Dead lock
Characterization
 Approaches of Dead Lock
•Dead ock
Prevention
•Deadlock Detection
•Deadlock
Avoidance
10/6/2021
2 Dr.M.Karthika AP/IT/MTNC
What is Deadlock?
 Deadlock is a situation that occurs in OS.
 Deadlocks are a set of blocked processes each
holding a resource and waiting to acquire a resource
held by another process.
 Deadlock is a common problem in multi-processing
where several processes share a specific type of
mutually exclusive resource known as a soft lock or
software.
10/6/2021
3 Dr.M.Karthika AP/IT/MTNC
Every process needs some resources to complete
its execution. However, the resource is granted in a
sequential order.
 The process requests for some resource.
 OS grant the resource if it is available otherwise let the process
waits.
 The process uses it and release on the completion.
10/6/2021
4 Dr.M.Karthika AP/IT/MTNC
Example
In the below diagram, Process 1 is holding Resource 1 and waiting for
resource 2 which is acquired by process 2, and process 2 is waiting
for resource 1.
10/6/2021
5 Dr.M.Karthika AP/IT/MTNC
Deadlock Characterization
( four Coffman conditions )
1. Mutual Exclusion
A resource can only be shared in mutually exclusive
manner. It implies, if two process cannot use the same
resource at the same time.
2. Hold and Wait
A process waits for some resources while holding
another resource at the same time.
10/6/2021
6 Dr.M.Karthika AP/IT/MTNC
3. No preemption
The process which once scheduled will be executed till
the completion. No other process can be scheduled by
the scheduler meanwhile.
4. Circular Wait
All the processes must be waiting for the resources in a
cyclic manner so that the last process is waiting for the
resource which is being held by the first process.
10/6/2021
7 Dr.M.Karthika AP/IT/MTNC
There are three approaches to deal with deadlocks.
1. Deadlock Prevention
2. Deadlock avoidance
3. Deadlock detection
10/6/2021
8 Dr.M.Karthika AP/IT/MTNC
Deadlock Prevention
 The strategy of deadlock prevention is to design the
system in such a way that the possibility of deadlock
is excluded.
 Indirect method prevent the occurrence of one of three
necessary condition of deadlock i.e., mutual exclusion,
no pre-emption and hold and wait.
 Direct method prevent the occurrence of circular wait.
10/6/2021
9 Dr.M.Karthika AP/IT/MTNC
Prevention techniques
 Mutual exclusion
 Hold and Wait
 No pre-emption
10/6/2021
10 Dr.M.Karthika AP/IT/MTNC
Deadlock Detection
 Deadlock can be detected by the resource scheduler
as it keeps track of all the resources that are
allocated to different processes.
 After a deadlock is detected, it can be handed using
the given methods
All the processes that are involved in the deadlock are
terminated. This approach is not that useful as all the
progress made by the processes is destroyed.
Resources can be preempted from some processes
and given to others until the deadlock situation is
resolved. 10/6/2021
11 Dr.M.Karthika AP/IT/MTNC
Deadlock Avoidance
 It is better to avoid a deadlock rather than take
measures after the deadlock has occurred.
 The wait for graph can be used for deadlock
avoidance. This is however only useful for smaller
databases as it can get quite complex in larger
databases.
10/6/2021
12 Dr.M.Karthika AP/IT/MTNC
 A decision is made dynamically whether the current
resource allocation request will, if granted, potentially
lead to deadlock.
 It requires the knowledge of future process requests.
 Two techniques to avoid deadlock :
 Process initiation denial
 Resource allocation denial
10/6/2021
13 Dr.M.Karthika AP/IT/MTNC
Advantages :
 Not necessary to pre-empt and rollback processes
 Less restrictive than deadlock prevention
Disadvantages :
 Future resource requirements must be known in
advance
 Processes can be blocked for long periods
 Exists fixed number of resources for allocation
10/6/2021
14 Dr.M.Karthika AP/IT/MTNC
Thank You
10/6/2021
15 Dr.M.Karthika AP/IT/MTNC

More Related Content

What's hot

Ariane 5 launcher failure - why did it happen
Ariane 5 launcher failure - why did it happenAriane 5 launcher failure - why did it happen
Ariane 5 launcher failure - why did it happensoftware-engineering-book
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5AfiqEfendy Zaen
 
Operating system lab task
Operating system lab taskOperating system lab task
Operating system lab taskhammad1515
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationAvinash Kumar
 
No more ARP : Another MiTm Attacks
No more ARP : Another MiTm AttacksNo more ARP : Another MiTm Attacks
No more ARP : Another MiTm AttacksKhajornchol Puwarang
 
Virtual Machine Forensics
Virtual Machine ForensicsVirtual Machine Forensics
Virtual Machine Forensicsprimeteacher32
 
John the ripper & hydra password cracking tool
John the ripper & hydra password cracking toolJohn the ripper & hydra password cracking tool
John the ripper & hydra password cracking toolMd. Raquibul Hoque
 
Live Memory Forensics on Android devices
Live Memory Forensics on Android devicesLive Memory Forensics on Android devices
Live Memory Forensics on Android devicesNikos Gkogkos
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Sam Bowne
 
WannaCry Ransomware Attack: What to Do Now
WannaCry Ransomware Attack: What to Do NowWannaCry Ransomware Attack: What to Do Now
WannaCry Ransomware Attack: What to Do NowIBM Security
 
Modern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesModern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesMichael Scovetta
 
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced Actors
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced ActorsMemory Forensics for IR - Leveraging Volatility to Hunt Advanced Actors
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced ActorsJared Greenhill
 
Google Web Toolkit: a case study
Google Web Toolkit: a case studyGoogle Web Toolkit: a case study
Google Web Toolkit: a case studyBryan Basham
 
Dead Lock Analysis of spin_lock() in Linux Kernel (english)
Dead Lock Analysis of spin_lock() in Linux Kernel (english)Dead Lock Analysis of spin_lock() in Linux Kernel (english)
Dead Lock Analysis of spin_lock() in Linux Kernel (english)Sneeker Yeh
 

What's hot (20)

Ariane 5 launcher failure - why did it happen
Ariane 5 launcher failure - why did it happenAriane 5 launcher failure - why did it happen
Ariane 5 launcher failure - why did it happen
 
Sql injection
Sql injectionSql injection
Sql injection
 
Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5Virus and Malicious Code Chapter 5
Virus and Malicious Code Chapter 5
 
Operating system lab task
Operating system lab taskOperating system lab task
Operating system lab task
 
A Project Report on Linux Server Administration
A Project Report on Linux Server AdministrationA Project Report on Linux Server Administration
A Project Report on Linux Server Administration
 
No more ARP : Another MiTm Attacks
No more ARP : Another MiTm AttacksNo more ARP : Another MiTm Attacks
No more ARP : Another MiTm Attacks
 
Virtual Machine Forensics
Virtual Machine ForensicsVirtual Machine Forensics
Virtual Machine Forensics
 
John the ripper & hydra password cracking tool
John the ripper & hydra password cracking toolJohn the ripper & hydra password cracking tool
John the ripper & hydra password cracking tool
 
Live Memory Forensics on Android devices
Live Memory Forensics on Android devicesLive Memory Forensics on Android devices
Live Memory Forensics on Android devices
 
Practical Malware Analysis Ch12
Practical Malware Analysis Ch12Practical Malware Analysis Ch12
Practical Malware Analysis Ch12
 
malware analysis
malware  analysismalware  analysis
malware analysis
 
WannaCry Ransomware Attack: What to Do Now
WannaCry Ransomware Attack: What to Do NowWannaCry Ransomware Attack: What to Do Now
WannaCry Ransomware Attack: What to Do Now
 
Modern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and TechniquesModern Kernel Pool Exploitation: Attacks and Techniques
Modern Kernel Pool Exploitation: Attacks and Techniques
 
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced Actors
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced ActorsMemory Forensics for IR - Leveraging Volatility to Hunt Advanced Actors
Memory Forensics for IR - Leveraging Volatility to Hunt Advanced Actors
 
Google Web Toolkit: a case study
Google Web Toolkit: a case studyGoogle Web Toolkit: a case study
Google Web Toolkit: a case study
 
Ethical Hacking
Ethical HackingEthical Hacking
Ethical Hacking
 
Dead Lock Analysis of spin_lock() in Linux Kernel (english)
Dead Lock Analysis of spin_lock() in Linux Kernel (english)Dead Lock Analysis of spin_lock() in Linux Kernel (english)
Dead Lock Analysis of spin_lock() in Linux Kernel (english)
 
Basics of ssl
Basics of sslBasics of ssl
Basics of ssl
 
Sql injection
Sql injectionSql injection
Sql injection
 
Basic malware analysis
Basic malware analysisBasic malware analysis
Basic malware analysis
 

Similar to Overview of Deadlock unit 3 part 1

Similar to Overview of Deadlock unit 3 part 1 (20)

DEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptxDEADLOCK PREVENTION AND AVOIDANCE.pptx
DEADLOCK PREVENTION AND AVOIDANCE.pptx
 
Deadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddikDeadlock in distribute system by saeed siddik
Deadlock in distribute system by saeed siddik
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detection
 
Deadlock
DeadlockDeadlock
Deadlock
 
Os case study word
Os case study wordOs case study word
Os case study word
 
Rdbms
RdbmsRdbms
Rdbms
 
Chapter06
Chapter06Chapter06
Chapter06
 
operating system
operating systemoperating system
operating system
 
operating system
operating systemoperating system
operating system
 
Deadlock ppt
Deadlock pptDeadlock ppt
Deadlock ppt
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
DEADLOCK
DEADLOCKDEADLOCK
DEADLOCK
 
Deadlock Presentation
Deadlock PresentationDeadlock Presentation
Deadlock Presentation
 
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
 
What is a deadlock
What is a deadlockWhat is a deadlock
What is a deadlock
 
Deadlock Slides
Deadlock SlidesDeadlock Slides
Deadlock Slides
 
ikh311-05
ikh311-05ikh311-05
ikh311-05
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Operating system Deadlock
 
Operating system - Deadlock
Operating system - DeadlockOperating system - Deadlock
Operating system - Deadlock
 
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURYdeadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
deadlock detection using Goldman's algorithm by ANIKET CHOUDHURY
 

More from Dr.M.Karthika parthasarathy

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...Dr.M.Karthika parthasarathy
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxDr.M.Karthika parthasarathy
 

More from Dr.M.Karthika parthasarathy (20)

IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
IoT Enabled Wireless Technology Based Monitoring and Speed Control of Motor U...
 
Linux Lab Manual.doc
Linux Lab Manual.docLinux Lab Manual.doc
Linux Lab Manual.doc
 
Unit 2 IoT.pdf
Unit 2 IoT.pdfUnit 2 IoT.pdf
Unit 2 IoT.pdf
 
Unit 3 IOT.docx
Unit 3 IOT.docxUnit 3 IOT.docx
Unit 3 IOT.docx
 
Unit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptxUnit 1 Introduction to Artificial Intelligence.pptx
Unit 1 Introduction to Artificial Intelligence.pptx
 
Unit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docxUnit I What is Artificial Intelligence.docx
Unit I What is Artificial Intelligence.docx
 
Introduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptxIntroduction to IoT - Unit II.pptx
Introduction to IoT - Unit II.pptx
 
IoT Unit 2.pdf
IoT Unit 2.pdfIoT Unit 2.pdf
IoT Unit 2.pdf
 
Chapter 3 heuristic search techniques
Chapter 3 heuristic search techniquesChapter 3 heuristic search techniques
Chapter 3 heuristic search techniques
 
Ai mcq chapter 2
Ai mcq chapter 2Ai mcq chapter 2
Ai mcq chapter 2
 
Introduction to IoT unit II
Introduction to IoT  unit IIIntroduction to IoT  unit II
Introduction to IoT unit II
 
Introduction to IoT - Unit I
Introduction to IoT - Unit IIntroduction to IoT - Unit I
Introduction to IoT - Unit I
 
Internet of things Unit 1 one word
Internet of things Unit 1 one wordInternet of things Unit 1 one word
Internet of things Unit 1 one word
 
Unit 1 q&a
Unit  1 q&aUnit  1 q&a
Unit 1 q&a
 
Examples in OS synchronization for UG
Examples in OS synchronization for UG Examples in OS synchronization for UG
Examples in OS synchronization for UG
 
Process Synchronization - Monitors
Process Synchronization - MonitorsProcess Synchronization - Monitors
Process Synchronization - Monitors
 
.net progrmming part4
.net progrmming part4.net progrmming part4
.net progrmming part4
 
.net progrmming part3
.net progrmming part3.net progrmming part3
.net progrmming part3
 
.net progrmming part1
.net progrmming part1.net progrmming part1
.net progrmming part1
 
.net progrmming part2
.net progrmming part2.net progrmming part2
.net progrmming part2
 

Recently uploaded

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxJiesonDelaCerna
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 

Recently uploaded (20)

call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
CELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptxCELL CYCLE Division Science 8 quarter IV.pptx
CELL CYCLE Division Science 8 quarter IV.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 

Overview of Deadlock unit 3 part 1

  • 2. CONTENTS What is Deadlock?  Dead lock Characterization  Approaches of Dead Lock •Dead ock Prevention •Deadlock Detection •Deadlock Avoidance 10/6/2021 2 Dr.M.Karthika AP/IT/MTNC
  • 3. What is Deadlock?  Deadlock is a situation that occurs in OS.  Deadlocks are a set of blocked processes each holding a resource and waiting to acquire a resource held by another process.  Deadlock is a common problem in multi-processing where several processes share a specific type of mutually exclusive resource known as a soft lock or software. 10/6/2021 3 Dr.M.Karthika AP/IT/MTNC
  • 4. Every process needs some resources to complete its execution. However, the resource is granted in a sequential order.  The process requests for some resource.  OS grant the resource if it is available otherwise let the process waits.  The process uses it and release on the completion. 10/6/2021 4 Dr.M.Karthika AP/IT/MTNC
  • 5. Example In the below diagram, Process 1 is holding Resource 1 and waiting for resource 2 which is acquired by process 2, and process 2 is waiting for resource 1. 10/6/2021 5 Dr.M.Karthika AP/IT/MTNC
  • 6. Deadlock Characterization ( four Coffman conditions ) 1. Mutual Exclusion A resource can only be shared in mutually exclusive manner. It implies, if two process cannot use the same resource at the same time. 2. Hold and Wait A process waits for some resources while holding another resource at the same time. 10/6/2021 6 Dr.M.Karthika AP/IT/MTNC
  • 7. 3. No preemption The process which once scheduled will be executed till the completion. No other process can be scheduled by the scheduler meanwhile. 4. Circular Wait All the processes must be waiting for the resources in a cyclic manner so that the last process is waiting for the resource which is being held by the first process. 10/6/2021 7 Dr.M.Karthika AP/IT/MTNC
  • 8. There are three approaches to deal with deadlocks. 1. Deadlock Prevention 2. Deadlock avoidance 3. Deadlock detection 10/6/2021 8 Dr.M.Karthika AP/IT/MTNC
  • 9. Deadlock Prevention  The strategy of deadlock prevention is to design the system in such a way that the possibility of deadlock is excluded.  Indirect method prevent the occurrence of one of three necessary condition of deadlock i.e., mutual exclusion, no pre-emption and hold and wait.  Direct method prevent the occurrence of circular wait. 10/6/2021 9 Dr.M.Karthika AP/IT/MTNC
  • 10. Prevention techniques  Mutual exclusion  Hold and Wait  No pre-emption 10/6/2021 10 Dr.M.Karthika AP/IT/MTNC
  • 11. Deadlock Detection  Deadlock can be detected by the resource scheduler as it keeps track of all the resources that are allocated to different processes.  After a deadlock is detected, it can be handed using the given methods All the processes that are involved in the deadlock are terminated. This approach is not that useful as all the progress made by the processes is destroyed. Resources can be preempted from some processes and given to others until the deadlock situation is resolved. 10/6/2021 11 Dr.M.Karthika AP/IT/MTNC
  • 12. Deadlock Avoidance  It is better to avoid a deadlock rather than take measures after the deadlock has occurred.  The wait for graph can be used for deadlock avoidance. This is however only useful for smaller databases as it can get quite complex in larger databases. 10/6/2021 12 Dr.M.Karthika AP/IT/MTNC
  • 13.  A decision is made dynamically whether the current resource allocation request will, if granted, potentially lead to deadlock.  It requires the knowledge of future process requests.  Two techniques to avoid deadlock :  Process initiation denial  Resource allocation denial 10/6/2021 13 Dr.M.Karthika AP/IT/MTNC
  • 14. Advantages :  Not necessary to pre-empt and rollback processes  Less restrictive than deadlock prevention Disadvantages :  Future resource requirements must be known in advance  Processes can be blocked for long periods  Exists fixed number of resources for allocation 10/6/2021 14 Dr.M.Karthika AP/IT/MTNC