Assignment#3 OS
Assignment#3 OS
A system has 5 processes (P0 to P4) and 3 resource types (A, B, C). Use the Banker's Algorithm
to determine if the system is in a safe state. The data is organized as follows:
Find a process whose Remaining Need can be satisfied with the current
Availability.
If such a process exists, allocate its resources temporarily, release the
allocated resources back to the system, and update the Availability.
Repeat until all processes are executed, or determine that the system is not in
a safe state.
Question 2: Determine if the system is in a safe state
A system has 5 processes (P0 to P4) and 4 resource types (A, B, C, D). Use the Banker's
Algorithm to determine if the system is in a safe state. The data is organized as follows:
Steps:
Find a process whose Remaining Need can be satisfied with the current
Availability.
If such a process exists, allocate its resources temporarily, release the
allocated resources back to the system, and update the Availability.
Repeat until all processes are executed, or determine that the system is not in
a safe state.