Consider a system having resources of the same type. These resources are shared by processes , and which have peak demands of , and respectively. For what value of deadlock will not occur?
View worked solution
Answer: D;E
To ensure that a deadlock will never occur, the total number of resources must be sufficient to guarantee that at least one process can satisfy its peak demand even in the worst-case allocation.
Let the peak demands of the three processes and be and respectively:
In the worst-case scenario, each process is allocated one resource less than its peak demand, and no resources are left to satisfy any process. The maximum number of resources that can be allocated in this deadlock state is:
If we add just more resource to this state, at least one process will get its peak demand, complete its execution, and release its resources, thereby preventing deadlock. Thus, the condition for a deadlock-free system is:
Therefore, deadlock will not occur for any value of .
Evaluating the given options:
- A. 7: (Deadlock can occur)
- B. 9: (Deadlock can occur)
- C. 10: (Deadlock can occur)
- D. 13: (Deadlock will not occur)
- E. 15: (Deadlock will not occur)
Thus, the correct options are D and E.
Free practice · Your answers on this page are not saved.
