Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.

Slides:



Advertisements
Similar presentations
Fault Tolerance. Basic System Concept Basic Definitions Failure: deviation of a system from behaviour described in its specification. Error: part of.
Advertisements

Global States.
Distributed Leader Election Algorithms in Synchronous Ring Networks
Impossibility of Distributed Consensus with One Faulty Process
+ The Byzantine Generals Problem Leslie Lamport, Robert Shostak and Marshall Pease Presenter: Jose Calvo-Villagran
Chapter 6 - Convergence in the Presence of Faults1-1 Chapter 6 Self-Stabilization Self-Stabilization Shlomi Dolev MIT Press, 2000 Shlomi Dolev, All Rights.
Agreement: Byzantine Generals UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau Paper: “The.
Lecture 8: Asynchronous Network Algorithms
Teaser - Introduction to Distributed Computing
Chapter 15 Basic Asynchronous Network Algorithms
Announcements. Midterm Open book, open note, closed neighbor No other external sources No portable electronic devices other than medically necessary medical.
Lecture 7: Synchronous Network Algorithms
Computer Science 425 Distributed Systems CS 425 / ECE 428 Consensus
Consensus Hao Li.
The Byzantine Generals Problem Boon Thau Loo CS294-4.
The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease Distributed Algorithms A1 Presented by: Anna Bendersky.
Prepared by Ilya Kolchinsky.  n generals, communicating through messengers  some of the generals (up to m) might be traitors  all loyal generals should.
Byzantine Generals Problem: Solution using signed messages.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Sergio Rajsbaum 2006 Lecture 3 Introduction to Principles of Distributed Computing Sergio Rajsbaum Math Institute UNAM, Mexico.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
1 Fault-Tolerant Consensus. 2 Failures in Distributed Systems Link failure: A link fails and remains inactive; the network may get partitioned Crash:
Josef WidderBooting Clock Synchronization1 The  - Model, and how to Boot Clock Synchronization in it Josef Widder Embedded Computing Systems Group
Byzantine Generals Problem in the Light of P2P Computing Natalya Fedotova Luca Veltri International Workshop on Ubiquitous Access Control July 17, 2006.
Bit Complexity of Breaking and Achieving Symmetry in Chains and Rings.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems.
Chapter Resynchsonous Stabilizer Chapter 5.1 Resynchsonous Stabilizer Self-Stabilization Shlomi Dolev MIT Press, 2000 Draft of Jan 2004, Shlomi.
Distributed Algorithms: Agreement Protocols. Problems of Agreement l A set of processes need to agree on a value (decision), after one or more processes.
CS 425 / ECE 428 Distributed Systems Fall 2014 Indranil Gupta (Indy) Lecture 19: Paxos All slides © IG.
The Byzantine Generals Problem Leslie Lamport Robert Shostak Marshall Pease.
Distributed Computing 5. Synchronization Shmuel Zaks ©
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
6.852: Distributed Algorithms Spring, 2008 Instructors: Nancy Lynch, Victor Luchangco Teaching Assistant: Calvin Newport Course Secretary: Joanne Hanley.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Review for Exam 2. Topics included Deadlock detection Resource and communication deadlock Graph algorithms: Routing, spanning tree, MST, leader election.
Ch11 Distributed Agreement. Outline Distributed Agreement Adversaries Byzantine Agreement Impossibility of Consensus Randomized Distributed Agreement.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 8 Instructor: Haifeng YU.
1 Chapter 12 Consensus ( Fault Tolerance). 2 Reliable Systems Distributed processing creates faster systems by exploiting parallelism but also improve.
1 The Byzantine Generals Problem Leslie Lamport, Robert Shostak, Marshall Pease Presented by Radu Handorean.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
DISTRIBUTED SYSTEMS II A POLYNOMIAL LOCAL SOLUTION TO MUTUAL EXCLUSION Prof Philippas Tsigas Distributed Computing and Systems Research Group.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
The Byzantine General Problem Leslie Lamport, Robert Shostak, Marshall Pease.SRI International presented by Muyuan Wang.
Lecture #14 Distributed Algorithms (II) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems.
CSE 60641: Operating Systems Implementing Fault-Tolerant Services Using the State Machine Approach: a tutorial Fred B. Schneider, ACM Computing Surveys.
Chap 15. Agreement. Problem Processes need to agree on a single bit No link failures A process can fail by crashing (no malicious behavior) Messages take.
UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department
Several sets of slides by Prof. Jennifer Welch will be used in this course. The slides are mostly identical to her slides, with some minor changes. Set.
Agreement in Distributed Systems n definition of agreement problems n impossibility of consensus with a single crash n solvable problems u consensus with.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
1 Fault tolerance in distributed systems n Motivation n robust and stabilizing algorithms n failure models n robust algorithms u decision problems u impossibility.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
1 AGREEMENT PROTOCOLS. 2 Introduction Processes/Sites in distributed systems often compete as well as cooperate to achieve a common goal. Mutual Trust/agreement.
reaching agreement in the presence of faults
Lecture 9: Asynchronous Network Algorithms
Outline Distributed Mutual Exclusion Distributed Deadlock Detection
Alternating Bit Protocol
Distributed Consensus
Agreement Protocols CS60002: Distributed Systems
Distributed Consensus
Byzantine Faults definition and problem statement impossibility
Consensus in Synchronous Systems: Byzantine Generals Problem
Lecture 8: Synchronous Network Algorithms
Leader Election Ch. 3, 4.1, 15.1, 15.2 Chien-Liang Fok 4/29/2019
Presentation transcript:

Lecture #12 Distributed Algorithms (I) CS492 Special Topics in Computer Science: Distributed Algorithms and Systems

Admin Stuff Quiz #5 return Cloud computing article Lynch’s book chapters 2

The Byzantine Generals Problem An agreement problem between the Byzantine generals on whether to attack a city or not – Messengers are not lost, but … – There may be traitors among them To find an algorithm to ensure that the loyal generals will reach agreement – Traitors can trick some to attack and other not to – They can force an attack when no general wants – They can confuse some that the generals cannot decide 3

When the mesg is sent orally 4 A B C

Answer: There is no solution with fewer than 3m+1 generals can cope with m traitors 5

Reference “The Byzantine Generals Problem” Leslie Lamport, Robert Shostak, Marshall Pease ACM Trans. on Programming Languages and Systems, Vol. 4, No. 3, July 1982, pp

Distributed Algorithms A large variety of concurrent algorithms – Originally refer to algorithms that were designed to run on many processors “distributed” over a large geographical area – Nowadays those on LAN or even on shared memory multiprocessors 7

Attributes of distributed algorithms IPC Timing model Failure model Problems the algorithms solve – Resource allocation, communication, consensus, database concurrency control, deadlock detection, global snapshots, synchronization, etc. 8

General Style of Work Problems of significance in practical distributed computing identified Abstract versions are defined Algorithms are developed – They are describe precisely and proved to solve the stated problems; their complexity analyzed Impossibility results and lower bounds proved 9

Topics to Cover Synchronous Network Model (Ch. 2-4) – Leader election in a synchronous ring – Breadth-first search – Shortest paths – Min spanning tree – Maximal independent set Asynchronous System Model (Ch. 8-9) – Asynchronous shared memory model 10

Synchronous Network Systems Synchronous Network System as a Graph G = (V, E) where n = |V| M : some fixed alphabet states i start i msgs i trans i

A round = two steps 1.Apply the message-generation function 2.Apply the state-transition function 12

Difference from a traditional automata Accepting states vs halting states 13

Failures Process vs link failures Byzantine failure – A process can generate its next messages and next state in some arbitrary way, without necessarily following the rules specified by its message- generation and state-transition functions.

Inputs and Outputs Adopt a simple convention to encode the inputs and outputs in the states

Executions An execution of the system is an infinite sequence C 0, M 1, N 1, C 1, M 2, N 2, C 3, M 3, N 3, … – C: state assignment – M: message assignment (messages sent) – N: message assignment (messages received)

Proof Methods invariant assertion – A property of the system state that is true in every execution, after every round. – Generally proved by induction on r simulation – A goal to show A “implements” another asynchronous algorithm B, in the sense of producing the same input/ouput behavior. – Generally proved by induction on r

Complexity Measures time complexity communication complexity

Still, how different from an automata? Add a random function to pick new states at each round 19

Now our first problem Leader election in a synchronous ring 20

The Problem Electing a unique leader – In a ring, exactly one process should output the decision that it is the leader. Versions – All non-leaders declare non-leader. – The ring can be unidirectional or bidirectional. – The number of nodes can be known or not. – Processes can have identical identifiers or not. The former = impossibility result for identical processes Thus, usually the processes are assumed to be identical except for the identifier.