Please enable JavaScript.
Coggle requires JavaScript to display documents.
chap. 7 Deadlocks (Deadlock Recovery (abortall the deadlock processes,…
chap. 7 Deadlocks
Deadlock Recovery
- abortall the deadlock processes
- abort one process at a a time until the deadlock cycle is eliminated.
- Selecting a victim- minimize cost
- rollback- return to some safe state, restart process for that state
- Starvation- same process may always be picked as victim, include no. of rollback in cost factor.
Deadlock Prevention, Avoidance and Detection
Deadlock Prevention
- Mutual Exclusion-- not required for sharable resources, must hold for non-sharable resources
- Hold and Wait-- must guarantee that whenever a process requests a resource, it does not hold any other resources
- No Preemption-- process will be restarted only when it can regain its old resources, as well as the new ones that it is requesting.
*Circular Wait-- impose a ttal ordering of all resourse types, & require that each process request resources in an increasing order of enumeration.
Deadlock Avoidance
- simplest and most useful model requires that each process declare the maximum number of resources of each type that it may need
- the deadlock-avoidance algorithm dynamically examines the resources-allocation state to ensure that there can never be a circular-wait condition.
- resource-allocation state is defined by the number of available and allocated resources, and the maximum demands of the processes.
deadlock detection
- allow system to enter deadlock state
-
-
System Model follows:
- system consist of resource
- each process utilizes a resource as follows:
-
-
-
-
-