Jack Pressler
POS/355
11-25-2013
Liane Monaco
Deadlock
Deadlock can occur when the permanent blocking of a set of processes compete for the same system resources. A set of processes is deadlocked when each process in the set is blocked awaiting an event that can only be triggered by another blocked process in the set. Deadlock is permanent because none of the events are ever triggered. Three conditions must take place for a deadlock to take place. The first one is Mutual exclusion, which is a single process that uses one resource at a time. No process may access a resource unit that is being utilized by another process. Hold and wait is the second condition, it can be described as one process that holds assigned resources while waiting for another assignment. Finally, No preemption occurs when no resource can be forced or removed from a process holding it. These three conditions are necessary for a deadlock to exist. However, a fourth condition is required for an actual deadlock to take place. Circular wait occurs when a closed chain of processes exists, and each process holds one or more resources needed by the next process in the chain. This condition is an immediate result of the first three. Below is a self-explanatory illustration of Deadlock.
Deadlock blocks a set of processes that competes for system resources. This can be permanent unless the OS takes action, such as forcing one or more processes to backtrack. Deadlock may involve consumable or reusable resources. A reusable resource is one that is not depleted by use. A consumable resource is one that is destroyed when it is obtained by a process. There are three approaches to dealing with deadlock: prevention, detection, and avoidance. Prevention guarantees that deadlocks will not happen. Detection is required if the OS is willing to grant resource requests; the OS checks for deadlocks and takes action to break the deadlock. Avoidance involves the analysis of