# Andrew S. Tanenbaum (OS) Edition 4 Exercise 6 Question 23 (Page No. 467)

67 views
Consider the previous problem again, but now with $p$ processes each needing a maximum of $m$ resources and a total of $r$ resources available. What condition must hold to make the system deadlock free?

We allocate all process with $m-1$ resources (one less than maximum requirement ).

So if we have $p*(m-1)$ resources we can have deadlock. When we have one more resource its guaranteed to be deadlock free.

So $r ≥ p(m − 1) + 1$

## Related questions

1
40 views
One way to eliminate circular wait is to have rule saying that a process is entitled only to a single resource at any moment. Give an example to show that this restriction is unacceptable in many cases.
The banker’s algorithm is being run in a system with $m$ resource classes and $n$ processes. In the limit of large $m$ and $n,$ the number of operations that must be performed to check a state for safety is proportional to $m^{a} n^{b}.$ What are the values of $a$ and $b?$
Suppose that process $A$ in Fig. 6-12 requests the last tape drive. Does this action lead to a deadlock?