Consider the following snapshot of a system running n concurrent processes. Process i is holding Xi instances of a resource R, 1 ≤ i ≤ n. Assume that all instances of R are currently in use. Further, for all i, process i can place a request for at most Yi additional instances of R while holding the Xi instances it already has. Of the n processes, there are exactly two processes p and q such that Yp = Yq = 0. Which one of the following conditions guarantees that no other process apart from p and q can complete execution?
Consider the following snapshot of a system running n concurrent processes. Process i is holding Xi instances of a resource R, 1 ≤ i ≤ n. Assume that all instances of R are currently in use. Further, for all i, process i can place a request for at most Yi additional instances of R while holding the Xi instances it already has. Of the n processes, there are exactly two processes p and q such that Yp = Yq = 0. Which one of the following conditions guarantees that no other process apart from p and q can complete execution? Correct Answer X<sub>p</sub> + X<sub>q</sub> < Min {Y<sub>k</sub> | 1 ≤ k ≤ n , k ≠ p, k ≠ q}
|
Process |
1 |
2 |
3 |
4 |
… |
p |
q |
.. |
n |
|
Resource instance Allocated |
X1 |
X2 |
X3 |
X4 |
.. |
Xp |
Xq |
… |
Xn |
|
Additional resource need |
Y1 |
Y2 |
Y3 |
Y4 |
… |
Yp = 0 |
Yq = 0 |
… |
Yn |
All instances of ‘R’ are currently in use. Therefore, available resource = 0
Additional need of process p and q are 0. Therefore, process p and q will release the instances Xp and Xq held by it after its execution.
Available resource = Xp + Xq
To guarantees that no other process apart from p and q can complete execution
Available Resource < minimum of additional resource needed
Xp + Xq < Min {Yk | 1 ≤ k ≤ n, k ≠ p, k ≠ q}