'. '

Deadlock conditions

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(New page: == Mutual exclusion == The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary. == Hold and wait or partial al...)
(Mutual exclusion)
Line 1: Line 1:
== Mutual exclusion ==
== Mutual exclusion ==
-
The resources involved must be unshareable; otherwise, the processes would not be prevented from using the resource when necessary.
+
The resources involved must be exclusive. Once a thread gets on hold of a resource, nobody else can use it. Otherwise the concurrent threads would not be prevented from using the resource.
-
 
+
== Hold and wait or partial allocation ==
== Hold and wait or partial allocation ==

Revision as of 07:46, 19 October 2014

Contents

Mutual exclusion

The resources involved must be exclusive. Once a thread gets on hold of a resource, nobody else can use it. Otherwise the concurrent threads would not be prevented from using the resource.

Hold and wait or partial allocation

The processes must hold the resources they have already been allocated while waiting for other (requested) resources. If the process had to release its resources when a new resource or resources were requested, deadlock could not occur because the process would not prevent others from using resources that it controlled.

No pre-emption

The processes must not have resources taken away while that resource is being used. Otherwise, deadlock could not occur since the operating system could simply take enough resources from running processes to enable any process to finish.

Resource waiting or circular wait

A circular chain of processes, with each process holding resources which are currently being requested by the next process in the chain, cannot exist. If it does, the cycle theorem (which states that "a cycle in the resource graph is necessary for deadlock to occur") indicated that deadlock could occur.

four necessary and also sufficient conditions

Personal tools
buy