Assuming that there are 5 processes (P1, P2, P3, P4 and P5) which are processed by a CPU. The processes need 3 resources (A, B and C). The following information shows the current resources allocated to each process and also the maximum resources they required in order to complete their processes. Given that the available resources are 4, 2, 2 respectively. Processes Allocated Resources Maximum Resources Required A B C A B C P1 2 1 2 5 3 2 P2 3 2 3 6 5 4 P3 1 3 4 6 6 6 P4 7 8 8 10 18 16 P5 6 7 5 9 9 7 List of processes and resources i)Use banker’s algorithm to determine whether the system is in a safe state or unsafe state when the process sequence is P1=>P5. If the system is in an unsafe state, propose a process sequence where the system is in a safe state. Justify your answers.
Assuming that there are 5 processes (P1, P2, P3, P4 and P5) which are processed by a CPU.
The processes need 3 resources (A, B and C). The following information shows the current resources allocated to each process and also the maximum resources they required in order to complete their processes. Given that the available resources are 4, 2, 2 respectively.
Processes Allocated Resources Maximum Resources Required
A B C A B C
P1 2 1 2 5 3 2
P2 3 2 3 6 5 4
P3 1 3 4 6 6 6
P4 7 8 8 10 18 16
P5 6 7 5 9 9 7
List of processes and resources
i)Use banker’s
the process sequence is P1=>P5. If the system is in an unsafe state, propose a process sequence
where the system is in a safe state. Justify your answers.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 2 images