# Os Deadlocks

A) Resource Deadlocks:-

Allocated Maximum Available A B C A B C A B C P1 1 2 3 3 2 6 0 3 1 P2 1 2 0 1 4 2 P3 1 1 1 1 4 2 P4 1 0 2 4 2 2

Compute the Need Matrix. Is the system safe? If so, show the order in which all processes can complete. If the system is not safe, explain.

Ans:-

Need Matrix=Maximum-Allocated

Allocated Maximum Available Needed A B C A B C A B C A B C P1 1 2 3 4 2 6 1 3 1 3 0 3 P2 1 2 0 2 5 3 1 3 3 P3 1 1 1 2 5 2 1 4 1 P4 1 0 2 5 2 3 4 2 1

The system is not safe.Need matrix process needs more resources than avialable matrix.

B )Apply the deadlock detection...

Please join StudyMode to read the full document