Note: Banker's Algorithm is a deadlock avoidance algorithm, which allocates resources in a way that deadlock can be prevented.
Arrays used in banker’s algorithm
[Max]- Maximum no: of resources, requested by each process.
2. [Allotted] -Resources allotted to each process.
3. [Available] – At last, how many resources are still available in the system ( Not allotted) .
4. . [Need] : It is an M x N matrix sequence representing the number of remaining resources for each process.
Need[i][j] = Max[i][j] – Allocation[i][j].
5. [Finish] : It includes a Boolean value (true/false) indicating whether the process has been allocated to the required resources, and whether all resources have been released after finishing its task