retagged by
12,428 views
30 votes
30 votes

Consider the following snapshot of a system running $n$ concurrent processes. Process $i$ is holding $X_i$ instances of a resource $R$, $1 \leq i \leq 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?

  1. $X_p + X_q < \text{Min} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q \}$
  2. $X_p + X_q < \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q \}$
  3. $\text{Min}(X_p,X_q) \geq \text{Min} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
  4. $\text{Min}(X_p,X_q) \leq \text{Max} \{Y_k \mid 1 \leq k \leq n, k \neq p, k \neq q\}$
retagged by

7 Answers

2 votes
2 votes

We have to ensure deadlock.

So, the soon-to-be-available resources ($X_p + X_q$) should not satisfy even the minimum demand of any other process.

Option A

0 votes
0 votes

P & Q does'nt require any additional resource & therefore they will complete their execution. After that, they will release there aquired resources.(Xp & Xq). Now these resources will be allotted to the process which need less than or equal to the sum of these resources. If only these two processed will complete it's execution & no other process will, then Xp+Xq < min(request  for resource by all the processes), this condition must be satisfied. Option A is correct.

0 votes
0 votes

P & Q does'nt require any additional resource & therefore they will complete their execution. After that, they will release there aquired resources.(Xp & Xq). Now these resources will be allotted to the process which need less than or equal to the sum of these resources. If only these two processed will complete it's execution & no other process will, then Xp+Xq < min(request  for resource by all the processes), this condition must be satisfied. Option A is correct. rest other options may not satisy the condition.

Answer:

Related questions

25 votes
25 votes
6 answers
1
40 votes
40 votes
4 answers
3
18 votes
18 votes
5 answers
4