- Select the number of processes (P) and number of resources (R) and click the SUBMIT button to initialize the data structures, including the Allocation Matrix, Available Matrix (vector), and Maximum Matrix.
- Enter the calculated values into the Need Matrix using the following formula:
Need Matrix = Maximum Matrix - Allocation Matrix
- Click on the CHECK button to verify the need matrix.
- Click on the START button to initialize the Work and Finish Vectors.
- Click on the NEXT button to:
- Check if the need of process Pi can be satisfied with the current Work vector using:
Needi <= Work
- Repeat Step 5 until you obtain either a safe or unsafe sequence based on the completion status of the processes.
NOTE 1: The highlighted row in the Allocation Matrix indicates that the process Pi has been included in the safe sequence.
NOTE 2: We can have multiple safe sequences for a given system.
NOTE 3: Read the alerts carefully.