An operating system contains 3 user processes each requiring 2 units of resource R. the minimum number of units of r such that no deadlocks will ever arise is
A |
3 |
B |
5 |
C |
4 |
D |
6 |
For the system to cause deadlock give each process 1 resource less than they require.
Since in this case they require 2 resource each, so just give them 1 resource each.
So if at max if 3 resource will be available then there can be deadlock.
So by adding one more resource deadlock will never occur.
So in total minimum 4 resources are required so that deadlock will never occur.
Thank You