'm'processes share 'n'resources of the same type. The ...
Assume m = 5 and n = 10
That means, 5 processes are sharing 10 resources and worst case will be if everyone is demanding equal number of cases.
So, for deadlock to be there every process must be holding 2 resources and seeking 1 more resource. This will make total demand to 15, which is nothing but 10 + 5 (m + n).
However, as given maximum demand is always less than (m + n), so we can say there will never be a deadlock.
View all questions of this test
'm'processes share 'n'resources of the same type. The ...
Introduction:
Deadlock is a situation in which two or more processes are unable to proceed because each is waiting for the other to release a resource. In the given scenario, multiple processes are sharing the same type of resources, where the maximum need of each process does not exceed 'n' and the sum of all their maximum needs is always less than 'm * n'.
Explanation:
The maximum need of each process does not exceed 'n' implies that each process requires a maximum of 'n' resources. The sum of all their maximum needs is always less than 'm * n' implies that the total number of available resources is greater than the maximum needs of all the processes combined.
Example:
Let's consider an example to understand this better. Suppose we have 'm' processes and 'n' resources of the same type. Each process requires a maximum of 'n' resources.
- Process 1 requires 'n' resources.
- Process 2 requires 'n' resources.
- Process 3 requires 'n' resources.
- ...
- Process m requires 'n' resources.
In this case, the sum of all the maximum needs of the processes will be 'm * n'.
If the total number of available resources is greater than 'm * n', then deadlock can never occur because there will always be enough resources for all the processes to complete their execution.
If the total number of available resources is equal to 'm * n', then deadlock may occur if the resources are not managed properly. However, in the given scenario, it is mentioned that the sum of all their maximum needs is always less than 'm * n', which means there will always be some resources available for other processes to use.
Conclusion:
Based on the given conditions, deadlock can never occur in this setup because the maximum needs of each process do not exceed the available resources, and the sum of all their maximum needs is always less than the total number of available resources. Therefore, option 'C' is the correct answer.
To make sure you are not studying endlessly, EduRev has designed Computer Science Engineering (CSE) study material, with Structured Courses, Videos, & Test Series. Plus get personalized analysis, doubt solving and improvement plans to achieve a great score in Computer Science Engineering (CSE).