Rahul Devashish
Rahul Devashish
22 Oct 2025·1 min read·—

Banker's Algorithm

Important data structures terms applied in the banker’s algorithm as follows: Suppose n is the number of processes, and m is the number of each type of resource used in a computer system.

  • Available: It is an array of length 'm' that defines each type of resource available in the system. When Available[j] = K, means that 'K' instances of Resources type R[j] are available in the system.
  • Max: It is a [n x m] matrix that indicates the maximum number of resources R[j] (each type) in a system.
  • Allocation: It is a matrix of n x m orders that indicates the type of resources currently allocated to each process in the system. When Allocation[i, j] = K, it means that process P[i] is currently allocated K instances of Resources type R[j] in the system.
  • Need: It is an M x N matrix sequence representing the number of remaining resources for each process. When the Need[i][j] = k, then process P[i] may require K more instances of resources type Rj to complete the assigned work. Nedd[i][j] = Max[i][j] - Allocation[i][j].
  • Finish: It is the vector of the order m. It includes a Boolean value (true/false) indicating whether the process has been allocated to the requested resources, and all resources have been released after finishing its task.

More Posts

Discover Other Writers

Explore posts from other contributors

You May Like

Discover other contributors