The banker’s algorithm is a resource allocation and deadlock avoidance algorithm.
Let ‘n’ be the number of processes in the system and ‘m’ be the number of resources types.
Process Format P0, P1, P2, P3.... Resources Types Format A, B, C, ....
Available Vector :
It is a 1-d array of size ‘m’.
Max Matrix:
It is a 2-d array of size ‘n*m’.
Allocation :
It is a 2-d array of size ‘n*m’.
Need Matrix :
It is a 2-d array of size ‘n*m’.
for more info about Banker’s Algorithm click here.
you can find different test case in .txt file