0

18kviews

Explain data structures used in bankers algorithm

**1 Answer**

0

18kviews

Explain data structures used in bankers algorithm

0

1.6kviews

written 7.3 years ago by |

The bankerâ€™s algorithm is a method used in deadlock avoidance technique in multiple instances of a resource type.

The various data structures used in it are:

**Total_resource[ i ]: A 1-D**matrix of size m .It stores the total number of resources in a system.**Max[i , j ]: A 2-D**matrix where each process stores the maximum demand of resources (Rj) of process Pi.**Allocation [i , j]: A 2-D**matrix which stores the current allocation status of all resource types to various process in the system.**Need [i , j]: A 2-D**matrix which tells the current remaining resource need of each process. It is the maximum demand of a process and the current allocation status.**Need[ i,j]= Max[i , j ] - Allocation [i , j]****Avail[i]: A 1-D**matrix which stores the current available instances of each resource type.

ADD COMMENT
EDIT

Please log in to add an answer.