Apr. 2012Byzantine GeneralsSlide 1 Byzantine Generals A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.

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

Byzantine Generals. Outline r Byzantine generals problem.
Agreement: Byzantine Generals UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau Paper: “The.
Apr. 2007SatisfiabilitySlide 1 Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Teaser - Introduction to Distributed Computing
? What is Computer Science and what can you do with it.
The Byzantine Generals Problem Boon Thau Loo CS294-4.
Prepared by Ilya Kolchinsky.  n generals, communicating through messengers  some of the generals (up to m) might be traitors  all loyal generals should.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
Byzantine Generals Problem: Solution using signed messages.
 Two armies are camped on the outskirts of either side of an enemy city.
Byzantine Generals Problem Anthony Soo Kaim Ryan Chu Stephen Wu.
May 2015Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
HandoutJune 2007Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2007Task SchedulingSlide 1 Task Scheduling A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Apr. 2015SatisfiabilitySlide 1 Satisfiability A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
June 2007Malfunction DiagnosisSlide 1 Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Dec. 2006Agreement and AdjudicationSlide 1 Fault-Tolerant Computing Software Design Methods.
Copyright 2006 Koren & Krishna ECE655/ByzGen.1 UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering Fault Tolerant Computing ECE 655.
Systems of Distributed Systems Module 2 -Distributed algorithms Teaching unit 3 – Advanced algorithms Ernesto Damiani University of Bozen Lesson 6 – Two.
Apr. 2007Placement and RoutingSlide 1 Placement and Routing A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Mar. 2015Easy, Hard, Impossible!Slide 1 Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series: Puzzling Problems in Computer Engineering.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 15 Wenbing Zhao Department of Electrical and Computer Engineering.
A Look at Byzantine Generals Problem R J Walters.
Nov. 2004Math and ElectionsSlide 1 Math and Elections A Lesson in the “Math + Fun!” Series.
HandoutMay 2007Byzantine Generals A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
The Island of Liars and Truth-Tellers
Last Class: Weak Consistency
Jan. 2005Logical ReasoningSlide 1 Logical Reasoning A Lesson in the “Math + Fun!” Series.
Apr. 2007Easy, Hard, Impossible!Slide 1 Easy, Hard, Impossible! A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Synchronization in Distributed Systems CS-4513 D-term Synchronization in Distributed Systems CS-4513 Distributed Computing Systems (Slides include.
May 2007Binary SearchSlide 1 Binary Search A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
May 2012Malfunction DiagnosisSlide 1 Malfunction Diagnosis A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
1 More on Distributed Coordination. 2 Who’s in charge? Let’s have an Election. Many algorithms require a coordinator. What happens when the coordinator.
May 2007String MatchingSlide 1 String Matching A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
Nov. 2007Agreement and AdjudicationSlide 1 Fault-Tolerant Computing Software Design Methods.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Logical Puzzles Truth and Lies. The Island of Rilas On the island of Rilas there are just two types of people: knights and knaves Knights always tell.
The Marriage Problem Finding an Optimal Stopping Procedure.
Distributed Consensus Reaching agreement is a fundamental problem in distributed computing. Some examples are Leader election / Mutual Exclusion Commit.
Distributed Algorithms – 2g1513 Lecture 9 – by Ali Ghodsi Fault-Tolerance in Distributed Systems.
Ch11 Distributed Agreement. Outline Distributed Agreement Adversaries Byzantine Agreement Impossibility of Consensus Randomized Distributed Agreement.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT AGREEMENT Prof Philippas Tsigas Distributed Computing and Systems Research Group.
1 Chapter 12 Consensus ( Fault Tolerance). 2 Reliable Systems Distributed processing creates faster systems by exploiting parallelism but also improve.
CS 425/ECE 428/CSE424 Distributed Systems (Fall 2009) Lecture 9 Consensus I Section Klara Nahrstedt.
CSE 486/586 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
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
May 2015Sorting NetworksSlide 1 Sorting Networks A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
PROCESS RESILIENCE By Ravalika Pola. outline: Process Resilience  Design Issues  Failure Masking and Replication  Agreement in Faulty Systems  Failure.
Randomized Algorithms for Distributed Agreement Problems Peter Robinson.
May 2007Sorting NetworksSlide 1 Sorting Networks A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Byzantine Fault Tolerance Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
reaching agreement in the presence of faults
Coordination and Agreement
COMP28112 – Lecture 14 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 13-Oct-18 COMP28112.
Satisfiability A Lecture in CE Freshman Seminar Series:
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
COMP28112 – Lecture 13 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 19-Nov-18 COMP28112.
Distributed Consensus
Consensus in Synchronous Systems: Byzantine Generals Problem
COMP28112 – Lecture 13 Byzantine fault tolerance: dealing with arbitrary failures The Byzantine Generals’ problem (Byzantine Agreement) 22-Feb-19 COMP28112.
Malfunction Diagnosis
Byzantine Generals A Lecture in CE Freshman Seminar Series:
Binary Search A Lecture in CE Freshman Seminar Series:
Byzantine Generals Problem
CSE 486/586 Distributed Systems Byzantine Fault Tolerance
Presentation transcript:

Apr. 2012Byzantine GeneralsSlide 1 Byzantine Generals A Lecture in CE Freshman Seminar Series: Ten Puzzling Problems in Computer Engineering

Apr. 2012Byzantine GeneralsSlide 2 About This Presentation This presentation belongs to the lecture series entitled “Ten Puzzling Problems in Computer Engineering,” devised for a ten-week, one-unit, freshman seminar course by Behrooz Parhami, Professor of Computer Engineering at University of California, Santa Barbara. The material can be used freely in teaching and other educational settings. Unauthorized uses, including any use for financial gain, are prohibited. © Behrooz Parhami EditionReleasedRevised First May 2007Apr. 2008Apr. 2009Apr. 2010Apr Apr. 2012

Byzantine GeneralsSlide 3 Reminder on ECE 1’s Theme and Direction A puzzling problem:  looks deceptively simple, but...  appears very difficult, or even impossible, but is readily tamed with the appropriate insight Each lecture starts with puzzles that we try to solve together I introduce you to CE problems that are related to the puzzles Many engineering problems are puzzle-like (especially in CE) Topics thus far: Easy, Hard, Impossible (Collatz conjecture) Placement and Routing (houses & utilities) Satisfiability (making change) Cryptography (secret message) Byzantine Generals (liars and truth-tellers) Topics for the 2 nd half: Binary Search (counterfeit coin) Task Scheduling (Sudoku) String Matching (word search) Sorting Networks (rearranging trains) Malfunction Diagnosis (logical reasoning)

Apr. 2012Byzantine GeneralsSlide 4 Do you realize how dead you will be if she realizes this is your weekly “bar meeting”?

Apr. 2012Byzantine GeneralsSlide 5 The Island of Liars and Truth-Tellers You meet a woman on the island. What single (yes/no) question can you ask her to determine whether she is a liar or a truth-teller? Setting for puzzles in the next few slides: You are on an island populated by two tribes. Members of one tribe consistently lie. Members of the other tribe always tell the truth. Tribe members can recognize one another, but you can’t tell them apart. You run into a man on the island and ask him whether he is a truth-teller. A blaring siren prevents you from hearing his answer. You inquire, “Sorry, did you say you’re a truth-teller?” He responds: “No, I did not.” To which tribe does the man belong? If I asked you whether you were a liar, what would your answer be? He is a liar

Apr. 2012Byzantine GeneralsSlide 6 Meeting Two People on the Island You meet two people A and B on the island. A says, “Both of us are from the liars tribe.” Which tribe is A from? What about B? A: Liar, B: TT D: Liar You meet two people, C and D on the island. C says, “Exactly one of us is from the liars tribe.” Which tribe is D from? You meet two people E and F on the island. E says, “It is not the case that both of us are from the truth-tellers tribe.” Which tribe is E from? What about F? E: TT, F: Liar You meet two people, G and H on the island. Each of the two makes a statement. Which tribes are G and H from? G says: “We are from different tribes.” H says: “G is from the liars tribe.” G: TT, H: Liar

Apr. 2012Byzantine GeneralsSlide 7 Meeting Three People on the Island You meet three people A, B, C. You ask A, “How many among you are truth-tellers?” You don’t hear her answer, so you ask B, “What did she just say?” “She said one,” he replies. Then C adds, “Don’t believe him, he is lying!” What can you say about B’s or C’s tribe? A LiarTT B LiarTT B LiarTT C LiarTT C LiarTT C LiarTT C LiarTT Answer: B is a liar, C is a truth teller Solution by exhaustive search

Apr. 2012Byzantine GeneralsSlide 8 More Examples and a Variation Truth-tellers and nay-sayers: You are allowed only yes/no questions. One group of people answer truthfully and the other always answer “no” How can you tell a truth-teller apart from a nay-sayer? Is it possible to ask the exact same question twice of a truth-teller and get two different answers? Yes, just use any question whose answer is time-dependent Or say, “Did I just ask you a question for the second time?” Twelve politicians from the island go to a city hall meeting. The 1st one says: “Not a single person in this room tells the truth.” The 2nd one says: “No more than one person in this room tells the truth.” The 3rd one says: “No more than two people in this room tell the truth.”... The 12th one says: “No more than 11 people in this room tell the truth.” What can you say about the composition of this group of politicians?

Apr. 2012Byzantine GeneralsSlide 9 Other Interesting Variations Liars who lie selectively; for example, in answer to every other question or on certain days of the week Inhabitants of another island lie consistently on Tuesdays, Thursdays, and Saturdays, and they tell the truth on the other four days of the week. You have forgotten what day of the week it is, so you ask a passerby. “Saturday,” he answers. “And what day will it be tomorrow?” you inquire. “Wednesday,” he replies. Can you tell what day it is today? MTuWThFSuSa Today cannot be M, W, F, Sa, or Su. So it is: Tu or Th Tomorrow cannot be M, F, or Su. So it is: T, W, Th, or Sa

Apr. 2012Byzantine GeneralsSlide 10 Liars, Randoms, and Truth-Tellers Setting for more complex puzzles: You are on an island populated by three tribes. Members of one tribe always tell the truth. Members of the second tribe choose to tell the truth or lie, completely at random. Members of the third tribe consistently lie. Tribe members can recognize one another, but you can’t tell them apart. Additional hint: Ask the leftmost person whether letters corresponding to the other two appear in alphabetical order. Then, regardless of the answer, you will have one position which excludes a random person. Hint : There are 6 possibilities for P1, P2, P3: LRT, LTR, RLT, RTL, TLR, TRL Three people from the island, one representing each tribe, come to visit. How can you identify who is from which tribe by asking only three yes/no questions? Each question must be directed at only one person, but you can ask the same person multiple questions. P1P2P3

Apr. 2012Byzantine GeneralsSlide 11 The Two Generals’ Paradox Troops led by two generals are camped on the outskirts of an enemy city The generals can only communicate via messengers who must travel through enemy territory and are thus subject to delays or capture The two generals have previously agreed on a plan of attack, but they must communicate to set up the attack time G2G1 Not attacking together has dire results G1 decides to send the message, “Let’s attack at noon tomorrow” G1 will not attack before getting an acknowledgment from G2 G2 will not attack before making sure that his acknowledgment was received by G1 (because he knows G1 would not attack otherwise), so he waits for an acknowledgment of his acknowledgment ATM: dispense cash Database: reduce balance Unreliable commun.

Apr. 2012Byzantine GeneralsSlide 12 Liars, Randoms, and Truth-Tellers Stand for... Crashed: Does not respond to any message Permanently failed: May respond identically to every message Permanently failed: May give the wrong response consistently Arbitrarily failed: May give an unpredictable response Maliciously failed: Gives a response that is calculated to do the maximum harm (adversary, worst-case failure) Healthy: Gives the appropriate response to every message Truth-teller Quiet Random Byzantine Nay-sayer Liar Site status … Sites communicating with one another to reach an agreement (e.g., to select a coordinating site, often called “leader”)

Apr. 2012Byzantine GeneralsSlide 13 The Byzantine Generals Problem A general and n – 1 lieutenant generals lead n divisions of the Byzantine army camped on the outskirts of an enemy city The n divisions can only communicate via messengers, who may be captured or arbitrarily delayed (due to the need to hide for a while) We seek a scheme for the generals to agree on a common plan of action (attack or retreat), even if some of the generals are traitors who will do anything to prevent loyal generals from reaching agreement The problem is nontrivial even if messengers are totally reliable With unreliable messengers, the problem becomes very complex G L2 L1

Apr. 2012Byzantine GeneralsSlide 14 G L3 L1 aa Traitor L2 a a aa ? a ? Byzantine Generals with Reliable Messengers “He said retreat” G L2 L1 “Attack” Traitor G L2 L1 “Attack” “Retreat” “He said retreat” Traitor G L3 L1 ac Traitor L2 b b ba c a c With f Byzantine failures,  3f + 1 nodes needed to reach agreement

Apr. 2012Byzantine GeneralsSlide 15 3f + 1 Generals Needed with f Traitors Traitor Loyal By exchanging messages in multiple rounds, the 2f + 1 loyal generals can eventually reach a common plan of action which matches the order of the commanding general, provided the latter is loyal Some deem Byzantine faults very unlikely and not worth considering In “The Real Byzantine Generals,” the authors show why Byzantine faults are real and must be treated in both hardware and software 50  52  35 = 91,000 “If a designer spent 50 hours per week, 52 weeks per year, for 35 years staring at one system, that would be less than 10 5 hours... far short of typical avionics requirements.”

Apr. 2012Byzantine GeneralsSlide 16 Without Malicious Faults, Voting Will Do Centralized voting with majority rule Data fusion: Obtaining dependable results from potentially incorrect, inaccurate, or incomplete data Fuser y n yy y n n y Majority opinion Approximate voting with imprecise inputs: E.g., temperature readings of 78.2, 45.5, 79.1, 78.7, 21.2, 120.0, Mean of reasonable inputs Median of all inputs78.2 Distributed voting: Same concept, provided erroneous values are seen identically by the fusion processes at all sites

Apr. 2012Byzantine GeneralsSlide 17 Voting Comes in Many Flavors Example: What time is it? Seven students write the exact time (hour and minute) on sticky notes Sort the sticky notes on the board Pick one of the following values: Fuser x1x1 x2x2 x3x3 x4x4 x7x7 x6x6 x5x5 x Derived opinion Majority, if a majority exists Plurality, if a plurality exists Median of all the values proposed Mean of all the values proposed Mean of five values, after removing the largest and smallest of the seven Mean of three values, after removing the 2 largest and 2 smallest values Interval voting: Each proposer supplies a range of values that is guaranteed to hold the correct value

Apr. 2012Byzantine GeneralsSlide 18 Mathematics of Voting Voting studied in several fields: Mathematics / Computing Political science Sociology (social choice theory) Economics Fuser x1x1 x2x2 x3x3 x4x4 x7x7 x6x6 x5x5 x Derived opinion No voting scheme is totally fool-proof Regular voting: Candidates A1, A2, B More qualified candidates A1 and A2 may split the votes, leading to the election of B (run-off helps in solving this problem, but creates others) Approval voting Vote for any number of candidates you like Borda voting comes pretty close to an ideal voting scheme Each participant ranks all candidates; tally votes by giving n points to each 1st-place choice, n – 1 points for 2nd place,..., 1 point for nth place

Apr. 2012Byzantine GeneralsSlide 19 With Signed Messages, Agreement is Easy G L2 L1 “Attack: G” Traitor G L2 L1 “Attack: G” “Retreat: G” “Retreat: G: L2” Traitor G L2 L1 “Attack: G” Traitor “Attack: G: L2” Traitor“Attack: G: L2” “Nonsense: L2” L2 may take two actions – Forward the signed message: This leads to correct outcome Send a different fake message that is recognized by L1 as fake (loyal generals ignore messages coming from known traitors) Signature of G