Lecture 16
Lecture 16
Deadlock
MCQ
Reference
DISTRIBUTED DEADLOCK DETECTION
Deadlock
Deadlock is a situation where a set of processes are blocked because each process is holding a resource and waiting for
Resource deadlock:
set and it must receive all the requested resources before it can
become unblocked.
Communication deadlock:
which it is waiting.
DISTRIBUTED DEADLOCK DETECTION
no preemption
circular wait
All these conditions are necessary for deadlock to occur Hence, by preventing any one of these we prevent deadlock.
avoidance
detection
DISTRIBUTED DEADLOCK DETECTION
System Model
The systems have only reusable resources.
Resources are located at a site, but may be held by processes at other sites
Edge (P,Q) indicates P is blocked and waiting for Q to release some resource
inefficient, can become deadlocked at resource acquiring phase, resource requirements are unpredictable -- not an
Deadlock avoidance
The checking for a safe state must be done with mutual exclusion
Deadlock detection
maintenance of WFG
requirements
Categorization of Methods
centralized control
distributed control
hierarchical control
DISTRIBUTED DEADLOCK DETECTION
edge-chasing
diffusion
3. send each cycle including the node Ex to the external nodes it is waiting for
4. time-saver: only send path to other sites if last transaction is higher in lexical order than the first
DISTRIBUTED DEADLOCK DETECTION
Terminology
Pj is dependent on Pk if there is a sequence Pj,Pi1,Pi2,…….Pim, Pk such that each process except Pk is
blocked and each process except the first holds a resource for which the previous process is waiting
Pj is locally dependent on Pk if it is dependent and both processes are at the same site
Algorithm Initiation by Pi
if Pi is locally dependent on itself then declare a deadlock else send probe (i, j, k) to home site of Pk for
Pi is locally dependent on Pj
Pj is waiting on Pk
Pk is blocked
else send probe (i,m,n) to the home site of Pn for every m and n such that the following all hold
Pk is locally dependent on Pm
Pm is waiting on Pn
1. What is the access point (AP) in a wireless LAN? 4. In wireless distribution system __________
a) device that allows wireless devices to connect to a wired a) multiple access point are inter-connected with each
network other
c) both device that allows wireless devices to connect to a c) only one access point exists
wired network and wireless devices itself d) access points are not required
d) all nodes are access points c) both infrastructure mode and ad-hoc mode
http://cs-www.cs.yale.edu/homes/aspnes/classes/465/notes.pdf
https://www.geeksforgeeks.org/mutual-exclusion-in-distributed-system/
https://www.vidyarthiplus.com/vp/attachment.php?aid=43022
http://www.cs.fsu.edu/~xyuan/cop5611/lecture9.html
http://www.cs.fsu.edu/~xyuan/cop5611/lecture10.html