Question: Which of the following data structures must be maintained to implement the banker’s algorithm , where n is the number of processes in the system and m is the number of resource types:
<ol>
<li>A vector of length m indicates the number of available resources of each type. If Available[j] equals k, then k instances of resource type Rj are available.</li>
<li>An n × m matrix defines the maximum demand of each process. If Max[i][j] equals k, then process Pi may request at most k instances of resource type Rj</li>
<li>An n × m matrix defines the number of resources of each type currently allocated to each process. If Allocation[i][j] equals k, then process Pi is currently allocated k instances of resource type Rj.</li>
<li>An n × m matrix indicates the remaining resource need of each process. If Need[i][j] equals k, then process Pi may need k more instances of resource type Rj to complete its task. Note that Need[i][j] equals Max[i][j] − Allocation[i][j].</li>
</ol>
Answer:
MCQ: Which of the following data structures must be maintained to implement the banker’s algorithm , where n is the number of processes in the system and m is the number of resource types:
<ol>
<li>A vector of length m indicates the number of available resources of each type. If Available[j] equals k, then k instances of resource type Rj are available.</li>
<li>An n × m matrix defines the maximum demand of each process. If Max[i][j] equals k, then process Pi may request at most k instances of resource type Rj</li>
<li>An n × m matrix defines the number of resources of each type currently allocated to each process. If Allocation[i][j] equals k, then process Pi is currently allocated k instances of resource type Rj.</li>
<li>An n × m matrix indicates the remaining resource need of each process. If Need[i][j] equals k, then process Pi may need k more instances of resource type Rj to complete its task. Note that Need[i][j] equals Max[i][j] − Allocation[i][j].</li>
</ol>