Asynchronous ASMs Network Leader Election Egon Börger Dipartimento di Informatica, Universita di Pisa

Slides:



Advertisements
Similar presentations
© Egon Börger: Linked List 1 Double Linked Lists : Desired Operations Define an ASM which offers the following operations, predicates and functions on.
Advertisements

1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Real-Time Process Control Systems (Real-Time Controller ASM for the Railroad Crossing Case Study) Egon Börger Dipartimento di Informatica, Universita di.
THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Distributed Computing 1. Lower bound for leader election on a complete graph Shmuel Zaks ©
1.1The Principle of Mathematical Induction 1.2Divisibility Chapter Summary Case Study Mathematical Induction 1.
Chapter 15 Basic Asynchronous Network Algorithms
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
1 Maximal Independent Set. 2 Independent Set (IS): In a graph G=(V,E), |V|=n, |E|=m, any set of nodes that are not adjacent.
Chapter 5 Shortest Paths: Label-Correcting Algorithms
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Modeling Database Recovery An Exercise in Stepwise Refinement Egon Börger Dipartimento di Informatica, Universita di Pisa
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Lecture 4: Elections, Reset Anish Arora CSE 763 Notes include material from Dr. Jeff Brumfield.
Byzantine Generals Problem: Solution using signed messages.
Tirgul 12 Algorithm for Single-Source-Shortest-Paths (s-s-s-p) Problem Application of s-s-s-p for Solving a System of Difference Constraints.
Chapter 5 Routing Algorithm in Networks. How are message routed from origin to destination? 1) Circuit-Switching → telephone net. Dedicated bandwidth.
© Egon Börger: Lift 1 Lift Control (N.Davis, 1984) The Problem Design the logic to move n lifts bw m floors, and prove it to be well functioning, where.
Asynchronous ASMs Ring Load Balance Egon Börger Dipartimento di Informatica, Universita di Pisa
Asynchronous Consensus (Some Slides borrowed from ppt on Web.(by Ken Birman) )
Asynchronous ASMs Master/Slave Agreement Egon Börger Dipartimento di Informatica, Universita di Pisa
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
CS294, YelickSelf Stabilizing, p1 CS Self-Stabilizing Systems
© Egon Börger: Daemon Game 1 Daemon Game (Turner 1993) Problem Description Design a system for the following multi-player game: –A Daemon generates Bump.
Chapter 7 Network Flow Models.
Asynchronous Multi-Agent ASMs An Introduction Egon Börger Dipartimento di Informatica, Universita di Pisa
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Asynchronous ASMs Phase Synchronization on Undirected Trees Egon Börger Dipartimento di Informatica, Universita di Pisa
Problem Set 1.2. #2-Induction Proof Case k=1 – Left side:Right side: Induction step: assume true for k. For k+1, – Left side: – Using – assumption: –
Illustrating Stepwise Refinement Shortest Path ASMs Egon Börger Dipartimento di Informatica, Universita di Pisa
Network Flow Models Chapter 7.
Tirgul 7 Review of graphs Graph algorithms: – BFS (next tirgul) – DFS – Properties of DFS – Topological sort.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
1 Shortest Path Algorithms. 2 Routing Algorithms Shortest path routing What is a shortest path? –Minimum number of hops? –Minimum distance? There is a.
Chapter 10 Global Properties. Unstable Predicate Detection A predicate is stable if, once it becomes true it remains true Snapshot algorithm is not useful.
Introduction to computer networking Distributed Algorithms Class Recitation.
Introduction to Management Science
Theory of Computing Lecture 7 MAS 714 Hartmut Klauck.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
© Egon Börger: Clock and Stopwatch ASM 1 Illustrating the ASM Function Classification A real-time CLOCK: –Monitored: CurrTime: Real (supposed to be increasing.
7-1 Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Network Flow Models Chapter 7.
Distributed Asynchronous Bellman-Ford Algorithm
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Asynchronous Multi-Agent ASMs An Introduction Egon Börger Dipartimento di Informatica, Universita di Pisa
EE 685 presentation Optimization Flow Control, I: Basic Algorithm and Convergence By Steven Low and David Lapsley.
Hwajung Lee. The State-transition model The set of global states = s 0 x s 1 x … x s m {s k is the set of local states of process k} S0  S1  S2  Each.
Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
15.082J & 6.855J & ESD.78J September 30, 2010 The Label Correcting Algorithm.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
EMIS 8374 Shortest Path Trees Updated 11 February 2008 Slide 1.
Distributed, Self-stabilizing Placement of Replicated Resources in Emerging Networks Bong-Jun Ko, Dan Rubenstein Presented by Jason Waddle.
Distributed Algorithms for Dynamic Coverage in Sensor Networks Lan Lin and Hyunyoung Lee Department of Computer Science University of Denver.
1 Chapter 11 Global Properties (Distributed Termination)
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. Fast.
1 Plaxton Routing. 2 History Greg Plaxton, Rajmohan Rajaraman, Andrea Richa. Accessing nearby copies of replicated objects, SPAA 1997 Used in several.
Asynchronous ASMs Echo Algorithm Egon Börger Dipartimento di Informatica, Universita di Pisa
TIRGUL 10 Dijkstra’s algorithm Bellman-Ford Algorithm 1.
Chapter 5 1. Chapter Summary  Mathematical Induction  Strong Induction  Recursive Definitions  Structural Induction  Recursive Algorithms.
Distributed voting application for handheld devices
EMIS 8374 Dijkstra’s Algorithm Updated 18 February 2008
CSE 421: Introduction to Algorithms
Dijkstra’s Algorithm for the Shortest Path Problem
Shortest-Path Property 4.1
CSCE 222 Discrete Structures for Computing
Lecture 12 CSE 331 Sep 22, 2014.
Totally Asynchronous Iterative Algorithms
Locality In Distributed Graph Algorithms
Presentation transcript:

Asynchronous ASMs Network Leader Election Egon Börger Dipartimento di Informatica, Universita di Pisa

© Egon Börger: Network Leader Election 2 Leader Election: problem statement Goal: Design a distributed algorithm for the election of a leader in finite connected networks of homogeneous agents, using only communication (message passing) between neighbor nodes. Assumptions: –network nodes (agents) are connected & linearly ordered –leader = max (Agent) wrt the linear order < Algorithmic Idea: every agent (network node) –proposes to his neighbors his current leader candidate –checks the leader proposals received from his neighbors upon detecting a proposal which improves his leader candidate he improves his candidate for his next proposal Eventually cand=max(Agent) holds for all agents

© Egon Börger: Network Leader Election 3 Leader Election: Agent Signature Agent : finite linearly ordered connected set –< linear order of Agent (external function) leader = max (Agent) wrt the linear order < Each agent equipped with: –neighb  Agent (external function) –cand: Agent (controlled function) –proposals  Agent (controlled function) –ctl_state : {proposeToNeighbors, checkProposals} Initially ctl_state=proposeToNeighbors, cand=self, proposals = empty

© Egon Börger: Network Leader Election 4 Leader Election Control State ASM propose To Neighbors check Proposals propose proposals improve there are proposals empty proposals no improve by proposals empty proposals yes propose  forall n  neighb insert cand to proposals(n) proposals improve  max (proposals) > cand improve by proposals  cand := max (proposals)

© Egon Börger: Network Leader Election 5 Leader Election: Correctness property Proposition: In every distributed run of agents equipped with the leader election ASM, eventually for every agent holds: –cand=max(Agent) –ctl_state = checkProposals –proposals = empty Proof (assuming that every enabled agent will eventually make a move): induction on runs and on  {leader - cand(n)| n  Agent} –measuring “distances” of candidates from leader

© Egon Börger: Network Leader Election 6 Refining Leader Election: compute minimal path to leader Goal: refine the leader election algorithm to compute for each agent also a shortest path to the leader, providing –a neighbor (except for leader) which is closest to the leader –the minimal distance to the leader Idea: enrich cand and proposals by neighbor with minimal distance to leader: –nearNeighb: Agent –distance: Distance (e.g. = Nat  {  }) –proposals: PowerSet(Agent x Agent x Distance) Initially nearNeighbor = self distance =0

© Egon Börger: Network Leader Election 7 ASM Computing Minimal Path To Leader propose To Neighbors check Proposals propose proposals improve there are proposals empty proposals no improve by proposals empty proposals yes improve by proposals  cand := Max (proposals) update PathInfo to Max (proposals) propose  forall n  neighb insert (cand, nearNeighb, distance) to proposals(n) proposals improve  let m = Max (proposals) in m > cand or (m=cand and minDistance(proposalsFor m)+1 < distance) Max taken over agents update PathInfo to m  choose (n,d) with (m,n,d)  proposals d=minDistance(proposalsFor m) in nearNeighb := n distance := d+1

© Egon Börger: Network Leader Election 8 Minimal Path Computation: Correctness Proposition: In every distributed run of agents equipped with the ASM computing a minimal path to the leader, eventually for every agent holds: –cand=max(Agent)=leader –distance=minimal distance of a path from agent to leader –nearNeighbor = a neighbor of agent on a minimal path to the leader (except for leader where nearNeighbor=leader) –ctl_state = checkProposals –proposals = empty Proof (assuming that every enabled agent will eventually make a move): induction on runs and on  {leader - cand(n)| n  Agent} with side induction on the minimal distances in proposalsFor Max(proposals)

© Egon Börger: Network Leader Election 9 Exercises Refine the CHECK submachine of the leader election ASM by a machine which checks proposals elementwise. Prove that the refinement is correct. –Hint: See Reisig op.cit. Fig.32.1 Adapt the ASM for the election of a maximal leader and for computing a minimal path wrt a partial order  instead of a total order. Reuse the leader election ASM to define an algorithm which, given the leader, computes for each agent the distance (length of a shortest path) to the leader and a neighbor where to start a shortest path to the leader. –Hint: See Reisig op.cit. Fig.32.2

© Egon Börger: Network Leader Election 10 References W.Reisig: Elements of Distributed Algorithms Springer-Verlag 1998 –See Section 32 (in particular Fig and 32.2) and Section 76 for a correctness proof. E. Börger, R. Stärk: Abstract State Machines. A Method for High-Level System Design and Analysis Springer-Verlag 2003, see –See Chapter 6.1