Minimal number of resources such that the system is considered safe?

In a system with a single type of resource, there are 8 processes with the following maximal requirements:

Process P1 P2 P3 P4 P5 P6 P7 P8
MAX 75 60 65 35 30 45 30 30

Specify the minimal value for the total number of available resources, so that the state of the system is considered safe, in the scenario where the initial allocation of resources is

Process P1 P2 P3 P4 P5 P6 P7 P8
Allocation 12 5 10 5 5 0 0 10

I understand that the minimum number of resources should be computed by the following formula:

$$R \ge P \cdot (N-1) + 1$$

meaning that we would have:

\begin{align} R &\ge 8 \cdot (74+59+64+34+29+44+29+29) + 1 \\ R &\ge 8 \cdot 362 + 1 \\ R &\ge 2897 \end{align}

However, this does not seem right. The number seems too big and I don't see the purpose of the initial allocation in this exercise.

Am I doing something wrong? Am I using the wrong formula? Please help me understand how to solve this kind of problems.

• The way to solve this kind of problem is not to use any formula. Instead, try to understand what it means that the system is in a safe system. If you do, you won't need any formulas. – Yuval Filmus Jan 31 at 8:11
• For example, does subtracting 1 from 75, 60, ... make any sense? Does summing and then multiplying the result by 8 make any sense? Don't just mindlessly plug in numbers in formulas. – Yuval Filmus Jan 31 at 8:14
• The formula is there to help you. Instead, it is confusing you. That's why I suggest ignoring the formula. – Yuval Filmus Jan 31 at 8:14