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
X Y Z X Y Z
P0 1 2 1 1 0 3
P1 2 0 1 0 1 2
P2 2 2 1 1 2 0
A |
P0 |
B |
P1 |
C |
P2 |
D |
None of the above, since the system is in a deadlock. |
Given that there are 5 units of each resource type.
543:
System is in safe state
Order of Execution = p1, p0, p2
P2 will execute last.