SlideShare a Scribd company logo
Topic : DEAD LOCKS IN OPERATING
SYSTEM
Presented By:
Wani Zahoor
1-MIT-2015
When a process requests the resources, the
resources are not available at that time, so the
process enters into the waiting state. The requesting
resources are held by another waiting process, both
are in waiting state, this situation is said to be a. ..
“Deadlock”
A set of blocked processes each
holding a resource and waiting to
acquire a resource held by another
process in the set.
o Example
Process-1 requests the printer, gets it
Process-2 requests the tape unit, gets it Process-1 and
Process-1 requests the tape unit, waits Process-2
Process-2 requests the printer, waits Deadlocked!
1. Mutual Exclusion Condition
2. Hold & Wait Condition
3. No Preemption Condition
4. Circular Wait Condition
Modeled with directed graphs
If we have a resource allocation
system with only one inatance of each
process, a variant of the resource
allocation graph can be used for
deadlock avoidance.
R1
R2
R3 R4
P1 P2
P3
Resource Allocation Graph
 CIRCLES
 represents processes
 SQUARE
 represents classes of identical resources
 SMALL SQUARES DRAWN INSIDE LARGE SQUARES
 Indicate separate identical resources of each class
 If the Resource Allocation graph contains no cycles then
there is no deadlock in the system at that instance.
 If there is a Cycle
o If there is only one instance per resource type than there is a
Deadlock
o If there is more than once instance for some resource type than
there may or may not be a Deadlock
RESOURCE ALLOCATION GRAPH ?
• Four major Areas of Interest in Deadlocks:
 Deadlock Prevention
 Deadlock Avoidance
 Deadlock Detection
 Deadlock Recovery
• Prevention eliminates one of the 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
• Maximum requirements of
each resource must be stated
in advance by each process.
• Two Approaches
• Two Algorithms
o Resource Allocation Algorithms
o The Banker’s Algorithm
• Determines if deadlock has occurred
• Identifies those processes & resources
involved in the deadlock
• Algorithms can incur significant
runtime overhead
Detection mechanism of Deadlocks for single instance of resource
type is different. We can detect the dead locks using wait for graph
for single instance resource type and detect using detection
algorithm for multiple instances of resource type.
1. SINGLE INSTANCE OF RESOURCE TYPE : Single instance of resource
type means, the system consisting of only one resource for one type.
We can detect this type of deadlocks withthe help of wait for graph.
DEADLOCK DETECTION MECHANISMS
2. SEVERAL INSTANCE OF RESOURCE TYPE :
The wait for graph is not applicable to several instance
of resource type. So we need another method for this
type, that is “deadlock detection algorithm”. This
algorithm looks like ‘Banker’s algorithm” and it
employees several data structures that are similar to
those used in the …
Banker’s Algorithm.
• Process Termination
o Abort all deadlocked processes.
o Abort one process at a time until
the deadlock cycle is eliminated.
• Resource Preemption
o Selecting a victim
o Rollback
o Starvation
“Process Termination” it is one method to recover from deadlock. We uses 2
methods for process termination, these are:
a) ABORT ALL DEADLOCKED PROCESS : It means release all the processes in the
deadlocked state, and start the allocation from the starting point. It is a great
expensive method.
b) ABORT ONE BY ONE PROCESS UNTIL THE DEADLOCK CYCLE IS
ELIMINATED : In this method first abort the one of the processes in the
deadlocked state, and allocated the resources to some other process in the
deadlock state then check whether the deadlock breaked or not. If no, abort the
another process from the deadlock state. Continue this process until we recover
from deadlock. This method is also expensive but compare with first one it is
better.
To eliminate deadlocks using resource preemption, preempt some resources
from processes and give these resources to other processes until the deadlock cycle is
broken.
There are 3 methods to eliminate the deadlocks using resource preemption.These are
:
a) SELECTING A VICTIM : Select a victim resource from the deadlock state, and
preempt that one.
b) ROLLBACK : If a resource from a process is preempted, what should be done
with that process. The process must be roll backed to some safe state and restart
it from that state.
c) STARVATION : It must be guaranteed that resource will not always be
preempted from the same process to avoid starvation problem.
Have a Nice Day !!!

More Related Content

What's hot

Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
saad symbian
 
Dead lock
Dead lockDead lock
Dead lock
M_Javed Ashraf
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
Venkata Sreeram
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
Sara Ali
 
Deadlock
DeadlockDeadlock
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
Rai University
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detection
Nadia Nahar
 
Dead Lock In Operating Systems
Dead Lock In Operating SystemsDead Lock In Operating Systems
Dead Lock In Operating Systems
totallooser
 
deadlock
deadlockdeadlock
Chapter 4
Chapter 4Chapter 4
Chapter 4
ushabarad142
 
Deadlock- Operating System
Deadlock- Operating SystemDeadlock- Operating System
Deadlock- Operating System
Rajan Shah
 
Deadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networkingDeadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networking
TamannaSharma70
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
Suraj Kumar
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3rohassanie
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
lalithambiga kamaraj
 
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 siddikSaeed Siddik
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
Zahid Ali
 

What's hot (20)

Deadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbianDeadlock detection and recovery by saad symbian
Deadlock detection and recovery by saad symbian
 
Dead lock
Dead lockDead lock
Dead lock
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 
Deadlock
DeadlockDeadlock
Deadlock
 
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
 
Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
 
Deadlock detection
Deadlock detectionDeadlock detection
Deadlock detection
 
Dead Lock In Operating Systems
Dead Lock In Operating SystemsDead Lock In Operating Systems
Dead Lock In Operating Systems
 
Deadlocks
 Deadlocks Deadlocks
Deadlocks
 
deadlock
deadlockdeadlock
deadlock
 
Deadlock
DeadlockDeadlock
Deadlock
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Deadlock- Operating System
Deadlock- Operating SystemDeadlock- Operating System
Deadlock- Operating System
 
Deadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networkingDeadlock avoidance and prevention .. computer networking
Deadlock avoidance and prevention .. computer networking
 
deadlock handling
deadlock handlingdeadlock handling
deadlock handling
 
FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3FP 202 Chapter 2 - Part 3
FP 202 Chapter 2 - Part 3
 
Deadlocks in operating system
Deadlocks in operating systemDeadlocks in operating system
Deadlocks in operating system
 
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
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 

Viewers also liked

La influencia dela tecnologia
La influencia dela tecnologiaLa influencia dela tecnologia
La influencia dela tecnologia
jhordyandrez
 
Cembre 2A80 Crimp Lugs 400sqmm 11-33kV
Cembre 2A80 Crimp Lugs 400sqmm 11-33kVCembre 2A80 Crimp Lugs 400sqmm 11-33kV
Cembre 2A80 Crimp Lugs 400sqmm 11-33kV
Thorne & Derrick International
 
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểm
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểmThừa mỡ máu dễ gây nhiều biến chứng nguy hiểm
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểmdelmer385
 
Acc 201-answers
Acc 201-answersAcc 201-answers
Acc 201-answers
harris earnestine
 
Android phones secret codes ...
Android phones secret codes ...Android phones secret codes ...
Android phones secret codes ...
Ranjith Alappadan
 
TDR_work_samples (11-05-14)
TDR_work_samples (11-05-14)TDR_work_samples (11-05-14)
TDR_work_samples (11-05-14)Timothy Ralston
 
Avances tecnologicos 1F
Avances tecnologicos 1FAvances tecnologicos 1F
Avances tecnologicos 1F
Mario Roman
 
Conscious aging series yoga
Conscious aging series   yogaConscious aging series   yoga
Conscious aging series yoga
Toddy Wobbema
 
Cembre 2A37 Crimp Lugs 185sqmm 11-33kV
Cembre 2A37 Crimp Lugs 185sqmm 11-33kVCembre 2A37 Crimp Lugs 185sqmm 11-33kV
Cembre 2A37 Crimp Lugs 185sqmm 11-33kV
Thorne & Derrick International
 
Muslim live english
Muslim live englishMuslim live english
Muslim live english
Mohammed EL Bakri EL Beeli
 
Mi proyecto de vida (jairo chico)
Mi proyecto de vida (jairo chico)Mi proyecto de vida (jairo chico)
Mi proyecto de vida (jairo chico)
Jairo Chico
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and api
Bhargav Ranjit
 

Viewers also liked (18)

La influencia dela tecnologia
La influencia dela tecnologiaLa influencia dela tecnologia
La influencia dela tecnologia
 
Cembre 2A80 Crimp Lugs 400sqmm 11-33kV
Cembre 2A80 Crimp Lugs 400sqmm 11-33kVCembre 2A80 Crimp Lugs 400sqmm 11-33kV
Cembre 2A80 Crimp Lugs 400sqmm 11-33kV
 
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểm
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểmThừa mỡ máu dễ gây nhiều biến chứng nguy hiểm
Thừa mỡ máu dễ gây nhiều biến chứng nguy hiểm
 
Planning process
Planning processPlanning process
Planning process
 
Acc 201-answers
Acc 201-answersAcc 201-answers
Acc 201-answers
 
White Stone
White StoneWhite Stone
White Stone
 
Android phones secret codes ...
Android phones secret codes ...Android phones secret codes ...
Android phones secret codes ...
 
TDR_work_samples (11-05-14)
TDR_work_samples (11-05-14)TDR_work_samples (11-05-14)
TDR_work_samples (11-05-14)
 
Bitola
BitolaBitola
Bitola
 
Avances tecnologicos 1F
Avances tecnologicos 1FAvances tecnologicos 1F
Avances tecnologicos 1F
 
Conscious aging series yoga
Conscious aging series   yogaConscious aging series   yoga
Conscious aging series yoga
 
7.Management By Ethics 2
7.Management By Ethics 27.Management By Ethics 2
7.Management By Ethics 2
 
6.Management By Ethics
6.Management By Ethics6.Management By Ethics
6.Management By Ethics
 
Cembre 2A37 Crimp Lugs 185sqmm 11-33kV
Cembre 2A37 Crimp Lugs 185sqmm 11-33kVCembre 2A37 Crimp Lugs 185sqmm 11-33kV
Cembre 2A37 Crimp Lugs 185sqmm 11-33kV
 
Muslim live english
Muslim live englishMuslim live english
Muslim live english
 
Mi proyecto de vida (jairo chico)
Mi proyecto de vida (jairo chico)Mi proyecto de vida (jairo chico)
Mi proyecto de vida (jairo chico)
 
Creating a mule project with raml and api
Creating a mule project with raml and apiCreating a mule project with raml and api
Creating a mule project with raml and api
 
5.Achievement of TQM in Organization
5.Achievement of TQM in Organization5.Achievement of TQM in Organization
5.Achievement of TQM in Organization
 

Similar to Deadlocks by wani zahoor

osvishal-160830131208 (1).pdf
osvishal-160830131208 (1).pdfosvishal-160830131208 (1).pdf
osvishal-160830131208 (1).pdf
amadayshwan
 
Deadlock
DeadlockDeadlock
Deadlock
VISHAL DONGA
 
Deadlock in operating systems
Deadlock in operating systemsDeadlock in operating systems
Deadlock in operating systems
jamunaashok
 
Deadlock
DeadlockDeadlock
Deadlock
Mahershi ACT
 
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptxosvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
Bhaskar271887
 
DEADLOCK
DEADLOCKDEADLOCK
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
WajeehaBaig
 
Unit iv: Deadlocks
Unit iv: DeadlocksUnit iv: Deadlocks
Unit iv: Deadlocks
Arnav Chowdhury
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
madhuributani
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinal
marangburu42
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456
marangburu42
 
OS-Part-06.pdf
OS-Part-06.pdfOS-Part-06.pdf
OS-Part-06.pdf
NguyenTienDungK17HL
 
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
svulasal
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
Sakshi Tiwari
 
Deadlockproj.pptx
Deadlockproj.pptxDeadlockproj.pptx
Deadlockproj.pptx
sonu642319
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Gp1242 007 oer ppt
Gp1242 007 oer pptGp1242 007 oer ppt
Gp1242 007 oer ppt
Nivedita Kasturi
 
Deadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemDeadlock and memory management -- Operating System
Deadlock and memory management -- Operating System
EktaVaswani2
 
4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx
DishaDwivedi2
 
Module3
Module3Module3
Module3
dilshad begum
 

Similar to Deadlocks by wani zahoor (20)

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
 
Deadlock
DeadlockDeadlock
Deadlock
 
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptxosvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
osvzjsjjdndnnssnnsnsndndndnndeadlock.pptx
 
DEADLOCK
DEADLOCKDEADLOCK
DEADLOCK
 
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
 
Unit iv: Deadlocks
Unit iv: DeadlocksUnit iv: Deadlocks
Unit iv: Deadlocks
 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
 
Deadlocks prefinal
Deadlocks prefinalDeadlocks prefinal
Deadlocks prefinal
 
Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456Deadlocksprefinal 161014115456
Deadlocksprefinal 161014115456
 
OS-Part-06.pdf
OS-Part-06.pdfOS-Part-06.pdf
OS-Part-06.pdf
 
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
 
Deadlocks
DeadlocksDeadlocks
Deadlocks
 
Deadlockproj.pptx
Deadlockproj.pptxDeadlockproj.pptx
Deadlockproj.pptx
 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Operating system Deadlock
 
Gp1242 007 oer ppt
Gp1242 007 oer pptGp1242 007 oer ppt
Gp1242 007 oer ppt
 
Deadlock and memory management -- Operating System
Deadlock and memory management -- Operating SystemDeadlock and memory management -- Operating System
Deadlock and memory management -- Operating System
 
4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx
 
Module3
Module3Module3
Module3
 

More from Wani Zahoor

VPN Network
VPN NetworkVPN Network
VPN Network
Wani Zahoor
 
Java threads
Java threadsJava threads
Java threads
Wani Zahoor
 
DotNet Framework
DotNet FrameworkDotNet Framework
DotNet Framework
Wani Zahoor
 
Applets in java
Applets in javaApplets in java
Applets in java
Wani Zahoor
 
Antennas in Wireless Communication
Antennas in Wireless CommunicationAntennas in Wireless Communication
Antennas in Wireless Communication
Wani Zahoor
 
ADO.NET
ADO.NETADO.NET
ADO.NET
Wani Zahoor
 

More from Wani Zahoor (6)

VPN Network
VPN NetworkVPN Network
VPN Network
 
Java threads
Java threadsJava threads
Java threads
 
DotNet Framework
DotNet FrameworkDotNet Framework
DotNet Framework
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Antennas in Wireless Communication
Antennas in Wireless CommunicationAntennas in Wireless Communication
Antennas in Wireless Communication
 
ADO.NET
ADO.NETADO.NET
ADO.NET
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 

Deadlocks by wani zahoor

  • 1. Topic : DEAD LOCKS IN OPERATING SYSTEM Presented By: Wani Zahoor 1-MIT-2015
  • 2.
  • 3.
  • 4. When a process requests the resources, the resources are not available at that time, so the process enters into the waiting state. The requesting resources are held by another waiting process, both are in waiting state, this situation is said to be a. .. “Deadlock”
  • 5. A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. o Example Process-1 requests the printer, gets it Process-2 requests the tape unit, gets it Process-1 and Process-1 requests the tape unit, waits Process-2 Process-2 requests the printer, waits Deadlocked!
  • 6. 1. Mutual Exclusion Condition 2. Hold & Wait Condition 3. No Preemption Condition 4. Circular Wait Condition
  • 8. If we have a resource allocation system with only one inatance of each process, a variant of the resource allocation graph can be used for deadlock avoidance.
  • 9. R1 R2 R3 R4 P1 P2 P3 Resource Allocation Graph
  • 10.  CIRCLES  represents processes  SQUARE  represents classes of identical resources  SMALL SQUARES DRAWN INSIDE LARGE SQUARES  Indicate separate identical resources of each class
  • 11.  If the Resource Allocation graph contains no cycles then there is no deadlock in the system at that instance.  If there is a Cycle o If there is only one instance per resource type than there is a Deadlock o If there is more than once instance for some resource type than there may or may not be a Deadlock RESOURCE ALLOCATION GRAPH ?
  • 12.
  • 13. • Four major Areas of Interest in Deadlocks:  Deadlock Prevention  Deadlock Avoidance  Deadlock Detection  Deadlock Recovery
  • 14. • Prevention eliminates one of the 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
  • 15. • Maximum requirements of each resource must be stated in advance by each process. • Two Approaches • Two Algorithms o Resource Allocation Algorithms o The Banker’s Algorithm
  • 16.
  • 17. • Determines if deadlock has occurred • Identifies those processes & resources involved in the deadlock • Algorithms can incur significant runtime overhead
  • 18. Detection mechanism of Deadlocks for single instance of resource type is different. We can detect the dead locks using wait for graph for single instance resource type and detect using detection algorithm for multiple instances of resource type. 1. SINGLE INSTANCE OF RESOURCE TYPE : Single instance of resource type means, the system consisting of only one resource for one type. We can detect this type of deadlocks withthe help of wait for graph. DEADLOCK DETECTION MECHANISMS
  • 19. 2. SEVERAL INSTANCE OF RESOURCE TYPE : The wait for graph is not applicable to several instance of resource type. So we need another method for this type, that is “deadlock detection algorithm”. This algorithm looks like ‘Banker’s algorithm” and it employees several data structures that are similar to those used in the … Banker’s Algorithm.
  • 20. • Process Termination o Abort all deadlocked processes. o Abort one process at a time until the deadlock cycle is eliminated. • Resource Preemption o Selecting a victim o Rollback o Starvation
  • 21. “Process Termination” it is one method to recover from deadlock. We uses 2 methods for process termination, these are: a) ABORT ALL DEADLOCKED PROCESS : It means release all the processes in the deadlocked state, and start the allocation from the starting point. It is a great expensive method. b) ABORT ONE BY ONE PROCESS UNTIL THE DEADLOCK CYCLE IS ELIMINATED : In this method first abort the one of the processes in the deadlocked state, and allocated the resources to some other process in the deadlock state then check whether the deadlock breaked or not. If no, abort the another process from the deadlock state. Continue this process until we recover from deadlock. This method is also expensive but compare with first one it is better.
  • 22. To eliminate deadlocks using resource preemption, preempt some resources from processes and give these resources to other processes until the deadlock cycle is broken. There are 3 methods to eliminate the deadlocks using resource preemption.These are : a) SELECTING A VICTIM : Select a victim resource from the deadlock state, and preempt that one. b) ROLLBACK : If a resource from a process is preempted, what should be done with that process. The process must be roll backed to some safe state and restart it from that state. c) STARVATION : It must be guaranteed that resource will not always be preempted from the same process to avoid starvation problem.
  • 23. Have a Nice Day !!!