ProgrammingforOutputProblems
October 6, 2023ComputerOrganization
October 6, 2023OperatingSystems
Question 9

Consider the following snapshot of a system running n concurrent processes. Process i is holding X_{i} 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 Y_{i} additional instances of R while holding the X_{i} instances it already has. Of the n processes, there are exactly two processes p and q such that Y_{p} = Y_{q} = 0. Which one of the following conditions guarantees that no other process apart from p and q can complete execution?
Min (X_{p}, X_{q}) ≥ Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}


X_{p} + X_{q} < Max {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}


Min (X_{p}, X_{q}) ≤ Max {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}


X_{p} + X_{q} < Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}

Question 9 Explanation:
{P_{1}, P_{2}, …, P_{n}}
P_{i} holds X_{i} instances.
P_{i} can request additional Y_{i} instances.
Given two process p & q such that their additional requests are zero.
Y_{p} = Y_{q} = 0
{Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q} means that out of ‘n’ processes, we are left with (n2) process (except p&q), i.e., Y_{k} indicates additional request of all the processes (n2) except p & q.
For p & q to complete first, accordingly
X_{p} + X_{q} < Min {Y_{k}}
Option D is correct.
There are exactly two process p and q which do not need any additional instances of resources.
So, p and q will complete their execution and will release X_{p} and X_{q} instances of resources.
Now to guarantee that no other process apart from p and q can complete execution, the no. of instances of resources available must be less than the minimum no. of instances of resources required by any other process, i.e.,
X_{p} + X_{q} < Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}.
P_{i} holds X_{i} instances.
P_{i} can request additional Y_{i} instances.
Given two process p & q such that their additional requests are zero.
Y_{p} = Y_{q} = 0
{Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q} means that out of ‘n’ processes, we are left with (n2) process (except p&q), i.e., Y_{k} indicates additional request of all the processes (n2) except p & q.
For p & q to complete first, accordingly
X_{p} + X_{q} < Min {Y_{k}}
Option D is correct.
There are exactly two process p and q which do not need any additional instances of resources.
So, p and q will complete their execution and will release X_{p} and X_{q} instances of resources.
Now to guarantee that no other process apart from p and q can complete execution, the no. of instances of resources available must be less than the minimum no. of instances of resources required by any other process, i.e.,
X_{p} + X_{q} < Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}.
Correct Answer: D
Question 9 Explanation:
{P_{1}, P_{2}, …, P_{n}}
P_{i} holds X_{i} instances.
P_{i} can request additional Y_{i} instances.
Given two process p & q such that their additional requests are zero.
Y_{p} = Y_{q} = 0
{Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q} means that out of ‘n’ processes, we are left with (n2) process (except p&q), i.e., Y_{k} indicates additional request of all the processes (n2) except p & q.
For p & q to complete first, accordingly
X_{p} + X_{q} < Min {Y_{k}}
Option D is correct.
There are exactly two process p and q which do not need any additional instances of resources.
So, p and q will complete their execution and will release X_{p} and X_{q} instances of resources.
Now to guarantee that no other process apart from p and q can complete execution, the no. of instances of resources available must be less than the minimum no. of instances of resources required by any other process, i.e.,
X_{p} + X_{q} < Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}.
P_{i} holds X_{i} instances.
P_{i} can request additional Y_{i} instances.
Given two process p & q such that their additional requests are zero.
Y_{p} = Y_{q} = 0
{Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q} means that out of ‘n’ processes, we are left with (n2) process (except p&q), i.e., Y_{k} indicates additional request of all the processes (n2) except p & q.
For p & q to complete first, accordingly
X_{p} + X_{q} < Min {Y_{k}}
Option D is correct.
There are exactly two process p and q which do not need any additional instances of resources.
So, p and q will complete their execution and will release X_{p} and X_{q} instances of resources.
Now to guarantee that no other process apart from p and q can complete execution, the no. of instances of resources available must be less than the minimum no. of instances of resources required by any other process, i.e.,
X_{p} + X_{q} < Min {Y_{k}  1 ≤ k ≤ n, k ≠ p, k ≠ q}.
Subscribe
Login
0 Comments