Please enable JavaScript.
Coggle requires JavaScript to display documents.
Deadlocks (Methods (Recovery (Resource preemption (Select a victim…
Deadlocks
Methods
-
Prevention
four nescesary condition
Mutual exclusion
must hold for non-sharable resource,so cannt b used for prevention
Hold and wait
when one process request a resource,it doest not hold any other resource
-
-
No preemption
if a process is holding some resources requests another resource,then all resource held r released
-
Avoidance
safe state
-
if process resource needs r not available then waits fr previous process to execute n release its resource,so it can obtain
-
unsafe state-has deadlock(need>avaialble) ,request delayed if deadlock occur
RAG scheme
claim edges -so when process request resource and converts to request edge and request edge convert to assg edge wen resource is allocated to process..
when resource release,jadi claim edge balik
Banker's algorithm
each process can claim maximum use and when process request,it will wait.It must return in a finite amount time
-
-
-
Process
-
-
Request
if cannot be granted immediately,then the request process mst wait till can acquire resource
Why is occurs?
Hold and wait
process holding one resource is waiting to acquire additional resource but it is held by other process
No preemption
resource can be released only voluntarily by process holding it,aft process has completed its task
-
Characterization
-
Resource
Allocation Graph
-
-
Cycle
-
-
if got cycle
if only one instance per resource type,then deadlock exists
several instances per resource type,then there might b deadlock
Define
A state when every process in the set of processes is waiting for an event that can be caused only by another process in the set.
-
-
-