Deadlock 4
Deadlock 4
inspire posterity
DEADLOCKS
Lecture 14
06/04/2020 1
discover yourself
inspire posterity
Deadlock Strategies
06/04/2020 2
discover yourself
inspire posterity
Safe State
Total Resources=10
3 4/6/2020
4/6/2020 3
discover yourself
inspire posterity
Unsafe State
CONCLUSION
1. Thus the allocation decision that moved the system from (a) to
(b) went from a safe state to an unsafe state.
5 4/6/2020
4/6/2020 5
discover yourself
inspire posterity
6 4/6/2020
4/6/2020 6
discover yourself
inspire posterity
Deadlock-Avoidance
Banker’s Algorithm for a Single Resource
7 4/6/2020
4/6/2020 7
discover yourself
inspire posterity
Banker’s Algorithm for a Single Resource
Banker’s algorithm is used to check which state is safe and un-safe.
This state is safe because with 2 resources left the process can delay any
requests except C’s, thus letting C finish and release all four of its
resources. With four resources in hand, the process can let either D or B
have the necessary resources and so on.
8 4/6/2020
4/6/2020 8