0% found this document useful (0 votes)
3 views1 page

Bankers Algorithm Questions

The document presents numerical questions related to the Banker's Algorithm, focusing on determining safe sequences and checking system states. It includes examples with given Allocation, Max, and Available resources, along with step-by-step solutions for finding needs and safe sequences. Key questions involve checking if a system is in a safe state and whether a resource request can be granted based on the algorithm's criteria.

Uploaded by

anshikasahu330
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Bankers Algorithm Questions

The document presents numerical questions related to the Banker's Algorithm, focusing on determining safe sequences and checking system states. It includes examples with given Allocation, Max, and Available resources, along with step-by-step solutions for finding needs and safe sequences. Key questions involve checking if a system is in a safe state and whether a resource request can be granted based on the algorithm's criteria.

Uploaded by

anshikasahu330
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Banker's Algorithm - Important Numerical

Questions with Solutions

Question 1: Given Allocation, Max and Available resources, determine safe sequence.

Allocation: P0(0,1,0), P1(2,0,0), P2(3,0,2)

Max: P0(7,5,3), P1(3,2,2), P2(9,0,2)

Available: (3,3,2)

Solution: Need = Max - Allocation. Compute need and check safe sequence step by step.

Need: P0(7,4,3), P1(1,2,2), P2(6,0,0)

Safe sequence: P1 → P2 → P0

Question 2: Check if system is in safe state.

Allocation: P0(1,0,1), P1(2,1,0)

Max: P0(3,2,1), P1(2,2,2)

Available: (1,1,1)

Solution: Need = Max - Allocation

Need: P0(2,2,0), P1(0,1,2)

System is safe: P1 → P0

Question 3: Check if request can be granted.

Process P1 requests (1,0,2)

Check: Request ≤ Need and Request ≤ Available

Then simulate allocation and check safe state.

If safe → Grant, else → Wait

You might also like