Module 3 Deadlocks Bankers Algorithm
Module 3 Deadlocks Bankers Algorithm
• Max: n x m matrix. If Max [i,j] = k, then process Pi will request at most k instances
of resource type Rj.
Fined Need
matrix
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
Example 3
Need [i, j] = Max [i, j] – Allocation [i, j]
SYSTEM IS SAFE
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
Recourse can be
granted after
checking safe state
What will happen if process P1 requests one additional instance of resource
type A and two instances of resource type C?
To do so, we again
execute Safety
algorithm on the
above data
structures.
P1 requests one additional
instance of resource type A
and two instances of
resource type C can be
granted