Deadlock avoidance must be performed to make a good computer system.
In other words, the system must be able to decide whether granting a resource is safe or unsafe.
And the system must only make the allocation when it is totally safe.
Therefore for every system, deadlock avoidance must be performed.
Deadlock avoidance can be performed in one of the following ways/algorithms.