Unit-3 OS Deadlock
Unit-3 OS Deadlock
Unit – 3 C
Deadlock
We admit that some of the content or the images provided in this channel's
videos may be obtained through the routine Google image searches and
few of them may be under copyright protection. Such usage is completely
inadvertent.
R
(b)
Thus from the safe state system can guarantee that all process will
finish and from unsafe state no such guarantee can be given.
(A) P0
(B) P1
(C) P2
(D) None of the above, since
the system is in a deadlock
1. For each node, N in the graph, perform the following five steps with N as the
starting node.
2. Initialize L to the empty list, designate all arcs as unmarked.
3. Add current node to end of L, check to see if node now appears in L two
times. If it does, graph contains a cycle (listed in L), algorithm terminates.
4. From given node, see if any unmarked outgoing arcs. If so, go to step 5; if not,
go to step 6.
5. Pick an unmarked outgoing arc at random and mark it. Then follow it to the
new current node and go to step 3.
6. If this is initial node, graph does not contain any cycles, algorithm terminates.
Otherwise, dead end. Remove it, go back to previous node, make that one
current node, go to step 3.
Unit- 5 Deadlock (Prof. Aanchal Phutela) 37
Unit- 5 Deadlock (Prof. Aanchal Phutela) 38
Deadlock Detection: one Resource of each type
Recovery
R1 R2
P2