Consider the following snapshot of a system running concurrent processes. Process is holding instances of a resource , . Assume that all instances of are currently in use. Further, for all , process can place a request for at most additional instances of while holding the instances it already has. Of the processes, there are exactly two processes and such that . Which one of the following conditions guarantees that no other process apart from and can complete execution?
View worked solution
Answer: A
To find the condition that guarantees no process other than and can complete, we analyze the resource allocation state step-by-step:
- Initial State: All instances of resource are currently in use, which means the number of currently free/available instances of is .
- Execution of and : We are given that . This means processes and require additional resources to complete. Since they need no additional resources, they can execute to completion and release the resources they currently hold ( and respectively).
- Available Resources after and finish: Once and complete, the total available resources in the system will be:
- Condition for other processes to complete:
For any other process (where and ) to complete, the system must be able to satisfy its maximum additional request .
If the total available resources is strictly less than the minimum additional requirement of all other processes, then no remaining process can ever satisfy its request: Under this condition, even the process with the smallest additional requirement cannot be satisfied, ensuring that no other process can complete execution.
Thus, Option A is the correct condition.
Free practice · Your answers on this page are not saved.
