Bankder's Algorithm
In a concise presentation:
-
Provide a concise review of Banker’s algorithm. What is the difference between the two scenarios: when this algorithm is applied to deadlock avoidance and when it is applied to deadlock detection?
-
Show step-by-step how you solve the following problem: Given that the resource allocation of a system as follows,
Allocation Task A B C D T1 1 2 0 2 T2 0 1 1 2 T3 1 2 4 0 T4 1 2 0 1 T5 1 0 0 1
Max Task A B C D T1 4 3 1 6 T2 2 4 2 4 T3 3 6 5 1 T4 2 6 2 3 T5 3 1 1 2
determine whether each of the following states is unsafe. If the state is safe, illustrate the order in which the threads may complete. Otherwise, illustrate why the state is unsafe.
- Based on the description of the problem, is this deadlock avoidance or deadlock detection?
Available = (2, 2, 2, 3)
Available = (4, 4, 1, 1)