A computer system consists of a finite number of resources. Processes compete to hold and use these resources. A process can utilize a resource in the following sequence:
 |
Request: if the requested resource is not available, then the process has to wait until it can acquire the |
 |
Use: The process operates on the resource. |
 |
Release: The process releases the resource. |
The operating system records whether each resource is free or allocated. For each allocated resource, the operating system records the process that allocates that resource. The operating system records the processes that request each allocated resources.
Deadlock can be defined as the permanent blocking of a set of processes that compete for system resources. A set of processes is deadlocked when each process in the set is blocked awaiting the freeing up of some requested resources that are allocated by another blocked process in the set.