SlideShare a Scribd company logo
1 of 11
Operating Systems
Deadlock
Presented By
Sadnam Saniat
ID: 192-15-2794
Section: PC-C
Department of CSE
Daffodil International University
Contents
โ€ข Introduction of Deadlock
โ€ข Characteristics of Deadlocks
โ€ข Strategies For handling Deadlock
โ€ข Deadlock Prevention
โ€ข Deadlock Avoidance
โ€ข Recovery from Deadlock
Deadlock
SITUATION PROCESS WAITS RESOURCE ASSIGNED ANOTHER
PROCESS
Process 2
Process 1
Resource 1
Resource 2
DEADLOCK!
Requested For
Assigned To
Requested For
Assigned To
Mutual Exclusion
1
Hold & Wait
2
No Preemption
3
Circular Wait
4
Characteristics
of Deadlocks
Strategies For Handling Deadlock
Ensure
1. Deadlock prevention
2. Deadlock avoidance
Allow
Allow the system to
enter a deadlock state
and then recover
Ignore
Ignore the problem and
pretend that deadlocks
never occur in the
system
Deadlock Prevention
Mutual
Exclusion
Not required for
sharable resources
(e.g., read-only
files); must hold for
non-sharable
resources
Hold and
Wait
Must guarantee
that whenever a
process requests a
resource, it does
not hold any other
resources
No
Preemption
If a process that is
holding some
resources requests
another resource that
cannot be
immediately allocated
to it, then all
resources currently
being held are
released
Circular
Wait
Impose a total
ordering of all
resource types,
and require that
each process
requests resources
in an increasing
order of
enumeration
Deadlock Avoidance
Resource Allocation Graph โ€“
Claim Edge
Single Instance
Bankerโ€™s Algorithm
Multiple Instances
โ€ข Abort all deadlocked processes
โ€ข Abort one process at a time until the deadlock cycle
is eliminated
Process
Termination
โ€ข Selecting a victim โ€“ minimize cost
โ€ข Rollback โ€“ return to some safe state, restart process
for that state
โ€ข Starvation โ€“ same process may always be picked as
victim, include number of rollback in cost facto
Resource
Preemption
Deadlock Recovery
Thank You

More Related Content

What's hot

Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Preventionprachi mewara
ย 
Adapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cAdapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cMauro Pagano
ย 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder
ย 
Less12 maintenance
Less12 maintenanceLess12 maintenance
Less12 maintenanceAmit Bhalla
ย 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
ย 
Less13 performance
Less13 performanceLess13 performance
Less13 performanceAmit Bhalla
ย 
Operating system 25 classical problems of synchronization
Operating system 25 classical problems of synchronizationOperating system 25 classical problems of synchronization
Operating system 25 classical problems of synchronizationVaibhav Khanna
ย 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating SystemsNitish Gulati
ย 
Dining philosopher problem operating system
Dining philosopher problem operating system Dining philosopher problem operating system
Dining philosopher problem operating system anushkashastri
ย 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating SystemsRitu Ranjan Shrivastwa
ย 
Bankers algorithm
Bankers algorithmBankers algorithm
Bankers algorithmAAQIB PARREY
ย 
Process synchronization
Process synchronizationProcess synchronization
Process synchronizationSyed Hassan Ali
ย 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & preventionIkhtiarUddinShaHin
ย 
Deadlock
DeadlockDeadlock
DeadlockMohd Arif
ย 
Dead Lock in operating system
Dead Lock in operating systemDead Lock in operating system
Dead Lock in operating systemAli Haider
ย 
Deadlock
DeadlockDeadlock
DeadlockRuchi Desai
ย 

What's hot (20)

Deadlock ppt
Deadlock ppt Deadlock ppt
Deadlock ppt
ย 
Deadlock Prevention
Deadlock PreventionDeadlock Prevention
Deadlock Prevention
ย 
Adapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12cAdapting to Adaptive Plans on 12c
Adapting to Adaptive Plans on 12c
ย 
7 Deadlocks
7 Deadlocks7 Deadlocks
7 Deadlocks
ย 
Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)Tanel Poder Oracle Scripts and Tools (2010)
Tanel Poder Oracle Scripts and Tools (2010)
ย 
Less12 maintenance
Less12 maintenanceLess12 maintenance
Less12 maintenance
ย 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
ย 
Less13 performance
Less13 performanceLess13 performance
Less13 performance
ย 
Operating system 25 classical problems of synchronization
Operating system 25 classical problems of synchronizationOperating system 25 classical problems of synchronization
Operating system 25 classical problems of synchronization
ย 
Thread scheduling in Operating Systems
Thread scheduling in Operating SystemsThread scheduling in Operating Systems
Thread scheduling in Operating Systems
ย 
Dining philosopher problem operating system
Dining philosopher problem operating system Dining philosopher problem operating system
Dining philosopher problem operating system
ย 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
ย 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
ย 
Bankers algorithm
Bankers algorithmBankers algorithm
Bankers algorithm
ย 
Deadlock
DeadlockDeadlock
Deadlock
ย 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
ย 
Deadlock detection & prevention
Deadlock detection & preventionDeadlock detection & prevention
Deadlock detection & prevention
ย 
Deadlock
DeadlockDeadlock
Deadlock
ย 
Dead Lock in operating system
Dead Lock in operating systemDead Lock in operating system
Dead Lock in operating system
ย 
Deadlock
DeadlockDeadlock
Deadlock
ย 

Similar to Deadlock in Operating Systems

Deadlocks
DeadlocksDeadlocks
DeadlocksZahid Ali
ย 
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 symbiansaad symbian
ย 
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.pptxsvulasal
ย 
24 to 25 deadlockprevention
24 to 25 deadlockprevention24 to 25 deadlockprevention
24 to 25 deadlockpreventionmyrajendra
ย 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating SystemAUST
ย 
Chapter06
Chapter06Chapter06
Chapter06jh.cloudnine
ย 
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)WajeehaBaig
ย 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlockmadhuributani
ย 
06-Deadlocks.ppt
06-Deadlocks.ppt06-Deadlocks.ppt
06-Deadlocks.pptansariparveen06
ย 
3 (2).ppt
3 (2).ppt3 (2).ppt
3 (2).pptamadayshwan
ย 
4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptxDishaDwivedi2
ย 
chapter06-new.pptx
chapter06-new.pptxchapter06-new.pptx
chapter06-new.pptxUmesh Hengaju
ย 
Os case study word
Os case study wordOs case study word
Os case study wordDhol Yash
ย 
Kcd226 Sistem Operasi Lecture05
Kcd226 Sistem Operasi Lecture05Kcd226 Sistem Operasi Lecture05
Kcd226 Sistem Operasi Lecture05Cahyo Darujati
ย 
Os module 2 d
Os module 2 dOs module 2 d
Os module 2 dGichelle Amon
ย 

Similar to Deadlock in Operating Systems (20)

Deadlocks
DeadlocksDeadlocks
Deadlocks
ย 
Deadlocks
DeadlocksDeadlocks
Deadlocks
ย 
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
ย 
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
ย 
24 to 25 deadlockprevention
24 to 25 deadlockprevention24 to 25 deadlockprevention
24 to 25 deadlockprevention
ย 
Deadlocks
DeadlocksDeadlocks
Deadlocks
ย 
Deadlock in Operating System
Deadlock in Operating SystemDeadlock in Operating System
Deadlock in Operating System
ย 
Chapter06
Chapter06Chapter06
Chapter06
ย 
Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)Unit 3 part 2(DEADLOCK)
Unit 3 part 2(DEADLOCK)
ย 
Ch 4 deadlock
Ch 4 deadlockCh 4 deadlock
Ch 4 deadlock
ย 
06-Deadlocks.ppt
06-Deadlocks.ppt06-Deadlocks.ppt
06-Deadlocks.ppt
ย 
ikh311-05
ikh311-05ikh311-05
ikh311-05
ย 
3 (2).ppt
3 (2).ppt3 (2).ppt
3 (2).ppt
ย 
4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx4.3 Deadlock [Autosaved].pptx
4.3 Deadlock [Autosaved].pptx
ย 
chapter06-new.pptx
chapter06-new.pptxchapter06-new.pptx
chapter06-new.pptx
ย 
Os case study word
Os case study wordOs case study word
Os case study word
ย 
Kcd226 Sistem Operasi Lecture05
Kcd226 Sistem Operasi Lecture05Kcd226 Sistem Operasi Lecture05
Kcd226 Sistem Operasi Lecture05
ย 
Operating system Deadlock
Operating system DeadlockOperating system Deadlock
Operating system Deadlock
ย 
Os module 2 d
Os module 2 dOs module 2 d
Os module 2 d
ย 
Deadlocks2
Deadlocks2Deadlocks2
Deadlocks2
ย 

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
ย 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
ย 
(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
ย 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
ย 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
ย 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
ย 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
ย 
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
ย 
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
ย 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
ย 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
ย 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
ย 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
ย 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
ย 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
ย 

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 Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
ย 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ย 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
ย 
(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
ย 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
ย 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
ย 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
ย 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
ย 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
ย 
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
ย 
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
ย 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
ย 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
ย 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
ย 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
ย 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
ย 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
ย 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
ย 

Deadlock in Operating Systems

  • 2. Presented By Sadnam Saniat ID: 192-15-2794 Section: PC-C Department of CSE Daffodil International University
  • 3. Contents โ€ข Introduction of Deadlock โ€ข Characteristics of Deadlocks โ€ข Strategies For handling Deadlock โ€ข Deadlock Prevention โ€ข Deadlock Avoidance โ€ข Recovery from Deadlock
  • 4. Deadlock SITUATION PROCESS WAITS RESOURCE ASSIGNED ANOTHER PROCESS
  • 5. Process 2 Process 1 Resource 1 Resource 2 DEADLOCK! Requested For Assigned To Requested For Assigned To
  • 6. Mutual Exclusion 1 Hold & Wait 2 No Preemption 3 Circular Wait 4 Characteristics of Deadlocks
  • 7. Strategies For Handling Deadlock Ensure 1. Deadlock prevention 2. Deadlock avoidance Allow Allow the system to enter a deadlock state and then recover Ignore Ignore the problem and pretend that deadlocks never occur in the system
  • 8. Deadlock Prevention Mutual Exclusion Not required for sharable resources (e.g., read-only files); must hold for non-sharable resources Hold and Wait Must guarantee that whenever a process requests a resource, it does not hold any other resources No Preemption If a process that is holding some resources requests another resource that cannot be immediately allocated to it, then all resources currently being held are released Circular Wait Impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration
  • 9. Deadlock Avoidance Resource Allocation Graph โ€“ Claim Edge Single Instance Bankerโ€™s Algorithm Multiple Instances
  • 10. โ€ข Abort all deadlocked processes โ€ข Abort one process at a time until the deadlock cycle is eliminated Process Termination โ€ข Selecting a victim โ€“ minimize cost โ€ข Rollback โ€“ return to some safe state, restart process for that state โ€ข Starvation โ€“ same process may always be picked as victim, include number of rollback in cost facto Resource Preemption Deadlock Recovery

Editor's Notes

  1. A Deadlock is a situation where each of the computer process waits for a resource which is being assigned to some another process. In this situation, none of the process gets executed since the resource it needs, is held by some other process which is also waiting for some other resource to be released.
  2. 1. Mutual Exclusion : Mutual exclusion means that a resource can be used by only one process at a time.ย For example,ย if a process P1 locks the resource R in exclusive mode, no other process can acquire this resource R. If another process requests, this resource, the requesting process must be delayed until the resource has been Ans. released. 2. Hold and Wait : The processes involved in deadlock acquires at least one resource and wait for at least another resource that has been acquired by another process. 3. No preemption : Resources held by a process cannot be preempted. A resource can be released only voluntarily by the process holding it, after that process has completed its task. 4. Circular Wait : A circular chain or a circular relationship exists among the processes involved in a deadlock. In such a chain each process waits for a resource that is held by the next process in the chain.ย For example, there are three processes, P1, P2 and P3. The process P1 is waiting for a resource which is held by the process P2, P2 is waiting for a resource held by P3 and P3 is waiting for a resource that is held by the process P1.
  3. Ensure that the system will never enter a deadlock state: ๏ฌ Deadlock prevention ๏ฌ Deadlock avoidence ๏ฎ Allow the system to enter a deadlock state and then recover ๏ฎ Ignore the problem and pretend that deadlocks never occur in the system; used by most operating systems, including UNIX