Here is some material mostly from Brinch Hansen classic OS book and from Maezawa, Oldehoeft, Oldehoeft OS book. Introduction Deadlock occurs when we have a set of processes, each holding some resources, each requesting some resources, and none of them is able to obtain what it needs, i.e. to make progress. Resources can be preemptable or non-preemptable . Of course, one may choose to deal with intrinsically preemptable resources as if they were non-preemptable. In our discussion we only consider non-preemptable resources.
Resources can be reusable or consumable .
They are reusable if they can be used again after a process is done using them. Memory, printers, tape drives are examples of reusable resources. Consumable resources are resources that can be used only once. For example a message or an event. If two processes are waiting for a message and one receives it, then the other process remains waiting.