Centralized mutual exclusion Problem : What if the coordinator fails? Solution : Elect a new one.

Slides:



Advertisements
Similar presentations
Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Advertisements

Leader Election Breaking the symmetry in a system.
CS 542: Topics in Distributed Systems Diganta Goswami.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Page 1 Mutual Exclusion* Distributed Systems *referred to slides by Prof. Paul Krzyzanowski at Rutgers University and Prof. Mary Ellen Weisskopf at University.
Distributed Systems Spring 2009
1 Distributed Computing Algorithms CSCI Distributed Computing: everything not centralized many processors.
CS 582 / CMPE 481 Distributed Systems
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Distributed Snapshots –Termination detection Election algorithms –Bully –Ring.
1. Explain why synchronization is so important in distributed systems by giving an appropriate example When each machine has its own clock, an event that.
Distributed Systems Fall 2009 Coordination and agreement, Multicast, and Message ordering.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
CS603 Process Synchronization February 11, Synchronization: Basics Problem: Shared Resources –Generally data –But could be others Approaches: –Model.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Coordination in Distributed Systems Lecture # 8. Coordination Anecdotes  Decentralized, no coordination  Aloha ~ 18%  Some coordinating Master  Slotted.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Election Algorithms and Distributed Processing Section 6.5.
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Mutual exclusion Concurrent access of processes to a shared resource or data is executed in mutually exclusive manner Distributed mutual exclusion can.
4.5 DISTRIBUTED MUTUAL EXCLUSION MOSES RENTAPALLI.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
Consensus and Its Impossibility in Asynchronous Systems.
Time and Coordination March 13, Time and Coordination What is time? :-)  Issue: How do you coordinate distributed computers if there is no global.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
MUTUAL EXCLUSION AND QUORUMS CS Distributed Mutual Exclusion Given a set of processes and a single resource, develop a protocol to ensure exclusive.
Review for Exam 2. Topics included Deadlock detection Resource and communication deadlock Graph algorithms: Routing, spanning tree, MST, leader election.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
Defining Programs, Specifications, fault-tolerance, etc.
Page 1 Distributed Systems Election Algorithms* *referred to slides by Prof. Hugh C. Lauer at Worcester Polytechnic Institute.
DC6: Chapter 12 Coordination Election Algorithms Distributed Mutual Exclusion Consensus Group Communication.
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 8 Leader Election Section 12.3 Klara Nahrstedt.
Elections in a Distributed Computing System Hector Garcia-Molina Presenter: Srinath Rao.
Global State (1) a)A consistent cut b)An inconsistent cut.
Synchronization CSCI 4780/6780. Mutual Exclusion Concurrency and collaboration are fundamental to distributed systems Simultaneous access to resources.
Presenter: Long Ma Advisor: Dr. Zhang 4.5 DISTRIBUTED MUTUAL EXCLUSION.
Vector Clock Each process maintains an array of clocks –vc.j.k denotes the knowledge that j has about the clock of k –vc.j.j, thus, denotes the clock of.
ADITH KRISHNA SRINIVASAN
Studying Different Problems from Distributed Computing Several of these problems are motivated by trying to use solutiions used in `centralized computing’
Lecture 11-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) September 28, 2010 Lecture 11 Leader Election.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
An Efficient and Fault-Tolerant Solution for Distributed Mutual Exclusion by D. Agrawal, A.E. Abbadi Presentation by Peter Tsui for COEN 317, F/03.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Distributed Mutual Exclusion Synchronization in Distributed Systems Synchronization in distributed systems are often more difficult compared to synchronization.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
CSC 8420 Advanced Operating Systems Georgia State University Yi Pan Transactions are communications with ACID property: Atomicity: all or nothing Consistency:
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
Revisiting Logical Clocks: Mutual Exclusion Problem statement: Given a set of n processes, and a shared resource, it is required that: –Mutual exclusion.
Distributed Systems 31. Theoretical Foundations of Distributed Systems - Coordination Simon Razniewski Faculty of Computer Science Free University of Bozen-Bolzano.
CSE 486/586 Distributed Systems Leader Election
Chapter 11 Coordination Election Algorithms
Distributed Processing Election Algorithm
Chapter 6.3 Mutual Exclusion
CSE 486/586 Distributed Systems Leader Election
Distributed Computing:
Synchronization (2) – Mutual Exclusion
Prof. Leonardo Mostarda University of Camerino
Leader Election Bernard Chen.
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Centralized mutual exclusion Problem : What if the coordinator fails? Solution : Elect a new one

Leader Election : Problem Statement Given is a set of n processes, 1.. n. Each process j has variables : –l.j : true iff j is a leader –up.j : true iff j has not failed This is called an auxiliary variable. Requirements –In any state, there is at most one non-failed leader always (up.j  up.k a  l.j  l.k  j = k) –eventually some process is elected a leader eventually (exists j :: up.j  l.j)

Solving Leader Election via Tree Construction You are a leader iff you are a root –Problems? In connected (but not fully connected) networks, tree construction and leader election are almost same. –Everyone needs to know how to get to the leader –The path to leader (often forms a tree)

Algorithms for Leader Election There are several algorithms for leader election We will discuss one of them: Bully Algoirthm

Bully Algorithm The goal is to choose the process with highest ID as the leader. When a process is repaired or it suspects that the current leader has failed, it starts `election' Election process : –[Step 1 :] Make sure that processes with higher ID have failed –[Step 2 :] If successful, inform all processes with lower ID that a new leader is elected

Bully Algorithm (continued) Step 1 –When process j enters the election mode, it sends an `election' message to j+1,.. n. –If process k receives the election message from j, it enters the election mode, sends an OK message to j, and sends election message to k+1, n. –If j receives an OK message, j has lost the election. –If j does not receive any OK message, j can proceed to step 2.

Bully Algorithm (continued) Step 2 : When process j enters the second step, it has checked that processes j+1.. n have failed. It needs to make sure that no process in 1..(j-1) is a leader. Process j forces processes (j-1).. 1 to accept j as the leader. Garcia-Molina suggests that this be done using RPC; contact (j-1), (j-2),..., 1. –This ensures that if two processes `know’ who the leader is then their information is the same.

Other Approaches Probabilistic Algorithm –Each node chooses a random number between [0..N] –Send the number to all –Leader = (sum of values received) mod N –Repeat if this process has failed.

Other Approaches Utilize tree construction algorithm –Provides nonmasking fault-tolerance for leader election Eventually at most one leader Will focus on the idea of diffusing computation that can help ensuring at most one leader at all times

Results So Far Lack of global clocks Logical clocks Vector Clocks Mutual Exclusion Quorum Based Token Based Leader election Causal Delivery