Deadlocks
Deadlocks
Deadlocks
deadlock !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Deadlocks
What is deadlock??
Circular Wait –
impose a total ordering of all resource
types, and require that each process
requests resources in an increasing order
of enumeration.
The algorithm may itself increase
complexity and may also lead to poor
resource utilization.
Deadlock avoidance
• Allow all deadlock conditions. But calculate cycles about to happen
and stop dangerous operation
• we can try to avoid deadlocks by making use prior knowledge about
the usage of resources by processes including resources available,
resources allocated, future requests and future releases by processes.
• If a system is in safe state no deadlocks.
• If a system is in unsafe state possibility of deadlock.
• Avoidance ensures that a system will never enter an unsafe state.
• System is in safe state if there exists a safe sequence of all
processes.
Banker’s Algorithm