1 / 21

Leader election

Leader election . Assumptions Ring topology Synchronous network No failures Goal Exactly one process says: “I am the leader”. Algorithms. Basic Time: O( n ) rounds Message complexity: O( n 2 ) More complicated Time: O( n ) rounds Message complexity: O( n log n ).

finian
Download Presentation

Leader election

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Leader election • Assumptions • Ring topology • Synchronous network • No failures • Goal • Exactly one process says: “I am the leader”

  2. Algorithms • Basic • Time: O(n) rounds • Message complexity: O(n2) • More complicated • Time: O(n) rounds • Message complexity: O(n log n)

  3. Lower bounds - Messages • Comparison based algorithms • O(n log n) messages • In general • O(n) messages • Asynchronous networks • O(n log n)

  4. Shortest path routes • Input • Connected, undirected graph • Destination • Output • Shortest route to destination • Model: self-stabilizing • Asynchronous • Arbitrary failures (corrupt state) • Eventual stabilization

  5. Bellman-Ford • Every so often: • Ask all neighbors distance • Set distance to minimum • Destination always: distance=0 • Stabilizes after n “rounds”

  6. Consensus • Input • 1 or 0 to each node • Output • Agreement: all nodes decide either 0 or 1 • Termination: all nodes eventually decide • Validity: if all inputs 1, then decide 1

  7. Motivation • Many problems equivalent to consensus • Read-Modify-Write Memory • Database commit • Transactional filesystem • Totally ordered broadcast • Distributed firing squad

  8. Universality result • Assume consensus service • Assume non-fault tolerant sequential algorithm (date object) A • Then • There exists a fault-tolerant, wait-free distributed implementation A’ of algorithm A

  9. Asynchronous consensus • Assume 1 stopping failure • Impossible! [FLP 1985] • If consensus algorithm C guarantees agreement and validity • Then • There exists an execution of C that does not terminate

  10. More consensus models • Synchronous • f+1 rounds if f failures • Asynchronous plus eventual synchrony • Eventual synchronized clocks • Eventual message delivery bound d • Consensus terminates • 0((f+4)*d) after stabilization

  11. Failure detectors • Assume total asynchrony • Assume failure detector service • Notifies node i when node j fails • Eventually… • Allow solving consensus • Weakest failure-detector? • Leader-election failure-detector

  12. Byzantine consensus • What if some nodes lie? • Synchronous model • f stopping failures • n nodes • 2f+1 ≤ n

  13. Other consensus problems • Weak consensus • Not feasible • Weak Byzantine consensus • Not feasible • k-set consensus • f < k => feasible • Approximate consensus

  14. Current research • Dynamic networks • Joins/Leaves/Failures • Peer-to-peer networks • Mobile networks • Unknown participants • Large scale networks • Data warehouses • Internet sized applications • Non-blocking, wait-free implementations

  15. Formal methods • IOA language and compiler • Simulator • Proof tools • Larch prover • Daikon invariant detection • Java code generator (in progress)

  16. Summary of results (1)

  17. Summary of results (2)

  18. Models • Nodes • Bounded/unbounded • Unique ids • Known/unknown participants • Communication • Network links • Known/unknown topology • Shared memory

  19. Atomic memory • Definition • Motivation • Algorithms?

  20. FINE Mutual exclusion • Dijkstra • Dining philosophers • Resource allocation

More Related