Distributed Deadlock Detection
|
|
- Shannon Simpson
- 6 years ago
- Views:
Transcription
1 Distributed Deadlock Detection COMP 512 Spring 2018 Slide material adapted from Dist. Systems (Couloris, et. al) and papers/lectures from Kshemkalyani, Singhal, 1
2 Distributed Deadlock What is deadlock? Exclusive access, hold and wait, no preemption, circular wait (4 necessary/sufficient conditions) How does deadlock in a distributed system differ from deadlock in a centralized system? Messages may be delivered out of order, garbled, or lost Processors may fail; communication may go down
3 Distributed Deadlock Detection Assumptions Reusable resources Exclusive access Only one copy of each resource 3
4 Wait For Graph The state of the system can be modeled by a directed graph called a wait for graph (WFG) [sometimes called a transaction WFG or TWF] In a WFG, nodes are processes and there is a directed edge from node P1 to node P2 if P1 is blocked and is waiting for P2 to release some resource A system is deadlocked if and only if there exists a directed cycle or knot in the WFG WFG is just general a reduced general resource graph (GRG)
5 Deadlocks Resource Deadlocks Most common A process needs resources for an activity Communication Deadlocks Processes wait to communicate with other processes in a set 5
6 Request Models Single Unit Request Model AND Request Model OR Request Model AND/OR Request Model P-out-of-Q Request Model 6
7 Detecting Deadlock In a general resource graph, a cycle is a necessary condition for deadlock If the GRG is expedient, then a knot is a sufficient condition for deadlock Deadlock existence of a cycle Knot (in exp system) deadlock Absence of knot Absence of deadlock 7
8 Deadlock Handling Strategies Deadlock prevention Deadlock avoidance Deadlock detection Deadlock detection algorithms must satisfy two conditions: No undetected deadlocks (progress) No false (phantom) deadlocks (safety) Deadlock resolution (fix it) 8
9 Deadlock Prevention Wait-die (older waits on younger; younger dies if needs to wait on older) Wound-wait (older preempts younger; younger waits on older) 9
10 Centralized Deadlock Detection A control site( coord ) constructs wait-for graphs (WFGs) and checks for directed cycles Simple, easy to implement Poor availability, lack of fault tolerance Large response time Congestion Can suffer from phantom deadlock 10
11 Ho-Ramamoorthy 2-phase Algorithm Each site maintains a status table of all processes initiated at that site (includes resources locked and resources requested by processes) Phase 1: Coord periodically requests the status table from each site and constructs WFG from these tables, searches for cycle(s) Phase 2: If cycle detected, requests status tables again, constructs WFG based onlyon transactions common to both reports If the same cycle is detected again, system is declared deadlocked Later proven that cycles in 2 consecutive reports need not result in a deadlock; hence, this algorithm detects phantom deadlocks 11
12 Ho-Ramamoorthy 1-phase Algorithm Each site maintains 2 tables: resource statustable and process status table Resource table: tracks all transactions that have locked or are requesting resources stored at that site Process table: tracks resources locked or requested by all transaction at that site Coord site periodically collects these tables from each site and constructs a WFG from transactions common to both the tables by adding a request/assignment edge between P and Q if and only if P and Q appear consistently in both of the relevant process and resource status tables Faster than 2 phase but requires more storage and bigger messages 12
13 Deadlock Detection Distributed Control (DDD) WFG is spread over different sites; any site can initiate the deadlock detection process Hierarchical Control Sites are arranged in a hierarchy A site checks for cycles only in descendants 13
14 DDD Characteristics Responsibility shared equally Global state graph spread over many sites and several sites participate in detection of cycle Detection initiated when process suspects deadlock (several sites may initiate detection for same deadlock) Proof of correctness very difficult Deadlock resolution cumbersome (several sites can detect the same deadlock and may not be aware each other) 14
15 Classes of DDD Algorithms Edge-chasing: special messages or probes circulated along edges of WFG; deadlock exists if the probe is received back by the initiator Examples: Chandy-Misra-Haas for AND model, Mitchell-Merritt Path-pushing: resource dependency information disseminated/propagated through designated paths (in the graph); basic idea: build global WFG Examples: Manasce-Muntz, Obermarck 15
16 DDD Algorithms Diffusion computation: queries diffused through WFG ( are you blocked probes sent along edges) Examples: CMH for OR model, Chandy-Herman Global state detection: exploit the ability to get a consistent snapshot of the system without freezing underlying computation Examples: Bracha-Toueg, Kshemkalyani-Singhal 16
17 Edge-Chasing Algorithm Chandy-Misra-Haas Algorithm: Based on the AND model No global WFG in constructed A probe(i, j, k) is used for deadlock detection. This probe is initiated by P i, being sent by P j, and being set to P k. This probe message is circulated via the edges of the graph; A probe returning to P i implies deadlock detection. Terms used: P j is dependenton P k, if a sequence of P j, P i1,.., P im, P k exists and each in the sequence except P k is blocked and waiting on the next. P j is locally dependenton P k, if above condition + P j, P k at same site. Each process maintains an array dependent i : dependent i (j) is true if P i knows that P j is dependent on it (initially set to false for all i & j). 17
18 Chandy-Misra-Haas Algorithm Formally, sending the probe: IF (P i is locally dependent on itself) THEN declare deadlock ELSE (for all P j and P k such that P i is locally dependent upon P j AND P j is waiting on P k AND P j and P k are on different sites) send probe(i,j,k) to the home site of P k 18
19 Chandy-Misra-Haas s Algorithm Formally, receiving the probe: IF (P k is blocked AND dependent k (i)is falseand P k has not replied to all requests of P j ) THEN dependent k (i) = true; IF (k = i) THEN declare P i is deadlocked ELSE (for all P m and P n such that P k is locally dependent upon P m AND P m is waiting on P n AND P m and P n are on different sites) send probe(i,m,n) to the home site of P n ENDIF 19
20 Chandy-Misra-Haas s Algorithm Performance: For a deadlock that spans m processes over n sites, how many messages are needed? Size of the message is 3 words Delay in deadlock detection is O(n) 20
21 Mitchell-Merritt Each node has two labels : Public & Private Private label is unique to node but may change Initially both private and public label values are same Guarantees that only one process will detect the deadlock Detects deadlock by propagating the public label backwards through the WFG When a blocked transaction reads the public label of a blocking process, it replaces its public label if the blocking process s public label is larger When a initiator process reads the message with public label equals to its own then deadlock is detected 21
22 u Mitchell-Merritt Algorithm The algorithm exhibits 4 nondeterministic state transitions State Before v Block State State After x v x Value x is any value which is larger than both u,v 1. This block step occurs when a process begins to wait on some resource held by other [ Creates an edge in WFG] 2. Label change occurs in this step for waiting process 3. Both public and private labels of the waiting process are increased to a value greater than their previous values & greater than the public label of the process being waited on
23 State Before u v Transmit State If u < v State After v v 1.Blocked transaction periodically reads public label of blocking transaction and replaces its own public label with it (provided blocking transaction s public label is larger) 2.Waiting process s private label remains unchanged
24 Detection State Before u u u State After u u u 1. Deadlock is detected when a transaction receives its own public label 2. When a process reads a public label of the waiting upon process and finds that the public label value of waiting upon process is equals to its own public label value then it determines that a cycle exists and declares deadlock
25 Path-pushing Obermarck s Algorithm (AND model) Path propagation-based algorithm Based on a database model using transaction processing (transactions totally ordered) Sites which detect a cycle in their partial WFG views convey the paths discovered to members of the (totally ordered) transaction Algorithm can detect phantoms due to its asynchronous snapshot method 25
26 Obermarck s Algorithm A site waits for deadlock-related information (produced in previous iteration) from other sites The site combines the received information with its local wait for graph to build an updated graph Non-local portion of graph is abstracted by a node called Ex(External) The site detects all cycles and breaks localcycles, i.e., those that do not contain Ex Cycles with Ex node are potential global deadlocks 26
27 Obermarck salgorithm (cont) For cycles with Ex nodes: Site builds a string Ex, T1, T2, Ex for possible global cycles This string is transmitted to all other sites where a subtransaction of T2 is waiting for a message from another transaction in the other site Reducing message exchanges: a string Ex, T1, T2, T3, Ex is sent to other sites only if T1 is (lexically) higher than T3 (otherwise, wait for another site to initiate the message) Priorities among transactions: higher priority transaction detects the deadlock Obermarck s algorithm can detect false deadlocks as the snapshot of the distributed system taken is asynchronously by different sites (global cycles can change with time and may not by reflected in the local information) Example 27
28 Obermarck salgorithm Example 28
29 Diffusion-based Algorithm (CMH for OR Model) NOT COVERED IN CLASS Initiation by a blocked process P i send query(i,i,j) to all processes P j in the dependent set DS i of P i ; num i (i) = DS i ; wait i (i) = true; /* num is local variable that represents number of query msgssent */ Blocked process P k receiving query(i,j,k) if this is engagingquery for process P k /* first query from P i */ then send query(i,k,m) to all P m in DS k ; num k (i) = DS k ; wait k (i) = true; else if wait k (i) then send a reply(i,k,j) to P j Process P k receiving reply(i,j,k) if wait k (i) then num k (i) = num k (i) -1; if num k (i) = 0 then if i = k then declare a deadlock /* reply for each query msg*/ else send reply(i, k, m) to P m, which sent the engaging query 29
30 Diffusion Algorithm: Example reply(1,6,2) P2 P1 reply(1,1,7) query(1,7,1) P3 query(1,3,4) query reply P7 P6 P5 P4 30
31 Engaging Query How to distinguish an engaging query? query(i,j,k) from the initiator contains a unique sequence number for the query apart from the tuple (i,j,k) This sequence number is used to identify subsequent queries. (e.g.,) when query(1,7,1) is received by P1 from P7, P1 checks the sequence number along with the tuple P1 understands that the query was initiated by itself and it is not an engaging query Hence, P1 sends a reply back to P7 instead of forwarding the query on all its outgoing links 31
32 Hierarchical Deadlock Detection Ho-Ramamoorthy s Algorithm Site grouped into clusters Periodically, 1 site chosen as central control site (which chooses control sites for other clusters) Each control site applies 1-phase algorithm to detect (intracluster) deadlocks Central site collects information from control sites, combines WFGs, and performs cycle search Control site Central Site Control site Control site 32
33 Hierarchical Deadlock Detection Menasce-Muntz Algorithm Sites (controllers) organized in a tree structure Leaf controllers manage local WFGs Upper controllers handle deadlock detection Each parent node maintains a global WFG (union of WFGs of its children); deadlock is detected for its children Changes are propagated upwards in the tree 33
34 Persistence and Resolution Deadlock persistence: Average time a deadlock exists before it is resolved Implication of persistence Resources unavailable for this period (affects utilization) Processes wait for this period unproductively (affects response time) Deadlock resolution Involves aborting at least one process/request involved in the deadlock Efficient resolution of deadlock requires knowledge of all processes and resources If every process detects a deadlock and tries to resolve it independently, this is highly inefficient, and several processes might be aborted unnecessarily 34
35 Deadlock Resolution Priorities for processes/transactions can be useful for resolution Consider priorities introduced in Obermarck s algorithm Highest priority process initiates and detects deadlock (initiations by lower priority ones are suppressed) When deadlock is detected, lowest priority process(es) can be aborted to resolve the deadlock After identifying the processes/requests to be aborted All resources held by the victims must be released; state of released resources restored to previous states; released resources granted to deadlocked processes All deadlock detection information concerning the victims must be removed at all the sites 35
36 Deadlock Resolution Efficient resolution of deadlock requires knowledge of all processes and resources involved in the deadlock In many algorithms The process detecting the deadlock does not know all process/resources involved More than one process may detect the same deadlock 36
37 Performance Metrics Trade off between Communication overhead Deadlock persistence time Storage overhead Computation/processing overhead Resolution overhead Theory of correctness (need for sophisticated methods to prove correctness) 37
38 Perspective There are few areas of Computer Science in which theory and practice diverge as much as in distributed deadlock detection algorithms. Discovering yet another distributed deadlock detection algorithm is the goal of many a researcher. Unfortunately, these models often have little relation to reality worst of all, a fraction of all the published algorithms in this area are just plain wrong, including those proven to be correct. 38
39 Summary Centralized Deadlock Detection Algorithms Large communication overhead Coordinator is performance bottleneck Possibility of single point of failure Not very common or effective Distributed Deadlock Detection Algorithms High complexity Detection of phantom deadlocks possible Hierarchical Deadlock Detection Algorithms Most common Efficient Solve problems introduced by other approaches 39
Distributed Deadlock
Distributed Deadlock 9.55 DS Deadlock Topics Prevention Too expensive in time and network traffic in a distributed system Avoidance Determining safe and unsafe states would require a huge number of messages
More informationDistributed Deadlock Detection
Distributed Deadlock Detection Slides are based on the book chapter from Distributed Computing: Principles, Algorithms and Systems (Chapter 10) by Kshemkalyani and Singhal Pradipta De pradipta.de@sunykorea.ac.kr
More informationUNIT 02 DISTRIBUTED DEADLOCKS UNIT-02/LECTURE-01
UNIT 02 DISTRIBUTED DEADLOCKS UNIT-02/LECTURE-01 Deadlock ([RGPV/ Dec 2011 (5)] In an operating system, a deadlock is a situation which occurs when a process or thread enters a waiting state because a
More informationDistributed Deadlock Detection
Distributed Deadlock Detection CS60002: Distributed Systems Pallab Dasgupta Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Preliminaries The System Model The system has only reusable
More informationDeadlock Detection in Distributed Systems
SURVEY & TUTORIAL SERIES Deadlock Detection in Distributed Systems Mukesh Singhal Ohio State University A distributed system is a network of sites that exchange informa- I < tion with each other by message
More informationDistributed Deadlocks. Prof. Ananthanarayana V.S. Dept. of Information Technology N.I.T.K., Surathkal
Distributed Deadlocks Prof. Ananthanarayana V.S. Dept. of Information Technology N.I.T.K., Surathkal Objectives of This Module In this module different kind of resources, different kind of resource request
More informationDeadlock Prevention, Avoidance, and Detection
Deadlock Prevention, Avoidance, and Detection The Deadlock problem In a computer system deadlocks arise when members of a group of processes which hold resources are blocked indefinitely from access to
More informationDistributed Systems. 13. Distributed Deadlock. Paul Krzyzanowski. Rutgers University. Fall 2017
Distributed Systems 13. Distributed Deadlock Paul Krzyzanowski Rutgers University Fall 2017 October 23, 2017 2014-2017 Paul Krzyzanowski 1 Deadlock Four conditions for deadlock 1. Mutual exclusion 2. Hold
More informationOUTLINE. Introduction Clock synchronization Logical clocks Global state Mutual exclusion Election algorithms Deadlocks in distributed systems
Chapter 5 Synchronization OUTLINE Introduction Clock synchronization Logical clocks Global state Mutual exclusion Election algorithms Deadlocks in distributed systems Concurrent Processes Cooperating processes
More informationA Survey on Distributed Deadlock Detection Algorithm and its performance Evolution
A Survey on Distributed Deadlock Detection and its performance Evolution Sailen Dutta Kalita 1, Minakshi Kalita 2,Sonia Sarmah 3 1,2,3 Department of Computer Science and Engineering and Information Technology,
More informationA Concurrent Distributed Deadlock Detection/Resolution Algorithm for Distributed Systems
A Concurrent Distributed Deadlock Detection/Resolution Algorithm for Distributed Systems CHENG XIN, YANG XIAOZONG School of Computer Science and Engineering Harbin Institute of Technology Harbin, Xidazhi
More informationOperating Systems. Deadlock. Lecturer: William Fornaciari Politecnico di Milano Homel.deib.polimi.
Politecnico di Milano Operating Systems Lecturer: William Fornaciari Politecnico di Milano william.fornaciari@elet.polimi.it Homel.deib.polimi.it/fornacia Summary What is a resource Conditions for deadlock
More informationChapter 16: Distributed Synchronization
Chapter 16: Distributed Synchronization Chapter 16 Distributed Synchronization Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election Algorithms Reaching Agreement 18.2
More informationChapter 18: Distributed
Chapter 18: Distributed Synchronization, Silberschatz, Galvin and Gagne 2009 Chapter 18: Distributed Synchronization Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election
More information11/7/2018. Event Ordering. Module 18: Distributed Coordination. Distributed Mutual Exclusion (DME) Implementation of. DME: Centralized Approach
Module 18: Distributed Coordination Event Ordering Event Ordering Mutual Exclusion Atomicity Concurrency Control Deadlock Handling Election Algorithms Reaching Agreement Happened-before relation (denoted
More informationAN EFFICIENT DEADLOCK DETECTION AND RESOLUTION ALGORITHM FOR GENERALIZED DEADLOCKS. Wei Lu, Chengkai Yu, Weiwei Xing, Xiaoping Che and Yong Yang
International Journal of Innovative Computing, Information and Control ICIC International c 2017 ISSN 1349-4198 Volume 13, Number 2, April 2017 pp. 703 710 AN EFFICIENT DEADLOCK DETECTION AND RESOLUTION
More informationAn Analysis and Improvement of Probe-Based Algorithm for Distributed Deadlock Detection
An Analysis and Improvement of Probe-Based Algorithm for Distributed Deadlock Detection Kunal Chakma, Anupam Jamatia, and Tribid Debbarma Abstract In this paper we have performed an analysis of existing
More informationDistributed Database Management System UNIT-2. Concurrency Control. Transaction ACID rules. MCA 325, Distributed DBMS And Object Oriented Databases
Distributed Database Management System UNIT-2 Bharati Vidyapeeth s Institute of Computer Applications and Management, New Delhi-63,By Shivendra Goel. U2.1 Concurrency Control Concurrency control is a method
More informationDeadlock Prevention (cont d) Deadlock Prevention. Example: Wait-Die. Wait-Die
Deadlock Prevention Deadlock Prevention (cont d) 82 83 When there is a high level of lock contention and an increased likelihood of deadlocks Prevent deadlocks by giving each Xact a priority Assign priorities
More informationInternational Journal of Advanced Research in Computer Science and Software Engineering
Volume 3, Issue 7, July 2013 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Analysis for Deadlock
More informationMulti-cycle Deadlock Detection Algorithm for Distributed Systems
Asian Journal of Applied Science and Engineering, Volume 5, No 2/2016 ISSN 2305-915X(p); 2307-9584(e) Multi-cycle Deadlock Detection Algorithm for Distributed Systems Mohammad Ariful Islam 1*, Md. Serajul
More informationExam 2 Review. Fall 2011
Exam 2 Review Fall 2011 Question 1 What is a drawback of the token ring election algorithm? Bad question! Token ring mutex vs. Ring election! Ring election: multiple concurrent elections message size grows
More informationAn Efficient Distributed Deadlock Detection and Prevention Algorithm by Daemons
150 IJCSNS International Journal of Computer Science and Network Security, VOL.12 No.4, April 2012 An Efficient Distributed Deadlock Detection and Prevention Algorithm by Daemons Alireza Soleimany 2, Zahra
More informationPhantom Problem. Phantom Problem. Phantom Problem. Phantom Problem R1(X1),R1(X2),W2(X3),R1(X1),R1(X2),R1(X3) R1(X1),R1(X2),W2(X3),R1(X1),R1(X2),R1(X3)
57 Phantom Problem So far we have assumed the database to be a static collection of elements (=tuples) If tuples are inserted/deleted then the phantom problem appears 58 Phantom Problem INSERT INTO Product(name,
More informationLecture 21 Concurrency Control Part 1
CMSC 461, Database Management Systems Spring 2018 Lecture 21 Concurrency Control Part 1 These slides are based on Database System Concepts 6 th edition book (whereas some quotes and figures are used from
More informationAn Analysis of Resolution of Deadlock in Mobile Agent System through Different Techniques.
IOSR Journal of Mobile Computing & Application (IOSR-JMCA) e-issn: 2394-0050, P-ISSN: 2394-0042.Volume 3, Issue 6 (Nov. - Dec. 2016), PP 01-06 www.iosrjournals.org An Analysis of Resolution of Deadlock
More informationSilberschatz and Galvin Chapter 18
Silberschatz and Galvin Chapter 18 Distributed Coordination CPSC 410--Richard Furuta 4/21/99 1 Distributed Coordination Synchronization in a distributed environment Ð Event ordering Ð Mutual exclusion
More informationConcurrency Control. Chapter 17. Comp 521 Files and Databases Spring
Concurrency Control Chapter 17 Comp 521 Files and Databases Spring 2010 1 Conflict Serializable Schedules Recall conflicts (WW, RW, WW) were the cause of sequential inconsistency Two schedules are conflict
More informationDeadlocks in Distributed Systems: Request Models and Definitions
Deadlocks in Distributed Systems: Request Models and Definitions Jerzy Brzezinski Jean-Michel Helary, Michel Raynal Institute of Computing Science IRISA Poznan University of Technology Campus de Beaulieu
More informationChapter 15 : Concurrency Control
Chapter 15 : Concurrency Control What is concurrency? Multiple 'pieces of code' accessing the same data at the same time Key issue in multi-processor systems (i.e. most computers today) Key issue for parallel
More informationDistributed Systems - II
CSE 421/521 - Operating Systems Fall 201 Lecture - XXV Distributed Systems - II Tevfik Koşar University at Buffalo December 3 rd, 2013 1 Distributed Mutual Exclusion (DME) Assumptions The system consists
More informationChapter 9: Concurrency Control
Chapter 9: Concurrency Control Concurrency, Conflicts, and Schedules Locking Based Algorithms Timestamp Ordering Algorithms Deadlock Management Acknowledgements: I am indebted to Arturas Mazeika for providing
More informationChapter 7: Deadlocks
Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationA Modified Algorithm for Distributed Deadlock Detection in Generalized Model
IOSR Journal of Engineering (IOSRJEN) ISSN (e): 2250-3021, ISSN (p): 2278-8719 Vol. 06, Issue 04 (April. 2016), V2 PP 01-05 www.iosrjen.org A Modified Algorithm for Distributed Deadlock Detection in Generalized
More informationBasics of Deadlock Theory. Deadlocks
CMSC 621, Advanced Operating Systems. Fall 2003 Basics of Deadlock Theory Dr. Kalpakis Deadlocks deadlock occurs when there is a set of processes which have outstanding requests for resources that can
More informationMobile agent-enabled framework for structuring and building distributed systems on the internet
Science in China Series F: Information Sciences 2006 Vol.49 No.6 885 905 885 DOI: 10.1007/s11432-006-2032-4 Mobile agent-enabled framework for structuring and building distributed systems on the internet
More informationLast Time. 19: Distributed Coordination. Distributed Coordination. Recall. Event Ordering. Happens-before
Last Time 19: Distributed Coordination Last Modified: 7/3/2004 1:50:34 PM We talked about the potential benefits of distributed systems We also talked about some of the reasons they can be so difficult
More informationBridge Crossing Example
CSCI 4401 Principles of Operating Systems I Deadlocks Vassil Roussev vassil@cs.uno.edu Bridge Crossing Example 2 Traffic only in one direction. Each section of a bridge can be viewed as a resource. If
More informationANALYSIS OF DEADLOCK DETECTION AND RESOLUTION TECHNIQUES IN DISTRIBUTED DATABASE ENVIRONMENT
ANALYSIS OF DEADLOCK DETECTION AND RESOLUTION TECHNIQUES IN DISTRIBUTED DATABASE ENVIRONMENT HIMANSHI GROVER, SURESH KUMAR Department of Computer Science and Engineering, Manav Rachna International University
More informationConcurrency Control. Transaction Management. Lost Update Problem. Need for Concurrency Control. Concurrency control
Concurrency Control Process of managing simultaneous operations on the database without having them interfere with one another. Transaction Management Concurrency control Connolly & Begg. Chapter 19. Third
More informationMulti-User-Synchronization
Chapter 10 Multi-User-Synchronization Database Systems p. 415/569 Why Run TAs Concurrently? We could run all TAs serially (one after the other) This would prevent all unwanted side effects However, this
More informationChapter 13 : Concurrency Control
Chapter 13 : Concurrency Control Chapter 13: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols Validation-Based Protocols Multiple Granularity Multiversion Schemes Insert and Delete Operations
More informationTransaction Management. Pearson Education Limited 1995, 2005
Chapter 20 Transaction Management 1 Chapter 20 - Objectives Function and importance of transactions. Properties of transactions. Concurrency Control Deadlock and how it can be resolved. Granularity of
More informationConcurrency Control. Chapter 17. Comp 521 Files and Databases Fall
Concurrency Control Chapter 17 Comp 521 Files and Databases Fall 2012 1 Conflict Serializable Schedules Recall conflicts (WR, RW, WW) were the cause of sequential inconsistency Two schedules are conflict
More informationCOP 4610: Introduction to Operating Systems (Spring 2016) Chapter 7 Deadlocks. Zhi Wang Florida State University
COP 4610: Introduction to Operating Systems (Spring 2016) Chapter 7 Deadlocks Zhi Wang Florida State University Contents Deadlock problem System model Handling deadlocks deadlock prevention deadlock avoidance
More informationSafety & Liveness Towards synchronization. Safety & Liveness. where X Q means that Q does always hold. Revisiting
459 Concurrent & Distributed 7 Systems 2017 Uwe R. Zimmer - The Australian National University 462 Repetition Correctness concepts in concurrent systems Liveness properties: ( P ( I )/ Processes ( I, S
More informationConcurrent & Distributed 7Systems Safety & Liveness. Uwe R. Zimmer - The Australian National University
Concurrent & Distributed 7Systems 2017 Safety & Liveness Uwe R. Zimmer - The Australian National University References for this chapter [ Ben2006 ] Ben-Ari, M Principles of Concurrent and Distributed Programming
More informationDetection and Resolution of Deadlocks in Distributed Database Systems
Detection and Resolution of Deadlocks in Distributed Database Systems Kia Makki Niki Pissinou Department of Computer Science The Center for Advanced Computer Studies University of Nevada, Las Vegas University
More informationLecture 13 Concurrency Control
Lecture 13 Concurrency Control Shuigeng Zhou December 23, 2009 School of Computer Science Fudan University Outline Lock-Based Protocols Multiple Granularity Deadlock Handling Insert and Delete Operations
More informationA can be implemented as a separate process to which transactions send lock and unlock requests The lock manager replies to a lock request by sending a lock grant messages (or a message asking the transaction
More informationDeadlock Detection and Resolution in Distributed Database Environment
International Journal of Scientific and Research Publications, Volume 5, Issue 9, September 015 1 Deadlock Detection and Resolution in Distributed Database Environment Abdullah Mohammed Rashid 1, Nor ashikin
More informationIntroduction to Deadlocks
Unit 5 Introduction to Deadlocks Structure 5.1 Introduction Objectives 5.2 System Model 5.3 Deadlock Characterization Necessary Conditions for Deadlock Resource-Allocation Graph. 5.4 Deadlock Handling
More information3. Concurrency Control for Transactions Part One
3. Concurrency Control for Transactions Part One CSEP 545 Transaction Processing Philip A. Bernstein Copyright 2012 Philip A. Bernstein 1/11/2012 1 Outline 1. A Simple System Model 2. Serializability Theory
More informationSystem Model. Types of resources Reusable Resources Consumable Resources
Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock System Model Types
More informationDistributed Databases Systems
Distributed Databases Systems Lecture No. 07 Concurrency Control Naeem Ahmed Email: naeemmahoto@gmail.com Department of Software Engineering Mehran Univeristy of Engineering and Technology Jamshoro Outline
More informationConcurrency Control 9-1
Concurrency Control The problem of synchronizing concurrent transactions such that the consistency of the database is maintained while, at the same time, maximum degree of concurrency is achieved. Principles:
More informationDistributed Algorithmic
Distributed Algorithmic Master 2 IFI, CSSR + Ubinet Françoise Baude Université de Nice Sophia-Antipolis UFR Sciences Département Informatique baude@unice.fr web site : deptinfo.unice.fr/~baude/algodist
More informationChapter 8: Deadlocks
Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationChapter 8: Deadlocks. The Deadlock Problem. System Model. Bridge Crossing Example. Resource-Allocation Graph. Deadlock Characterization
Chapter 8: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined
More informationDeadlock Prevention. Restrain the ways request can be made. Mutual Exclusion not required for sharable resources; must hold for nonsharable resources.
Deadlock Prevention Restrain the ways request can be made. Mutual Exclusion not required for sharable resources; must hold for nonsharable resources. Hold and Wait must guarantee that whenever a process
More informationModule 7: Deadlocks. The Deadlock Problem. Bridge Crossing Example. System Model
Module 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined
More informationCS307 Operating Systems Deadlocks
CS307 Deadlocks Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2016 Bridge Crossing Example Traffic only in one direction Each section of a bridge can be viewed
More informationDeadlocks. Bridge Crossing Example. The Problem of Deadlock. Deadlock Characterization. Resource-Allocation Graph. System Model
CS07 Bridge Crossing Example Deadlocks Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2016 Traffic only in one direction Each section of a bridge can be viewed
More informationLecture 22 Concurrency Control Part 2
CMSC 461, Database Management Systems Spring 2018 Lecture 22 Concurrency Control Part 2 These slides are based on Database System Concepts 6 th edition book (whereas some quotes and figures are used from
More information! A lock is a mechanism to control concurrent access to a data item! Data items can be locked in two modes :
Lock-Based Protocols Concurrency Control! A lock is a mechanism to control concurrent access to a data item! Data items can be locked in two modes : 1 exclusive (X) mode Data item can be both read as well
More informationChapter 7: Deadlocks. Operating System Concepts 9 th Edition
Chapter 7: Deadlocks Silberschatz, Galvin and Gagne 2013 Chapter 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection
More informationOutline. G Honors Operating Systems. Deadlock Avoidance. Review: Deadlock Prevention. Lecture 11: Deadlocks Avoidance, Detection, and Recovery
Outline G22.3250 Honors Operating Systems Lecture 11: Deadlocks Avoidance, Detection, and Recovery Process deadlocks (contd.) deadlock avoidance deadlock detection deadlock recovery combined approach to
More informationA lock is a mechanism to control concurrent access to a data item Data items can be locked in two modes:
Concurrency Control Concurrency Control Lock-Based and Tree-Based Protocols Timestamp-Based Protocols Validation-Based Protocols Multiple Granularity Multiversion Schemes Insert and Delete Operations Concurrency
More informationCS 541 Database Systems. Two Phase Locking 2
CS 541 Database Systems Two Phase Locking 2 Phantoms Consider a banking application with two files: Accounts (number, location, balance); and Assets (branch, total). Two txns: T 1 checks total for some
More informationModule 7: Deadlocks. The Deadlock Problem
Module 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationChapter 6 Concurrency: Deadlock and Starvation
Operating Systems: Internals and Design Principles Chapter 6 Concurrency: Deadlock and Starvation Seventh Edition By William Stallings Edited by Rana Forsati CSE410 Outline Principles of deadlock Deadlock
More informationModule 7: Deadlocks. System Model. Deadlock Characterization. Methods for Handling Deadlocks. Deadlock Prevention. Deadlock Avoidance
Module 7: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationFinal Exam Review. CPSC 457, Spring 2016 June 29-30, M. Reza Zakerinasab Department of Computer Science, University of Calgary
Final Exam Review CPSC 457, Spring 2016 June 29-30, 2015 M. Reza Zakerinasab Department of Computer Science, University of Calgary Final Exam Components Final Exam: Monday July 4, 2016 @ 8 am in ICT 121
More informationLecture 7 Deadlocks (chapter 7)
Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 7 Deadlocks (chapter 7) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The slides here are
More informationChapter 8: Deadlocks. The Deadlock Problem
Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationThe Deadlock Problem
The Deadlock Problem A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 disk drives. P 1 and P 2 each hold one
More informationThe Deadlock Problem (1)
Deadlocks The Deadlock Problem (1) A set of blocked processes each holding a resource and waiting to acquire a resource held by another process in the set. Example System has 2 disk drives. P 1 and P 2
More informationCSE 380 Computer Operating Systems
CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note: Distributed Systems 1 Introduction to Distributed Systems Why do we develop distributed systems?
More informationChapter 7: Deadlocks
Chapter 7: Deadlocks Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from
More informationChapter 7: Deadlocks. Operating System Concepts 8th Edition, modified by Stewart Weiss
Chapter 7: Deadlocks, Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance (briefly) Deadlock Detection
More informationUniversity of Babylon / College of Information Technology / Network Department. Operating System / Dr. Mahdi S. Almhanna & Dr. Rafah M.
Chapter 6 Methods for Handling Deadlocks Generally speaking, we can deal with the deadlock problem in one of three ways: We can use a protocol to prevent or avoid deadlocks, ensuring that the system will
More informationChapter 7: Deadlocks
Chapter 7: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Chapter
More informationSynchronization. Chapter 5
Synchronization Chapter 5 Clock Synchronization In a centralized system time is unambiguous. (each computer has its own clock) In a distributed system achieving agreement on time is not trivial. (it is
More informationConcurrency Control Algorithms
Concurrency Control Algorithms Given a number of conflicting transactions, the serializability theory provides criteria to study the correctness of a possible schedule of execution it does not provide
More informationConcurrency Control. [R&G] Chapter 17 CS432 1
Concurrency Control [R&G] Chapter 17 CS432 1 Conflict Serializable Schedules Two schedules are conflict equivalent if: Involve the same actions of the same transactions Every pair of conflicting actions
More informationProcess Management. Deadlock. Process Synchronization. Management Management. Starvation
Process Management Deadlock 7 Cases of Deadlock Conditions for Deadlock Modeling Deadlocks Strategies for Handling Deadlocks Avoidance Detection Recovery Starvation Process Synchronization Deadlock Starvation
More informationConcurrency Control. Conflict Serializable Schedules. Example. Chapter 17
Concurrency Control Chapter 17 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Conflict Serializable Schedules Two schedules are conflict equivalent if: Involve the same actions of the
More informationChapter 7: Deadlocks. Operating System Concepts 8 th Edition,
Chapter 7: Deadlocks, Silberschatz, Galvin and Gagne 2009 Chapter Objectives To develop a description of deadlocks, which prevent sets of concurrent processes from completing their tasks To present a number
More informationResource Allocation and Deadlock Handling
Resource Allocation and Deadlock Handling What s in a deadlock Deadlock: A set of blocked processes each waiting for an event (e.g. a resource to become available) that only another process in the set
More informationConcurrency Control. Chapter 17. Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1
Concurrency Control Chapter 17 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Conflict Schedules Two actions conflict if they operate on the same data object and at least one of them
More informationDeadlocks. Deadlock Overview
Deadlocks Gordon College Stephen Brinton Deadlock Overview The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection
More informationChapter 8: Deadlocks. The Deadlock Problem
Chapter 8: Deadlocks System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined Approach to Deadlock
More informationThe Deadlock Problem. Chapter 8: Deadlocks. Bridge Crossing Example. System Model. Deadlock Characterization. Resource-Allocation Graph
Chapter 8: Deadlocks The Deadlock Problem System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock Combined
More informationOPERATING SYSTEMS. Deadlocks
OPERATING SYSTEMS CS3502 Spring 2018 Deadlocks Chapter 7 Resource Allocation and Deallocation When a process needs resources, it will normally follow the sequence: 1. Request a number of instances of one
More informationProcess Synchroniztion Mutual Exclusion & Election Algorithms
Process Synchroniztion Mutual Exclusion & Election Algorithms Paul Krzyzanowski Rutgers University November 2, 2017 1 Introduction Process synchronization is the set of techniques that are used to coordinate
More informationDeadlocks. Mehdi Kargahi School of ECE University of Tehran Spring 2008
Deadlocks Mehdi Kargahi School of ECE University of Tehran Spring 2008 What is a Deadlock Processes use resources in the following sequence: Request Use Release A number of processes may participate in
More informationExam 2 Review. October 29, Paul Krzyzanowski 1
Exam 2 Review October 29, 2015 2013 Paul Krzyzanowski 1 Question 1 Why did Dropbox add notification servers to their architecture? To avoid the overhead of clients polling the servers periodically to check
More informationAdvanced Databases Lecture 17- Distributed Databases (continued)
Advanced Databases Lecture 17- Distributed Databases (continued) Masood Niazi Torshiz Islamic Azad University- Mashhad Branch www.mniazi.ir Alternative Models of Transaction Processing Notion of a single
More informationCMSC 412. Announcements
CMSC 412 Deadlock Reading Announcements Chapter 7 Midterm next Monday In class Will have a review on Wednesday Project 3 due Friday Project 4 will be posted the same day 1 1 The Deadlock Problem A set
More informationChapter 8: Deadlocks. Bridge Crossing Example. The Deadlock Problem
Chapter 8: Deadlocks Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention Deadlock Avoidance Deadlock Detection Recovery from Deadlock 8.1 Bridge Crossing Example Bridge has one
More information