Suppose processes, share identical resource units, which can be reserved and released one at a time. The maximum resource requirement of process is , where . Which one of the following is a sufficient condition for ensuring that deadlock does not occur?
View worked solution
Answer: C
To find the sufficient condition to prevent deadlock, we analyze the worst-case allocation scenario where a deadlock could potentially occur.
A deadlock occurs when every process has allocated some resources but cannot finish because it is waiting for more, and all resources are fully distributed.
The worst-case allocation where no process can complete its execution is when each process is allocated exactly resources (one less than its maximum requirement). In this state, the total number of allocated resources is:
If the total number of available resources is strictly greater than this worst-case allocation, then at least one process will be able to acquire its final required resource, run to completion, and release all its allocated resources back to the pool. This guarantees that deadlock cannot occur.
Therefore, for a deadlock-free system, we must have:
Rearranging the terms, we get:
Thus, Option C is the correct sufficient condition.
Free practice · Your answers on this page are not saved.
