Slides for Chapter 12: Coordination and Agreement

Size: px
Start display at page:

Download "Slides for Chapter 12: Coordination and Agreement"

Transcription

1 Slides for hater : oordination and greement rom oulouris, ollimore and Kindberg istributed Systems: oncets and esign dition, ailure ssumtions and ailure etectors reliable communication channels rocess failures: crashes failure detector: object/code in a rocess that detects failures of other rocesses unreliable failure detector unsusected or susected (evidence of ossible failures) each rocess sends ``alive'' message to everyone else not receiving ``alive'' message after timeout most ractical systems reliable failure detector unsusected or failure synchronous system few ractical systems istributed Mutual xclusion rovide critical region in a distributed environment message assing for examle, locking files, lockd daemon in UNX (NS is stateless, no file-locking at the NS level) lgorithms for mutual exclusion N rocesses rocesses don't fail message delivery is reliable critical region: enter(), resourceccesses(), exit() Proerties: [M] safety: only one rocess at a time [M] liveness: eventually enter or exit [M3] haened-before ordering: ordering of enter() is the same as ordering lgorithms for mutual exclusion Performance evaluation: overhead and bandwidth consumtion: # of messages sent client delay incurred by a rocess at entry and exit throughut measured by synchronization delay: delay between one's exit and next's entry central server algorithm server kees track of a ---ermission to enter critical region a rocess requests the server for the the server grants the if it has the a rocess can enter if it gets the, otherwise waits when done, a rocess sends release and exits

2 Server managing a mutual exclusion for a set of rocesses central server algorithm Queue of requests. Request Server 3. rant. Release 3 Proerties: safety, why? liveness, why? ordering not guaranteed, why? [V in rocesses vs. server] Performance: enter overhead: two messages (request and grant) enter delay: time between request and grant exit overhead: one message (release) exit delay: none synchronization delay: between release and grant centralized server is the bottle neck ring-based algorithm ring of rocesses transferring a mutual exclusion logical ring, could be unrelated to the hysical configuration i sends messages to (i+) mod N when a rocess holds a, it can enter, otherwise waits when a rocess releases a (exit), it sends to its neighbor n 3 Token ring-based algorithm roerties: safety, why? liveness, why? ordering not guaranteed, why? Performance: bandwidth consumtion: kees circulating enter overhead: 0 to N messages enter delay: delay for 0 to N messages exit overhead: one message exit delay: none synchronization delay: delay for to N messages n algorithm using multicast and logical clocks multicast a request message for the enter only if all the other rocesses rely totally-ordered timestams: <T, i > each rocess kees a state: RLS, L, WNT if all have state = RLS, all rely, a rocess can hold the and enter if a rocess has state = L, doesn't rely until it exits if more than one rocess has state = WNT, rocess with the lowest timestam will get all N- relies first.

3 Ricart and grawala s algorithm Multicast synchronization On initialization state := RLS; To enter the section state := WNT; Multicast request to all rocesses; request rocessing deferred here T := request s timestam; Wait until (number of relies received = (N )); state := L; Rely 3 On receit of a request <T i, i > at j (i j) if (state = L or (state = WNT and (T, j ) < (T i, i ))) then queue request from i without relying; else rely immediately to i ; end if To exit the critical section state := RLS; rely to any queued requests; Rely 3 3 Rely 3 n algorithm using multicast and logical locks n algorithm using multicast and logical locks Proerties safety, why? liveness, why? ordering, why? erformance: bandwidth consumtion: no kees circulating entry overhead: (N-), why? [with multicast suort: + (N -) = N] entry delay: delay between request and getting all relies exit overhead: 0 to N- messages exit delay: none synchronization delay: delay for message (one last rely from the revious holder) Maekawa s Voting lgorithm Main dea We actually don t need all N relies onsider rocesses,, X needs relies from and X needs relies from and X f X can only rely to (vote) *one rocess at a time* and cannot have a rely from X at the same time Mutex between and --hinges on X Processes in overlaing grous members in the overla control mutex Mutual exclusion for all rocesses grou for every rocess air of grous for and overlas => mutex(, ) very ossible air of grous overlas => mutex(all ossible airs of rocesses) => mutex(all rocesses) 3

4 rous and members Parameters and grou membershi grou for each rocess N rocesses N grous ach grou has K members numbers of rocesses to request for ermission ach rocess is in M grous (M > ) llows overlaing => mutex f the grous are disjoint, M =, no overlaing, no mutex number of rocesses to grant ermission N = number of rocesses K = voting grou size M = number of voting grous each rocess is in Otimal (smallest K, why?) K = M ~= sqrt(n) Non-trivial to construct the grous roximation K = * sqrt(n) - Put rocess id s in a sqrt(n) by sqrt(n) table Union the rows and columns where i is N grous M = * sqrt(n) - rou membershi rou for : {,,,, } rou for : {,,,, } rou for : {,,,, } very air of grous overla N grous ach grou has K = * sqrt(n) members M = * sqrt(n) [# of grous each rocess are in] rou membershi (alternative?) rous for,, : {,,,, } rous for,, : {,,,, } rous for,, : {,,,, } very air of grous overla N grous [Sqrt(N) unique grous] ach grou has K = * sqrt(n) members M = 3 [sqrt(n)] for,,, but M = 6 [*sqrt(n)] for the rest Undesirable, why? Sketch of the Voting lgorithm igure.6 Maekawa s voting algorithm grou of rocesses V i for each rocess i ach air of grous overla X in grous: [,X] and [,X] => the grous for any air of rocesses overla To enter the critical region, i Sends RQUST s to all rocesses in V i Waits for RPLY s (VOT s) from all rocesses in V i To exit the critical region, i Sends RLS s to all rocesses in V i Three tyes of messages, not two as in the multicast alg. On initialization state := RLS; voted := LS; or i to enter the critical section state := WNT; Multicast request to all rocesses in V i ; Wait until (number of relies received = K); state := L; On receit of a request from i at j if (state = L or voted = TRU) then queue request from i without relying; else send rely to i ; voted := TRU; end if or i to exit the critical section state := RLS; Multicast release to all rocesses in V i ; On receit of a release from i at j if (queue of requests is non-emty) then remove head of queue from k, say; send rely to k ; voted := TRU; else voted := LS; end if

5 eadlock? Processes:,, rou :, rou :, rou :, eadlock has s rely, waiting for s rely has s rely, waiting for s rely has s rely, waiting for s rely Timestam the requests in ordering holding according to the timestam Proerties Safety: No rocess can rely/vote more than once at any time. Liveness: timestam ( ordering) ordering: above Performance ntry overhead [assuming k = sqrt(n)] Sqrt(N) requests + Sqrt(N) relies * Sqrt(N) < (N - ) [N > ] xit overhead Sqrt(N) releases lections choosing a unique rocess for a articular role for examle, server in dist. mutex each rocess can call only one multile concurrent s can be called by different rocesses articiant: engages in an rocess with the largest id wins each rocess i has variable elected i =? (don't know) initially lections Proerties: [] elected i of a ``articiant'' rocess must be P max (elected rocess---largest id) or? [] liveness: all rocesses articiate and eventually set elected i!=? (or crash) Performance: overhead (bandwidth consumtion): # of messages turnaround time: # of messages to comlete an ring-based algorithm logical ring, could be unrelated to the hysical configuration i sends messages to (i+) mod N no failures elect the coordinator with the largest id initially, every rocess is a non-articiant any rocess can call an : marks itself as articiant laces its id in an message sends the message to its neighbor 5

6 Ring-based algorithm ring-based in rogress receiving an message: if id > myid, forward the msg, mark articiant if id < myid non-articiant: relace id with myid: forward the msg, mark articiant articiant: sto forwarding (why? Later, multile s) if id = myid, coordinator found, mark non-articiant, elected i := id, send elected message with myid receiving an elected message: id!= myid, mark non-articiant, elected i := id forward the msg if id = myid, sto forwarding Note: The was started by rocess 7. The highest rocess identifier encountered so far is. Particiant rocesses are shown darkened 7 8 Ring-based algorithm Ring-based algorithm Proerties: safety: only the rocess with the largest id can send an elected message liveness: every rocess in the ring eventually articiates in the ; extra s are stoed Performance: one, best case, when? N messages N elected messages turnaround: N messages one, worst case, when? N - messages N elected messages turnaround: 3N - messages can't tolerate failures, not very ractical rocesses can crash and can be detected by other rocesses timeout T = T transmitting + T rocessing each rocess knows all the other rocesses and can communicate with them Messages:, answer, coordinator start an detects the coordinator has failed sends an message to all rocesses with higher id's and waits for answers (excet the failed coordinator/rocess) if no answers in time T, it is the coordinator sends coordinator message (with its id) to all rocesses with lower id's else waits for a coordinator message starts an if timeout 6

7 The of coordinator, after the failure of and then 3 Stage Stage Stage 3 ventually... Stage answer 3 timeout answer coordinator answer receiving an message sends an answer message back starts an if it hasn't started one send messages to all higher-id rocesses (including the failed coordinator the coordinator might be u by now) receiving a coordinator message set elected i to the new coordinator to be a coordinator, it has to start an when a crashed rocess is relaced the new rocess starts an and can relace the current coordinator (hence ``bully'') roerties: safety: a lower-id rocess always yields to a higher-id rocess owever, during an, if a failed rocess is relaced the low-id rocesses might have two different coordinators: the newly elected coordinator and the new rocess, why? failure detection might be unreliable liveness: all rocesses articiate and know the coordinator at the end Performance best case: when? overhead: N- coordinator messages turnaround delay: no /answer messages worst case: when? overhead: (N-) + (N-)= (N-)(N-)/ + (N-) messages, (N-) answer messages, N- coordinator messages, total: (N-)(N-) + (N-) = (N+)(N-) = O(N ) turnaround delay: delay of and answer messages 7

Distributed Systems (5DV147)

Distributed Systems (5DV147) Distributed Systems (5DV147) Mutual Exclusion and Elections Fall 2013 1 Processes often need to coordinate their actions Which rocess gets to access a shared resource? Has the master crashed? Elect a new

More information

Time and Coordination in Distributed Systems. Operating Systems

Time and Coordination in Distributed Systems. Operating Systems Time and Coordination in Distributed Systems Oerating Systems Clock Synchronization Physical clocks drift, therefore need for clock synchronization algorithms Many algorithms deend uon clock synchronization

More information

Slides for Chapter 15: Coordination and Agreement

Slides for Chapter 15: Coordination and Agreement Slides for Chater 15: Coordination and Agreement From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concets and Design Edition 5, Addison-Wesley 2012 Overview of Chater Introduction Distributed

More information

Recap: Consensus. CSE 486/586 Distributed Systems Mutual Exclusion. Why Mutual Exclusion? Why Mutual Exclusion? Mutexes. Mutual Exclusion C 1

Recap: Consensus. CSE 486/586 Distributed Systems Mutual Exclusion. Why Mutual Exclusion? Why Mutual Exclusion? Mutexes. Mutual Exclusion C 1 Reca: Consensus Distributed Systems Mutual Exclusion Steve Ko Comuter Sciences and Engineering University at Buffalo On a synchronous system There s an algorithm that works. On an asynchronous system It

More information

Distributed Systems. 7. Coordination and Agreement

Distributed Systems. 7. Coordination and Agreement Distributed Systems 7. Coordination and Agreement Werner Nutt 1 Co-ordination Algorithms are fundamental in distributed systems: to dynamically re-assign the role of master choose rimary server after crash

More information

Coordination 1. To do. Mutual exclusion Election algorithms Next time: Global state. q q q

Coordination 1. To do. Mutual exclusion Election algorithms Next time: Global state. q q q Coordination 1 To do q q q Mutual exclusion Election algorithms Next time: Global state Coordination and agreement in US Congress 1798-2015 Process coordination How can processes coordinate their action?

More information

Election Algorithms. has elected i. will eventually set elected i

Election Algorithms. has elected i. will eventually set elected i Election Algorithms Election 8 algorithm designed to designate one unique rocess out of a set of rocesses with similar caabilities to take over certain functions in a distributes system central server

More information

Distributed Systems. coordination Johan Montelius ID2201. Distributed Systems ID2201

Distributed Systems. coordination Johan Montelius ID2201. Distributed Systems ID2201 Distributed Systems ID2201 coordination Johan Montelius 1 Coordination Coordinating several threads in one node is a problem, coordination in a network is of course worse: failure of nodes and networks

More information

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University L23.1 Frequently asked questions from the previous class survey

More information

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey Yes. But what really is a second? 1 second ==time for a cesium 133 atom

More information

CSE 486/586 Distributed Systems

CSE 486/586 Distributed Systems CSE 486/586 Distributed Systems Mutual Exclusion Steve Ko Computer Sciences and Engineering University at Buffalo CSE 486/586 Recap: Consensus On a synchronous system There s an algorithm that works. On

More information

Distributed Synchronization. EECS 591 Farnam Jahanian University of Michigan

Distributed Synchronization. EECS 591 Farnam Jahanian University of Michigan Distributed Synchronization EECS 591 Farnam Jahanian University of Michigan Reading List Tanenbaum Chapter 5.1, 5.4 and 5.5 Clock Synchronization Distributed Election Mutual Exclusion Clock Synchronization

More information

Mutual Exclusion. A Centralized Algorithm

Mutual Exclusion. A Centralized Algorithm Mutual Exclusion Processes in a distributed system may need to simultaneously access the same resource Mutual exclusion is required to prevent interference and ensure consistency We will study three algorithms

More information

Last Class: Clock Synchronization. Today: More Canonical Problems

Last Class: Clock Synchronization. Today: More Canonical Problems Last Class: Clock Synchronization Logical clocks Vector clocks Global state Lecture 12, page 1 Today: More Canonical Problems Distributed snapshot and termination detection Election algorithms Bully algorithm

More information

Coordination and Agreement

Coordination and Agreement Coordination and Agreement Nicola Dragoni Embedded Systems Engineering DTU Informatics 1. Introduction 2. Distributed Mutual Exclusion 3. Elections 4. Multicast Communication 5. Consensus and related problems

More information

PROCESS SYNCHRONIZATION

PROCESS SYNCHRONIZATION DISTRIBUTED COMPUTER SYSTEMS PROCESS SYNCHRONIZATION Dr. Jack Lange Computer Science Department University of Pittsburgh Fall 2015 Process Synchronization Mutual Exclusion Algorithms Permission Based Centralized

More information

Distributed Systems Coordination and Agreement

Distributed Systems Coordination and Agreement Distributed Systems Coordination and Agreement Allan Clark School of Informatics University of Edinburgh http://www.inf.ed.ac.uk/teaching/courses/ds Autumn Term 2012 Coordination and Agreement Overview

More information

Process Synchroniztion Mutual Exclusion & Election Algorithms

Process 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 information

Homework #2 Nathan Balon CIS 578 October 31, 2004

Homework #2 Nathan Balon CIS 578 October 31, 2004 Homework #2 Nathan Balon CIS 578 October 31, 2004 1 Answer the following questions about the snapshot algorithm: A) What is it used for? It used for capturing the global state of a distributed system.

More information

Distributed Algorithms

Distributed Algorithms Course Outline With grateful acknowledgement to Christos Karamanolis for much of the material Jeff Magee & Jeff Kramer Models of distributed comuting Synchronous message-assing distributed systems Algorithms

More information

Clock Synchronization. Synchronization. Clock Synchronization Algorithms. Physical Clock Synchronization. Tanenbaum Chapter 6 plus additional papers

Clock Synchronization. Synchronization. Clock Synchronization Algorithms. Physical Clock Synchronization. Tanenbaum Chapter 6 plus additional papers Clock Synchronization Synchronization Tanenbaum Chapter 6 plus additional papers Fig 6-1. In a distributed system, each machine has its own clock. When this is the case, an event that occurred after another

More information

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [ELECTION ALGORITHMS] Shrideep Pallickara Computer Science Colorado State University Frequently asked questions from the previous class survey Does a process

More information

CSE 5306 Distributed Systems. Synchronization

CSE 5306 Distributed Systems. Synchronization CSE 5306 Distributed Systems Synchronization 1 Synchronization An important issue in distributed system is how processes cooperate and synchronize with one another Cooperation is partially supported by

More information

Last Class: Clock Synchronization. Today: More Canonical Problems

Last Class: Clock Synchronization. Today: More Canonical Problems Last Class: Clock Synchronization Logical clocks Vector clocks Global state Lecture 11, page 1 Today: More Canonical Problems Distributed snapshot and termination detection Election algorithms Bully algorithm

More information

Algorithms and protocols for distributed systems

Algorithms and protocols for distributed systems Algorithms and protocols for distributed systems We have defined process groups as having peer or hierarchical structure and have seen that a coordinator may be needed to run a protocol such as 2PC. With

More information

Distributed Mutual Exclusion

Distributed Mutual Exclusion Distributed Mutual Exclusion Mutual Exclusion Well-understood in shared memory systems Requirements: at most one process in critical section (safety) if more than one requesting process, someone enters

More information

Exam 2 Review. Fall 2011

Exam 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 information

Chapter 6 Synchronization (2)

Chapter 6 Synchronization (2) DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 6 Synchronization (2) Plan Clock synchronization in distributed systems Physical clocks Logical

More information

Frequently asked questions from the previous class survey

Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED COORDINATION/MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University L22.1 Frequently asked questions from the previous

More information

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University Frequently asked questions from the previous class survey CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED COORDINATION/MUTUAL EXCLUSION] Shrideep Pallickara Computer Science Colorado State University

More information

Distributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016

Distributed Systems Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2016 Distributed Systems 2016 Exam 1 Review Paul Krzyzanowski Rutgers University Fall 2016 Question 1 Why does it not make sense to use TCP (Transmission Control Protocol) for the Network Time Protocol (NTP)?

More information

Synchronization Part 2. REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17

Synchronization Part 2. REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17 Synchronization Part 2 REK s adaptation of Claypool s adaptation oftanenbaum s Distributed Systems Chapter 5 and Silberschatz Chapter 17 1 Outline Part 2! Clock Synchronization! Clock Synchronization Algorithms!

More information

CMPSCI 677 Operating Systems Spring Lecture 14: March 9

CMPSCI 677 Operating Systems Spring Lecture 14: March 9 CMPSCI 677 Operating Systems Spring 2014 Lecture 14: March 9 Lecturer: Prashant Shenoy Scribe: Nikita Mehra 14.1 Distributed Snapshot Algorithm A distributed snapshot algorithm captures a consistent global

More information

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University Query Processing Shuigeng Zhou May 18, 2016 School of Comuter Science Fudan University Overview Outline Measures of Query Cost Selection Oeration Sorting Join Oeration Other Oerations Evaluation of Exressions

More information

Chapter 6 Synchronization

Chapter 6 Synchronization DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN Chapter 6 Synchronization Clock Synchronization Figure 6-1. When each machine has its own clock, an event

More information

SEGR 550 Distributed Computing. Final Exam, Fall 2011

SEGR 550 Distributed Computing. Final Exam, Fall 2011 SEGR 550 Distributed Computing Final Exam, Fall 2011 (100 points total) 1) This is a take-home examination. You must send your solutions in a PDF or text file to zhuy@seattleu.edu by the deadline. Late

More information

Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing

Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing to distributed computing Problem statement: Mutual

More information

Synchronization. Chapter 5

Synchronization. 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 information

A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems

A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems A Two-Layer Hybrid Algorithm for Achieving Mutual Exclusion in Distributed Systems QUAZI EHSANUL KABIR MAMUN *, MORTUZA ALI *, SALAHUDDIN MOHAMMAD MASUM, MOHAMMAD ABDUR RAHIM MUSTAFA * Dept. of CSE, Bangladesh

More information

Synchronization. Clock Synchronization

Synchronization. Clock Synchronization Synchronization Clock Synchronization Logical clocks Global state Election algorithms Mutual exclusion Distributed transactions 1 Clock Synchronization Time is counted based on tick Time judged by query

More information

22. Swaping: Policies

22. Swaping: Policies 22. Swaing: Policies Oerating System: Three Easy Pieces 1 Beyond Physical Memory: Policies Memory ressure forces the OS to start aging out ages to make room for actively-used ages. Deciding which age to

More information

Lecture 2: Leader election algorithms.

Lecture 2: Leader election algorithms. Distributed Algorithms M.Tech., CSE, 0 Lecture : Leader election algorithms. Faculty: K.R. Chowdhary : Professor of CS Disclaimer: These notes have not been subjected to the usual scrutiny reserved for

More information

Distributed Operating Systems. Distributed Synchronization

Distributed Operating Systems. Distributed Synchronization 2 Distributed Operating Systems Distributed Synchronization Steve Goddard goddard@cse.unl.edu http://www.cse.unl.edu/~goddard/courses/csce855 1 Synchronization Coordinating processes to achieve common

More information

Distributed Systems - II

Distributed 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 information

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf

Distributed systems. Lecture 6: distributed transactions, elections, consensus and replication. Malte Schwarzkopf Distributed systems Lecture 6: distributed transactions, elections, consensus and replication Malte Schwarzkopf Last time Saw how we can build ordered multicast Messages between processes in a group Need

More information

Distributed Systems Leader election & Failure detection

Distributed Systems Leader election & Failure detection Distributed Systems Leader election & Failure detection He Sun School of Informatics University of Edinburgh Leader of a computation Many distributed computations need a coordinator of server processors

More information

Verteilte Systeme (Distributed Systems)

Verteilte Systeme (Distributed Systems) Verteilte Systeme (Distributed Systems) Karl M. Göschka Karl.Goeschka@tuwien.ac.at http://www.infosys.tuwien.ac.at/teaching/courses/ VerteilteSysteme/ Lecture 6: Clocks and Agreement Synchronization of

More information

Synchronization. Distributed Systems IT332

Synchronization. Distributed Systems IT332 Synchronization Distributed Systems IT332 2 Outline Clock synchronization Logical clocks Election algorithms Mutual exclusion Transactions 3 Hardware/Software Clocks Physical clocks in computers are realized

More information

CSE 5306 Distributed Systems

CSE 5306 Distributed Systems CSE 5306 Distributed Systems Synchronization Jia Rao http://ranger.uta.edu/~jrao/ 1 Synchronization An important issue in distributed system is how process cooperate and synchronize with one another Cooperation

More information

OUTLINE. Introduction Clock synchronization Logical clocks Global state Mutual exclusion Election algorithms Deadlocks in distributed systems

OUTLINE. 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 information

A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION ATHESIS MASTER OF SCIENCE

A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION ATHESIS MASTER OF SCIENCE A DAG-BASED ALGORITHM FOR DISTRIBUTED MUTUAL EXCLUSION by Mitchell L. Neilsen ATHESIS submitted in partial fulfillment of the requirements for the degree MASTER OF SCIENCE Department of Computing and Information

More information

Chapter 16: Distributed Synchronization

Chapter 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 information

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen Distributed Systems Lec 9: Distributed File Systems NFS, AFS Slide acks: Dave Andersen (http://www.cs.cmu.edu/~dga/15-440/f10/lectures/08-distfs1.pdf) 1 VFS and FUSE Primer Some have asked for some background

More information

UNIT IV 1. What is meant by hardware and software clock? Clock devices can be programmed to generate interrupts at regular intervals in orders that, for example, time slicing can be implemented.the operating

More information

Last Time. 19: Distributed Coordination. Distributed Coordination. Recall. Event Ordering. Happens-before

Last 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 information

Chapter 18: Distributed

Chapter 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 information

Privacy Preserving Moving KNN Queries

Privacy Preserving Moving KNN Queries Privacy Preserving Moving KNN Queries arxiv:4.76v [cs.db] 4 Ar Tanzima Hashem Lars Kulik Rui Zhang National ICT Australia, Deartment of Comuter Science and Software Engineering University of Melbourne,

More information

Distributed Systems 8L for Part IB

Distributed Systems 8L for Part IB Distributed Systems 8L for Part IB Handout 3 Dr. Steven Hand 1 Distributed Mutual Exclusion In first part of course, saw need to coordinate concurrent processes / threads In particular considered how to

More information

Election Administration Algorithm for Distributed Computing

Election Administration Algorithm for Distributed Computing I J E E E C International Journal of Electrical, Electronics and Computer Engineering 1(2): 1-6(2012) Election Administration Algorithm for Distributed Computing SK Gandhi* and Pawan Kumar Thakur* **Department

More information

1.5 Case Study. dynamic connectivity quick find quick union improvements applications

1.5 Case Study. dynamic connectivity quick find quick union improvements applications . Case Study dynamic connectivity quick find quick union imrovements alications Subtext of today s lecture (and this course) Stes to develoing a usable algorithm. Model the roblem. Find an algorithm to

More information

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1 10 File System 1 We will examine this chater in three subtitles: Mass Storage Systems OERATING SYSTEMS FILE SYSTEM 1 File System Interface File System Imlementation 10.1.1 Mass Storage Structure 3 2 10.1

More information

Synchronization Part II. CS403/534 Distributed Systems Erkay Savas Sabanci University

Synchronization Part II. CS403/534 Distributed Systems Erkay Savas Sabanci University Synchronization Part II CS403/534 Distributed Systems Erkay Savas Sabanci University 1 Election Algorithms Issue: Many distributed algorithms require that one process act as a coordinator (initiator, etc).

More information

10. Multiprocessor Scheduling (Advanced)

10. Multiprocessor Scheduling (Advanced) 10. Multirocessor Scheduling (Advanced) Oerating System: Three Easy Pieces AOS@UC 1 Multirocessor Scheduling The rise of the multicore rocessor is the source of multirocessorscheduling roliferation. w

More information

search(i): Returns an element in the data structure associated with key i

search(i): Returns an element in the data structure associated with key i CS161 Lecture 7 inary Search Trees Scribes: Ilan Goodman, Vishnu Sundaresan (2015), Date: October 17, 2017 Virginia Williams (2016), and Wilbur Yang (2016), G. Valiant Adated From Virginia Williams lecture

More information

Event Ordering Silberschatz, Galvin and Gagne. Operating System Concepts

Event Ordering Silberschatz, Galvin and Gagne. Operating System Concepts Event Ordering Happened-before relation (denoted by ) If A and B are events in the same process, and A was executed before B, then A B If A is the event of sending a message by one process and B is the

More information

Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms

Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms Verteilte Systeme/Distributed Systems Ch. 5: Various distributed algorithms Holger Karl Computer Networks Group Universität Paderborn Goal of this chapter Apart from issues in distributed time and resulting

More information

CS649 Sensor Networks IP Track Lecture 6: Graphical Models

CS649 Sensor Networks IP Track Lecture 6: Graphical Models CS649 Sensor Networks IP Track Lecture 6: Grahical Models I-Jeng Wang htt://hinrg.cs.jhu.edu/wsn06/ Sring 2006 CS 649 1 Sring 2006 CS 649 2 Grahical Models Grahical Model: grahical reresentation of joint

More information

has been retired This version of the software Sage Timberline Office Get Started Document Management 9.8 NOTICE

has been retired This version of the software Sage Timberline Office Get Started Document Management 9.8 NOTICE This version of the software has been retired Sage Timberline Office Get Started Document Management 9.8 NOTICE This document and the Sage Timberline Office software may be used only in accordance with

More information

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali

Self Stabilization. CS553 Distributed Algorithms Prof. Ajay Kshemkalyani. by Islam Ismailov & Mohamed M. Ali Self Stabilization CS553 Distributed Algorithms Prof. Ajay Kshemkalyani by Islam Ismailov & Mohamed M. Ali Introduction There is a possibility for a distributed system to go into an illegitimate state,

More information

Distributed Systems Principles and Paradigms

Distributed Systems Principles and Paradigms Distributed Systems Principles and Paradigms Chapter 05 (version 16th May 2006) Maarten van Steen Vrije Universiteit Amsterdam, Faculty of Science Dept. Mathematics and Computer Science Room R4.20. Tel:

More information

Distributed Coordination! Distr. Systems: Fundamental Characteristics!

Distributed Coordination! Distr. Systems: Fundamental Characteristics! Distributed Coordination! What makes a system distributed?! Time in a distributed system! How do we determine the global state of a distributed system?! Event ordering! Mutual exclusion! Reading: Silberschatz,

More information

Optimizing Dynamic Memory Management!

Optimizing Dynamic Memory Management! Otimizing Dynamic Memory Management! 1 Goals of this Lecture! Hel you learn about:" Details of K&R hea mgr" Hea mgr otimizations related to Assignment #6" Faster free() via doubly-linked list, redundant

More information

Distributed Systems Exam 1 Review Paul Krzyzanowski. Rutgers University. Fall 2016

Distributed Systems Exam 1 Review Paul Krzyzanowski. Rutgers University. Fall 2016 Distributed Systems 2015 Exam 1 Review Paul Krzyzanowski Rutgers University Fall 2016 1 Question 1 Why did the use of reference counting for remote objects prove to be impractical? Explain. It s not fault

More information

Control. CS432: Distributed Systems Spring 2017

Control. CS432: Distributed Systems Spring 2017 Transactions and Concurrency Control Reading Chapter 16, 17 (17.2,17.4,17.5 ) [Coulouris 11] Chapter 12 [Ozsu 10] 2 Objectives Learn about the following: Transactions in distributed systems Techniques

More information

Leader Election in Rings

Leader Election in Rings Leader Election Arvind Krishnamurthy Fall 2003 Leader Election in Rings Under different models: Synchronous vs. asynchronous Anonymous vs. non-anonymous (knowledge of unique id) Knowledge of n (non-uniform)

More information

Replication Using Group Communication Over a Partitioned Network

Replication Using Group Communication Over a Partitioned Network Relication Using Grou Communication Over a Partitioned Network Thesis submitted for the degree Doctor of Philosohy Yair Amir Submitted to the Senate of the Hebrew University of Jerusalem (1995). This work

More information

Continuous Visible k Nearest Neighbor Query on Moving Objects

Continuous Visible k Nearest Neighbor Query on Moving Objects Continuous Visible k Nearest Neighbor Query on Moving Objects Yaniu Wang a, Rui Zhang b, Chuanfei Xu a, Jianzhong Qi b, Yu Gu a, Ge Yu a, a Deartment of Comuter Software and Theory, Northeastern University,

More information

Distributed Systems. Before We Begin. Advantages. What is a Distributed System? CSE 120: Principles of Operating Systems. Lecture 13.

Distributed Systems. Before We Begin. Advantages. What is a Distributed System? CSE 120: Principles of Operating Systems. Lecture 13. CSE 120: Principles of Operating Systems Lecture 13 Distributed Systems December 2, 2003 Before We Begin Read Chapters 15, 17 (on Distributed Systems topics) Prof. Joe Pasquale Department of Computer Science

More information

The Anubis Service. Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL June 8, 2005*

The Anubis Service. Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL June 8, 2005* The Anubis Service Paul Murray Internet Systems and Storage Laboratory HP Laboratories Bristol HPL-2005-72 June 8, 2005* timed model, state monitoring, failure detection, network artition Anubis is a fully

More information

DISTRIBUTED SYSTEMS [COMP9243] Lecture 5: Synchronisation and Coordination (Part 2) TRANSACTION EXAMPLES TRANSACTIONS.

DISTRIBUTED SYSTEMS [COMP9243] Lecture 5: Synchronisation and Coordination (Part 2) TRANSACTION EXAMPLES TRANSACTIONS. TRANSACTIONS Transaction: DISTRIBUTED SYSTEMS [COMP94] Comes from database world Defines a sequence of operations Atomic in presence of multiple clients and failures Slide Lecture 5: Synchronisation and

More information

DISTRIBUTED SYSTEMS [COMP9243] Lecture 5: Synchronisation and Coordination (Part 2) TRANSACTION EXAMPLES TRANSACTIONS.

DISTRIBUTED SYSTEMS [COMP9243] Lecture 5: Synchronisation and Coordination (Part 2) TRANSACTION EXAMPLES TRANSACTIONS. TRANSACTIONS Transaction: DISTRIBUTED SYSTEMS [COMP94] Comes from database world Defines a sequence of operations Atomic in presence of multiple clients and failures Slide Lecture 5: Synchronisation and

More information

Theoretical Analysis of Graphcut Textures

Theoretical Analysis of Graphcut Textures Theoretical Analysis o Grahcut Textures Xuejie Qin Yee-Hong Yang {xu yang}@cs.ualberta.ca Deartment o omuting Science University o Alberta Abstract Since the aer was ublished in SIGGRAPH 2003 the grahcut

More information

SYNCHRONIZATION. DISTRIBUTED SYSTEMS Principles and Paradigms. Second Edition. Chapter 6 ANDREW S. TANENBAUM MAARTEN VAN STEEN

SYNCHRONIZATION. DISTRIBUTED SYSTEMS Principles and Paradigms. Second Edition. Chapter 6 ANDREW S. TANENBAUM MAARTEN VAN STEEN DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN واحد نجف آباد Chapter 6 SYNCHRONIZATION Dr. Rastegari - Email: rastegari@iaun.ac.ir - Tel: +98331-2291111-2488

More information

Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide. Version has been retired. This version of the software

Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide. Version has been retired. This version of the software Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide Version 14.12 This version of the software has been retired This is a ublication of Sage Software, Inc. Coyright 2014. Sage Software,

More information

42. Crash Consistency: FSCK and Journaling

42. Crash Consistency: FSCK and Journaling 42. Crash Consistency: FSCK and Journaling Oerating System: Three Easy Pieces AOS@UC 1 Crash Consistency AOS@UC 2 Crash Consistency Unlike most data structure, file system data structures must ersist w

More information

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network 1 Sensitivity Analysis for an Otimal Routing Policy in an Ad Hoc Wireless Network Tara Javidi and Demosthenis Teneketzis Deartment of Electrical Engineering and Comuter Science University of Michigan Ann

More information

殷亚凤. Synchronization. Distributed Systems [6]

殷亚凤. Synchronization. Distributed Systems [6] Synchronization Distributed Systems [6] 殷亚凤 Email: yafeng@nju.edu.cn Homepage: http://cs.nju.edu.cn/yafeng/ Room 301, Building of Computer Science and Technology Review Protocols Remote Procedure Call

More information

Leader Election Algorithms in Distributed Systems

Leader Election Algorithms in Distributed Systems Available Online at www.ijcsmc.com International Journal of Computer Science and Mobile Computing A Monthly Journal of Computer Science and Information Technology IJCSMC, Vol. 3, Issue. 6, June 2014, pg.374

More information

Silberschatz and Galvin Chapter 18

Silberschatz 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 information

Crash Recovery CSC 375 Fall 2012 R&G - Chapter 18

Crash Recovery CSC 375 Fall 2012 R&G - Chapter 18 Crash Recovery CSC 375 Fall 2012 R&G - Chater 18 If you are going to be in the logging business, one of the things that you have to o is to learn about heavy equiment. Robert VanNatta, Logging History

More information

Network Layer: Routing

Network Layer: Routing Network Layer: Routing The Problem A B R 1 R 2 R 4 R 3 Goal: for each destination, compute next hop 1 Lecture 9 2 Basic Assumptions Trivial solution: Flooding Dynamic environment: links and routers unreliable:

More information

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data Efficient Processing of To-k Dominating Queries on Multi-Dimensional Data Man Lung Yiu Deartment of Comuter Science Aalborg University DK-922 Aalborg, Denmark mly@cs.aau.dk Nikos Mamoulis Deartment of

More information

CLIC CLient-Informed Caching for Storage Servers

CLIC CLient-Informed Caching for Storage Servers CLIC CLient-Informed Caching for Storage Servers Xin Liu Ashraf Aboulnaga Ken Salem Xuhui Li David R. Cheriton School of Comuter Science University of Waterloo February 2009 Two-Tier Caching DBMS storage

More information

Synchronization (contd.)

Synchronization (contd.) Outline Synchronization (contd.) http://net.pku.edu.cn/~course/cs501/2008 Hongfei Yan School of EECS, Peking University 3/17/2008 Mutual Exclusion Permission-based Token-based Election Algorithms The Bully

More information

33. Event-based Concurrency

33. Event-based Concurrency 33. Event-based Concurrency Oerating System: Three Easy Pieces AOS@UC 1 Event-based Concurrency A different style of concurrent rogramming without threads w Used in GUI-based alications, some tyes of internet

More information

To appear in IEEE TKDE Title: Efficient Skyline and Top-k Retrieval in Subspaces Keywords: Skyline, Top-k, Subspace, B-tree

To appear in IEEE TKDE Title: Efficient Skyline and Top-k Retrieval in Subspaces Keywords: Skyline, Top-k, Subspace, B-tree To aear in IEEE TKDE Title: Efficient Skyline and To-k Retrieval in Subsaces Keywords: Skyline, To-k, Subsace, B-tree Contact Author: Yufei Tao (taoyf@cse.cuhk.edu.hk) Deartment of Comuter Science and

More information

Lecture 8: Orthogonal Range Searching

Lecture 8: Orthogonal Range Searching CPS234 Comutational Geometry Setember 22nd, 2005 Lecture 8: Orthogonal Range Searching Lecturer: Pankaj K. Agarwal Scribe: Mason F. Matthews 8.1 Range Searching The general roblem of range searching is

More information

June 22/24/ Gerd Liefländer System Architecture Group Universität Karlsruhe (TH), System Architecture Group

June 22/24/ Gerd Liefländer System Architecture Group Universität Karlsruhe (TH), System Architecture Group Distributed Systems 12 Coordination June 22/24/29 2009 Gerd Liefländer System Architecture Group 2009 Universität Karlsruhe (TH), System Architecture Group 1 Overview Outline: Next Lectures Coordination

More information

Distributed Systems. Pre-Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2015

Distributed Systems. Pre-Exam 1 Review. Paul Krzyzanowski. Rutgers University. Fall 2015 Distributed Systems Pre-Exam 1 Review Paul Krzyzanowski Rutgers University Fall 2015 October 2, 2015 CS 417 - Paul Krzyzanowski 1 Selected Questions From Past Exams October 2, 2015 CS 417 - Paul Krzyzanowski

More information

Process groups and message ordering

Process groups and message ordering Process groups and message ordering If processes belong to groups, certain algorithms can be used that depend on group properties membership create ( name ), kill ( name ) join ( name, process ), leave

More information