(0) deadlock detection
Often neither deadlock avoidance nor deadlock prevention may be used. Instead deadlock detection and process restart are used by employing an algorithm that tracks resource allocation and process states, and rolls back and restarts one or more of the processes in order to remove the deadlock. Detecting a deadlock that has already occurred is easily possible since the resources that each process has locked and/or currently requested are known to the resource scheduler or OS.
Detecting the possibility of a deadlock before it occurs is much more difficult and is, in fact, generally undecidable, because the halting problem can be rephrased as a deadlock scenario. However, in specific environments, using specific means of locking resources, deadlock detection may be decidable. In the general case, it is not possible to distinguish between algorithms that are merely waiting for a very unlikely set of circumstances to occur and algorithms that will never finish because of deadlock.
Deadlock detection attempts to find and resolve actual deadlocks. These strategies rely on a Wait-For-Graph (WFG) that in some schemes is explicitly built and analyzed for cycles. In the WFG, the nodes represent processes and the edges represent the blockages or dependencies. Thus, if process A is waiting for a resource held by process B, there is an edge in the WFG from the node for process A to the node for process B.
In the AND model (resource model), a cycle in the graph indicates a deadlock. In the OR model, a cycle may not mean a deadlock since any of a set of requested resources may unblock the process. A knot in the WFG is needed to declare a deadlock. A knot exists when all nodes that can be reached from some node in a directed graph can also reach that node.
In a centralized system, a WFG can be constructed fairly easily. The WFG can be checked for cycles periodically or every time a process is blocked, thus potentially adding a new edge to the WFG. When a cycle is found, a victim is selected and aborted.
Welcome
Liezel P. Magcalayo Blog.......('',
Blog Archive
-
▼
2009
(22)
-
▼
August
(12)
- (0) Resource allocation grapha set of vertices V a...
- RESOURCE ALLOCATION GRAPH(0)A Resource Allocation ...
- (0) recovery from deadlock Recovery through preemp...
- (0) deadlock detection Often neither de...
- (0)Deadlock PreventionRestrain the ways requests c...
- (0) Methods for handling deadlockDeadlock Preventi...
- (0)deadlock characterization Deadlock can arise i...
- (0) thread scheduling>the thread scheduler, part o...
- (0)Real Time Scheduling• Many real time systems ru...
- (0) Multiprocessor SchedulingVery little has to be...
- Substantial Information about threads of Operating...
- (0) CPU Scheduling algorothmsCPU scheduling algori...
-
▼
August
(12)
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment