1. As far as neccessary is concerned, say there is a condition C and Event E:
If C is violated, then ~E
If C is satisfied, E may or may not hold
Here E is system is not approaching a deadlock
So, if a condition is violated, system is definitely approaching a deadlock. (~E)
If condition is satisfied, System might still approach a deadlock
2. At this pt of time, Pp and Pq will be releasing their respective resources as they haven’t placed any further requests.
3. That’s why the total resources available = xp + xq
4. For Option A), violate the condition. min of resources held by Pp and Pq > max of resources requested by other process. So, if the least no. of resources amongst Pp and Pq itself is able to satisfy the max request, then deadlock will obviously not take place. This is against the criteria of necessary condition. So, Option A is wrong.
5. For Option B), the condition is the sum of no. of resources held by p and q should atleast satisfy the min request. If it is not able to satisfy the min request(if the condition is violated), then obviously xp + xq won’t be enough to satisfy other requests as well. So, deadlock takes place.
Now, if the condition is satisfied, then the min request process will be executed and the no. of resources available = xp + xq + xi . But, what if other processes need more resources than this. That is, what if other processes are interested in the resources held by other process.
So, even if the condition is met, deadlock is occurring. Hence, Option B is correct.
6. In Option C), let’s violate the condition say max of the resources held by Pp and Pq is equal to 1. Both Pp and Pq are holding a single resource each. So, the total resources available for other processes are 2. Lets say every other process need 1 resource each to satisfy its request. So, deadlock is not taking place. Therefore, Option C is wrong.
7. In Option D), again by violating the condition say min of the resources held by Pp and Pq is 1, so the total resources available are 2. And again, other processes need only one resource to satisfy the request. So, again no deadlock in spite of the violation of condition. So, this option is also Wrong.