Coffman conditions

A deadlock can occur only and only if all of the four conditions occur.

Preventing deadlocks

These techniques guarantee that concurrent processes will not deadlock.

Avoiding deadlocks

These techniques guarantee that the system will not allow a process to acquire a lock if can produce a deadlock.