Let there n process P1, P2, P3, P4, …., Pn and maximum need of each process be X1, X2, X3, X4, …., Xn.
Deadlock will not occur if following condition is satisfied :
(X1 – 1) + (X2 – 1) + (X3 – 1) + (X4 – 1) + ….. + (Xn – 1) + 1 <= R
Given that there ‘m’ resources of the same type and n = 3 processes.
Maximum need of process A = 5
Maximum need of process B = 7
Maximum need of process C = 4
So, (5 – 1) + (7 – 1) + (4 – 1) + 1 <= m
i.e. 4 + 6 + 3 + 1 <= m
i.e. m >= 14
Thus, minimum value of ‘m’ that will ensure that deadlock will never occur = 14