A deadlock is the very unpleasant situation that may occur in very dynamic world of running processes, a situation that must be avoided at all costs. One famous algorithm for deadlock avoidance is the...

1 answer below »

A deadlock is the very unpleasant situation that may occur in very dynamic world of running processes, a situation that must be avoided at all costs. One famous algorithm for deadlock avoidance is the Banker's algorithm for deadlock avoidance. The version of this algorithm presented in this module’s commentary gives just one solution (the Greedy approach). Consider the Greedy approach to the Banker’s algorithm from the module readings. Give an example of application of this algorithm for 7 processes (named P1, ... , P7) and 5 resource types (named R1, ... , R5). Start by listing the matrices involved in this algorithm, that constitute its input data; also, do not forget to mention the overall resources of each type available in this fictional system. Proceed by describing the algorithm, step by step; for each step, mention the test performed, which process was chosen, what is the old and new status of the Work array, etc. In the end, list the solution, that is the safe sequence of processes resulting from this algorithm. Also, to check if your computations are correct, verify that in the end all resources of the system are freed. Your example must be original (different from your colleagues' examples) and must have at least one solution (safe sequence).
Answered Same DayFeb 08, 2023

Answer To: A deadlock is the very unpleasant situation that may occur in very dynamic world of running...

Vikas answered on Feb 08 2023
36 Votes
Assignment
Let's consider the following input data for the Banker's algorithm:
Maximum resources r
equired by each process:
P1: [7, 5, 3, 3, 2]
P2: [3, 2, 2, 2, 2]
P3: [9, 0, 2, 2, 2]
P4: [2, 2, 2, 2, 2]
P5: [4, 3, 3, 3, 3]
P6: [3, 3, 3, 3, 3]
P7: [0, 2, 2, 2, 2]
Currently allocated...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here