wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A single processor system has three resource types X, Y and Z, which are shared by three processes. There are 5 units of each resource type. Consider the following scenario, where the column alloc denotes the number of units of each resource type allocated to each process, and the column request denotes the number of units of each resource type requested by a process in order to complete execution. Which of these processes will finish LAST?
alloc request
P0 121 103
P1 201 012
P2 221 120

Open in App
Solution

alloc request
XYZ XYZ
P0 121 103
P1 201 012
P2 221 120

So the available matrix is (0, 1, 2) and the requirement of process P1 is (0, 1,2) and the requirement of process P1 is (0,1,2) so P1 can use the available resources after releasing the resources the matrix becomes:
alloc request
XYZ XYZ
P0 121 103
P1 000 000
P2 221 120

In this time available matrix is (2 1 3) and required matrix of P0 is (1 0 3) so P0 uses the resources of the releasing the reource. T the available matrix is (3,3,4) so P2 will use the resources , P2 will finish last.

flag
Suggest Corrections
thumbs-up
6
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Banker's Algorithm
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon