Distributed deadlock Assume each process owns a few resources, and review how resources are allocated. Why deadlocks occur? - Exclusive (i.e not shared)

Slides:



Advertisements
Similar presentations
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
Advertisements

1 Distributed Deadlock Fall DS Deadlock Topics Prevention –Too expensive in time and network traffic in a distributed system Avoidance.
Handling Deadlocks n definition, wait-for graphs n fundamental causes of deadlocks n resource allocation graphs and conditions for deadlock existence n.
Deadlock Prevention, Avoidance, and Detection.  The Deadlock problem The Deadlock problem  Conditions for deadlocks Conditions for deadlocks  Graph-theoretic.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Basics of Deadlock Theory.
DEADLOCK. Contents  Principles of deadlock  Deadlock prevention  Deadlock detection.
6. Deadlocks 6.1 Deadlocks with Reusable and Consumable Resources
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
Global State Collection. Global state collection Some applications - computing network topology - termination detection - deadlock detection Chandy-Lamport.
Chapter 3 Deadlocks TOPICS Resource Deadlocks The ostrich algorithm
MODERN OPERATING SYSTEMS Third Edition ANDREW S. TANENBAUM Chapter 6 Deadlocks Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All.
Operating Systems Principles Process Management and Coordination Lecture 6: Deadlocks 主講人:虞台文.
Distributed Snapshot (continued)
Chapter 6 Concurrency: Deadlock and Starvation
Deadlock Detection with One Resource of Each Type (1)
Chapter 6 Deadlocks Resources Introduction Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Distributed process management: Distributed deadlock
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
UBI529 Distributed Algorithms
Chapter 7 –System Model – typical assumptions underlying the study of distributed deadlock detection Only reusable resources, only exclusive access, single.
DEADLOCK DETECTION ALGORITHMS IN DISTRIBUTED SYSTEMS
Deadlock cs550 Operating Systems David Monismith.
Global State Collection
Hwajung Lee. Some applications - computing network topology - termination detection - deadlock detection Chandy Lamport algorithm does a partial job.
Ch 3 –What is a deadlock ? –Conditions Hold and Wait Mutual Exclusion Non Preemption Circular Wait –Deadlock Models Single Unit Request AND Request OR.
Deadlocks References –text: Tanenbaum ch.3. Deadly Embrace Deadlock definition –A set of process is dead locked if each process in the set is waiting.
ICS Deadlocks 6.1 Deadlocks with Reusable and Consumable Resources 6.2 Approaches to the Deadlock Problem 6.3 A System Model –Resource Graphs –State.
7: Deadlocks1 OPERATING SYSTEMS DEADLOCKS. 7: Deadlocks2 What Is In This Chapter? What is a deadlock? Staying Safe: Preventing and Avoiding Deadlocks.
Deadlocks Lots of resources can only be used by one process at a time. Exclusive access is needed. Suppose process A needs R1 + R2 and B needs R1 + R2.
Termination detection
CSE 120 Principles of Operating
Synchronization: Distributed Deadlock Detection
Mutual Exclusion A condition in which there is a set of processes, only one of which is able to access a given resource or perform a given function at.
Ch 3 What is a deadlock ? Conditions Deadlock Models Hold and Wait
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Operating systems Deadlocks.
Chapter 18 Distributed Control Algorithms
The Echo Algorithm The echo algorithm can be used to collect and disperse information in a distributed system It was originally designed for learning network.
Deadlock Management.
ITEC452 Distributed Computing Lecture 9 Global State Collection
Outline Distributed Mutual Exclusion Distributed Deadlock Detection
OPERATING SYSTEMS DEADLOCKS
Lecture 18: Deadlock: Conditions, Detection and Avoidance (cont.)
CS 143A – Winter 2013 Quiz 2 Solutions.
Lecture 19: Deadlock: Conditions, Detection and Avoidance
Outline Introduction Background Distributed DBMS Architecture
Global state collection
Deadlocks Definition A set of processes is in a Deadlock state when every process in the set is waiting for an event that can only be caused by another.
Operating systems Deadlocks.
Deadlock B.Ramamurthy CSE421 1/11/2019 B.Ramamurthy.
Global State Collection
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Deadlock B.Ramamurthy CSE421 2/23/2019 B.Ramamurthy.
The relation between the process and
DEADLOCK.
Lecture 27 Syed Mansoor Sarwar
Lecture 19: Deadlock: Conditions, Detection and Avoidance
ITEC452 Distributed Computing Lecture 7 Mutual Exclusion
Deadlock B.Ramamurthy CSE421 4/23/2019 B.Ramamurthy.
Distributed Deadlock Detection
IT3002 Computer Architecture
Deadlock B.Ramamurthy CSE421 5/1/2019 B.Ramamurthy.
OPERATING SYSTEMS DEADLOCKS.
DEADLOCKS.
Deadlocks.
Operating Systems Principles Process Management and Coordination Lecture 6: Deadlocks 主講人:虞台文.
Chapter 8: Deadlocks Deadlock Characterization
Deadlock B.Ramamurthy CSE421 8/28/2019 B.Ramamurthy.
Deadlock B.Ramamurthy CSE421 9/3/2019 B.Ramamurthy.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
Presentation transcript:

Distributed deadlock Assume each process owns a few resources, and review how resources are allocated. Why deadlocks occur? - Exclusive (i.e not shared) resources - Non-preemptive scheduling - Circular waiting by all or a subset of processes

Distributed deadlock Three aspects of deadlock deadlock prevention deadlock detection deadlock prevention deadlock recovery

Distributed deadlock May occur due to bad designs/bad strategy [Sometimes prevention is more expensive than detection and recovery. So designs may not care about deadlocks, particularly if it is rare.] Caused by failures or perturbations in the system

Wait-for Graph (WFG) Represents who waits for whom. No single process can see the WFG. Review how the WFG is formed.

Another classification Resource deadlock [R1 AND R2 AND R3 …] also known as AND deadlock Communication deadlock [R1 OR R2 OR R3 …] also known as OR deadlock

Detection of resource deadlock Notations w(j) = true  (j is waiting) depend [j,i] = true  j  succn(i) (n>0) P(i,s,k) is a probe (i=initiator, s= sender, r=receiver) 2 1 3 4 P(4,4,3) initiator

Detection of resource deadlock {Program for process k} do P(i,s,k) received  w[k]  (k ≠ i) ¬ depend[k, i]  send P(i,k,j) to each successor j; depend[k, i]:= true P(i,s, k) received w[k]  (k = i)  process k is deadlocked od

Observations To detect deadlock, the initiator must be in a cycle Message complexity = O(|E|) (edge-chasing algorithm) E=set of edges

Communication deadlock 5 This WFG has a resource deadlock but no communication deadlock

Detection of communication deadlock A process ignores a probe, if it is not waiting for any process. Otherwise, first probe  mark the sender as parent; forwards the probe to successors Not the first probe  Send ack to that sender ack received from every successor  send ack to the parent Communication deadlock is detected if the initiator receives ack. Has many similarities with Dijkstra-Scholten’s termination detection algorithm