Database PPT Deadlock
Database PPT Deadlock
Database PPT Deadlock
Definition:
Deadlock exists among a set of processes if
Every process is waiting for an event
This event can be caused only by another process in the set
Event is the acquire of release of another resource
Kansas 20th century law: When two trains approach each other at a crossing, both shall come to a
full stop and neither shall start up again until the other has gone
Not
deadlocked
Avoiding deadlock
How do cars do it?
Never block an intersection
Must back up if you find yourself doing so
Deadlock Prevention
Deadlock Avoidance
Deadlock Prevention
Deadlock Prevention
Can the OS prevent deadlocks?
Prevention: Negate one of necessary conditions
Mutual exclusion:
Make resources sharable
Not always possible (printers?)
Deadlock Prevention
Prevention: Negate one of necessary conditions
No preemption:
Make resources preemptable (2 approaches)
Preempt requesting processes resources if all not available
Preempt resources of waiting processes to satisfy request
Deadlock Avoidance
Deadlock Avoidance
If we have future information
Max resource requirement of each process before they execute
Thank you
For Listening