Simulations and Reductions

Slides:



Advertisements
Similar presentations
Multicore Programming Skip list Tutorial 10 CS Spring 2010.
Advertisements

The Contest between Simplicity and Efficiency in Asynchronous Byzantine Agreement Allison Lewko The University of Texas at Austin TexPoint fonts used in.
Topology in Distributed Computing: A Primer 1 / 16 Sergey Velder SPbSU ITMO.
The State Transition Diagram
7. Optimization Prof. O. Nierstrasz Lecture notes by Marcus Denker.
Introduction Companion slides for
Introduction to Software Engineering 7. Modeling Behaviour.
The Branching Storyboard Chapter 4.3 in Sketching the User Interface: The Workbook Image from:
©2013 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Byzantine Generals Problem: Solution using signed messages.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
12. Summary, Trends, Research. © O. Nierstrasz PS — Summary, Trends, Research Roadmap  Summary: —Trends in programming paradigms  Research:...
Shared Counters and Parallelism Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Sergio Rajsbaum 2006 Lecture 3 Introduction to Principles of Distributed Computing Sergio Rajsbaum Math Institute UNAM, Mexico.
ESE Einführung in Software Engineering X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
7. Fixed Points. © O. Nierstrasz PS — Fixed Points 7.2 Roadmap  Representing Numbers  Recursion and the Fixed-Point Combinator  The typed lambda calculus.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
CP — Concurrent Programming X. CHAPTER Prof. O. Nierstrasz Wintersemester 2005 / 2006.
1 Principles of Reliable Distributed Systems Recitation 7 Byz. Consensus without Authentication ◊S-based Consensus Spring 2008 Alex Shraer.
12. eToys. © O. Nierstrasz PS — eToys 12.2 Denotational Semantics Overview:  … References:  …
SWOT Analysis Strengths Weaknesses SWOT Opportunities Threats.
Two-Process Systems TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.
Multicore Programming
Manifold Protocols TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A AA Companion slides for Distributed Computing.
© Copyright Showeet.com I NSERT YOUR TITLE HERE. © Copyright Showeet.com Insert Your Title Here 2 Master text styles –Second level Third level –Fourth.
The Animated Sequence Chapter 5.1 in Sketching User Experiences: The Workbook.
©2013 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
CS294, Yelick Consensus revisited, p1 CS Consensus Revisited
State of the Ward in 2007 Version 1.0 A Fifth Sunday Lesson Given in the Sterling Park Ward, Ashburn, VA Stake by D. Calvin Andrus, Bishop
Design of Everyday Things Part 2: Useful Designs? Lecture /slide deck produced by Saul Greenberg, University of Calgary, Canada Images from:
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.
Multiprocessor Architecture Basics Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
The Narrative Storyboard Chapter 4.4 in Sketching User Experiences: The Workbook.
© 2014 Core Knowledge Foundation. This work is licensed under a Creative Commons Attribution- NonCommercial-ShareAlike 3.0 Unported License.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Images of pesticides By: Leslie London, University of Cape Town This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5.
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
The Relative Power of Synchronization Operations Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists.
1 Licence This presentation document is one used by Ryan Cartwright of Equitas IT Solutions [1] and is Copyright © 2008 Ryan P. Cartwright / Equitas IT.
Sketching Vocabulary Chapter 3.4 in Sketching User Experiences: The Workbook Drawing objects, people, and their activities.
The consensus problem in distributed systems
CSE 486/586 Distributed Systems Leader Election
Agenda Video pre-presentations Digital sketches & photo traces
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Morning Reflections / Today’s objectives
Colorless Wait-Free Computation
Algebraic Topology and Distributed Computing part two
Byzantine-Resilient Colorless Computaton
Pre and post workshop assessments
Algebraic Topology and Distributed Computing
Elements of Combinatorial Topology
Solvability of Colorless Tasks in Different Models
FOTW Worksheet Slides Christopher Penn, Financial Aid Podcast Student Loan Network.
Wait-Free Computability for General Tasks
Implementing Consistency -- Paxos
Agreement Protocols CS60002: Distributed Systems
Algebraic Topology and Decidability in Distributed Computing
Renaming and Oriented Manifolds
Combinatorial Topology and Distributed Computing
Rodolfo Conde Joint work with Sergio Rajsbaum Instituto de Matemáticas
CSE 486/586 Distributed Systems Leader Election
Algebraic Topology and Distributed Computing part three
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Combinatorial Topology and Distributed Computing
Implementing Consistency -- Paxos
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Simulations and Reductions Companion slides for Distributed Computing Through Combinatorial Topology Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAA 1

Reduction in Complexity Theory SAT is NP-Complete Hard to prove CLIQUE reduces to SAT Much easier to prove Therefore CLIQUE is NP-Complete Reduction is powerful 29-Nov-18

Reduction in Distributed Computing Task T impossible for n+1 asynchronous processes if any t can fail Easy to prove only if n = t t+1 processes can “simulate” n+1 processes where any t can fail [Borowsky Gafni] Therefore task T impossible for n+1 asynchronous processes if any t can fail Reduction still powerful? 29-Nov-18

Observations Reduction often easier than proof from first principles Existence of reduction is important … How reduction works? Not so much. 29-Nov-18

Limitations Actual reductions often complex, ad-hoc model-specific arguments Clever but complex What does it mean for one model to “simulate” another? Specific examples only 29-Nov-18

Goal Define when one model of computation “simulates” another Covers many cases, not all. Technique to prove when a simulation exists No need for explicit construction Strong enough to support reduction 29-Nov-18

Task Specification Output complex Input complex Task Specification 29-Nov-18

How a Protocol Solves a Task Protocol complex Protocol operator Decision map 29-Nov-18

A Simulation Simulation map One protocol Another protocol 29-Nov-18

A Reduction The Diagram commutes 29-Nov-18

Summary 29-Nov-18

Strategy Show that simulation maps exist Construct simulation map explicitly Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology N&S Conditions In each model … (I,O,¢) has a protocol iff … f: |skelt I|  |O| carried by ¢. for model-specific t Distributed Computing through Combinatorial Topology

Models that Solve the Same Colorless Tasks processes fault-tolerance model t+1 wait-free layered IS n+1 t-resilient (t+1)-set layered IS t-resilient, 2t<n+1 message-passing A-resilient, min core t+1 layered IS adversary t-resilient n+1 > (dim I +2)t Byzantine Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Some Implications (t+1)-process wait-free can simulate an (n+1)-process wait-free, and vice-versa If 2t > n+1, (n+1)-process t-resilient message-passing can simulate IS, and vice-versa. Any adversary can simulate any other adversary whose minimum core size is the same or larger. An adversary with minimum core size k can simulate a wait-free k-set layered IS. t-resilient Byzantine can simulate t-resilient layered IS if n + 1 > (dim(I) + 2)t. Distributed Computing through Combinatorial Topology

BG Simulation Borowsky-Gafni Explicit construction n+1 processes, adversary A simulate m+1 processes, adversary A’ where A, A’ have same min core size Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Safe Agreement Validity all processes that decide, decide some process's input. Agreement all processes that decide, decide the same value we do not require termination! Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose-Resolve propose(v) called once when joining protocol resolve() may be called multiple times returns v if protocol resolved returns ? if protocol still unresolved Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose level announce ? ? ? n+1 ? ? Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose: Unsafe Zone level announce ? announce value with level 1 1 v ? ? ? Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose: Unsafe Zone level announce ? 1 v take snapshot ? ? ? Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose: Safe Zone level announce ? v if someone has 2, back off to level 0 ? 2 w ? Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Propose: Safe Zone level announce ? if no one has 2, move to level 2 2 v ? 1 w ? Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology Resolve level announce ? 2 v ? 1 w ? if anyone has 1, return ? Distributed Computing through Combinatorial Topology

Resolve level announce return value at least index with 2 ? 2 v ? 2 w ? 2 v ? 2 w ? return value at least index with 2 Distributed Computing through Combinatorial Topology

Propose method propose(input: value) announce[i] := input level[i] := 1 snap = snapshot(level) if (9 j | level[j] = 2) then level[i] := 0 else level[i] := 2 29-Nov-18

Resolve method resolve(): value snap = snapshot(level) if (9 j | level[j] = 1) then return ? else return announce[j] for min {j : level[j] = 2} 29-Nov-18

Distributed Computing through Combinatorial Topology What it does if no one halts in unsafe region (level 1) … then all resolve same input if someone halts in unsafe region … never resolves Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology BG Simulation There are t+1 processes … who do a wait-free simulation of a t-resilient (n+1)-process protocol transforms between t-resilient and wait-free Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology BG Simulation Use safe agreement … to agree on simulated snapshots Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology BG Simulation Each simulating process participates in… multiple simultaneous safe agreements Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology BG Simulation If one process fails in unsafe region … it blocks one simulated snapshot … one simulated crash Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology BG Simulation If t out of t+1 halt in unsafe region … simulates t out of n+1 failures … remaining process simulates n+1-t survivors Distributed Computing through Combinatorial Topology

BG Simulation Code shared mem: array[0..R][0..m] of value shared agree: array[0..R][0..m] of SafeAgree local pc: array[0..m] of int := {0,...,0} 29-Nov-18

BG Simulation Code shared simulated R £ m memory shared mem: array[0..R][0..m] of value shared agree: array[0..R][0..m] of SafeAgree local pc: array[0..m] of int := {0,...,0} shared simulated R £ m memory 29-Nov-18

BG Simulation Code shared safe agreement object shared mem: array[0..R][0..m] of value shared agree: array[0..R][0..m] of SafeAgree local pc: array[0..m] of int := {0,...,0} shared safe agreement object one per memory location 29-Nov-18

one per simulated process BG Simulation Code shared mem: array[0..R][0..m] of value shared agree: array[0..R][0..m] of SafeAgree local pc: array[0..m] of int := {0,...,0} program counters, one per simulated process 29-Nov-18

BG Simulation Code input value ! final state method run(input: value): state for j := 0 to m do agree[0][j].propose(input) input value ! final state set as many inputs as possible to mine (OK because colorless tasks) 29-Nov-18

BG Simulation Code simulate Qj program counter do forever for j := 0 to m do r := pc[j] v := agree[r][j].resolve() … program counter agree on prior round’s snapshot 29-Nov-18

BG Simulation Code if snapshot resolved … write snapshot to memory do forever … if v  ? then mem[r][j] := v if pc[j] = R then return v if snapshot resolved … write snapshot to memory if simulated state is final, return it 29-Nov-18

BG Simulation Code if survivor set reached this round… take a snapshot do forever … if survivor set present then view := values in snapshot(mem[r]) agree[r+1][j].propose(view) pc[j] := pc[j] + 1 take a snapshot propose snapshot to write for next round advance program counter 29-Nov-18

Two Styles of Colorless Simulation Combinatorial: simulation map exists Operational: construct simulation explicitly Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology The Simulation Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology           This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. You are free: to Share — to copy, distribute and transmit the work to Remix — to adapt the work Under the following conditions: Attribution. You must attribute the work to “Distributed Computing through Combinatorial Topology” (but not in any way that suggests that the authors endorse you or your use of the work). Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under the same, similar or a compatible license. For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to http://creativecommons.org/licenses/by-sa/3.0/. Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this license impairs or restricts the author's moral rights. Distributed Computing through Combinatorial Topology

Distributed Computing through Combinatorial Topology