The Banker's Algorithm is a critical deadlock avoidance method in operating…

2024

The Banker's Algorithm is a critical deadlock avoidance method in operating systems, designed to facilitate resource allocation without causing deadlock. It operates by maintaining information about the maximum resources Each process may require, the current allocated resources and the available resources in the system. The algorithm checks each resource request to determine, if granting it would leave the system in a safe state, meaning that there is always a sequence in which all processes can complete their execution without getting stuck due to resource unavailability. Each process must specify its maximum demand for each resource type before it starts execution. When a process requests additional resources, the algorithm checks if granting the request will keep the system in a safe state. If so, the resources are allocated otherwise the process must wait until its request can be safely fulfilled.
Which of the following is NOT a requirement for Banker's algorithm to grant a resource request?

  1. A.

    The requested resources must be available.

  2. B.

    The system must be in a safe state after granting the request.

  3. C.

    The request must not exceed the maximum resources the process can request.

  4. D.

    The process must be the only one requesting resources.

Attempted by 150 students.

Show answer & explanation

Correct answer: D

Answer: The statement "The process must be the only one requesting resources." is NOT a requirement for the Banker's algorithm.

Key requirements the Banker's algorithm enforces before granting a request:

  • Requested resources must be available: The algorithm first checks that the current available resources are at least the amounts requested for each resource type.

  • The request must not exceed the process's declared maximum need: A process cannot request more than its remaining need (maximum declared demand minus what is already allocated).

  • The system must remain in a safe state after the hypothetical allocation: The algorithm simulates granting the request and verifies there exists an order in which all processes can finish without deadlock.

Why the statement about being the only requester is incorrect:

  • The algorithm does not require exclusivity: Multiple processes can make requests. Each request is evaluated independently using the checks above (availability, not exceeding declared maximum, and safety). Being the only requester is not a condition for allocation.

Conclusion: The non-requirement is that a process must be the only one requesting resources; the actual requirements are availability, conformity with the declared maximum need, and maintaining a safe state.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor