Deadlock prevention Programmers can preventdeadlockby disciplined observance of some policy that guarantees that at least one of the prerequisites of deadlock (mutual exclusion, hold and wait, no preemption of the resource, and circular wait) can never occur in the system. Themutual exclusionconditi...
Deadlock Detection in OS In deadlock detection, the operating system considers that a deadlock situation will occur and then it will identify it. No methods for prevention or avoidance of deadlocks are applied here. So, the OS analyses if there is a deadlock. If detected, recovery methods a...