Distributed Computing through Combinatorial Topology MITRO207, P4, 2017

Size: px
Start display at page:

Download "Distributed Computing through Combinatorial Topology MITRO207, P4, 2017"

Transcription

1 Distributed Computing through MITRO207, P4, 2017

2 Administrivia Language: (fr)anglais? Lectures: Fridays (28.04, , 30.06), Thursday (29.06), 8:30-11:45, B Web page: MITRO / Homeworks Corrected, not graded Office hours: C213-2, appointments by to Credit = written exams: Midterm: June 2, 2017 (1TH) Final: June 30, 2017 (1TH) Bonus for homeworks, participation, discussion of exercises, bugs found

3 Literature Distributed Computing Through Maurice Herlihy, Dmitry Kozlov, Sergio Rajsbaum Morgan Kaufman, 2013, available online (TPT library Lecture notes on Concurrent Computing. R. Guerraoui, P. Kuznetsov, 2017 (constantly under construction) Distributed Computing: Fundamentals, Simulations and Advanced Topics H. Attiya, J. Welch. (2nd edition). Addison Wesley Distributed Algorithms. N. Lynch. Morgan Kaufmann Publishers

4 (Preliminary) road map The matter and the method of distributed computing Basics of combinatorial topology Colorless tasks Simulations and reductions Generic tasks and manifold computations Renaming and oriented manifolds

5 In the Beginning a computer was just a Turing machine 5

6 Today??? Computing is co-ordination and communication 6

7 Moore s Law and CPU speed 2016 P. Kuznetsov

8 Distributed computations unfold in time! No, distributed computations are static mathematical objects! Operational versus combinatorial approaches Background picture: School of Athens, Rafael 8

9 Road Map Distributed Computing Two Classic Distributed Problems The Muddy Children Coordinated Attack 9

10 Road Map Distributed Computing Two Classic Distributed Problems The Muddy Children Coordinated Attack 10

11 There are Many Models 11

12 There are Many Models Communication? 12

13 There are Many Models Communication? Failures? 13

14 There are Many Models Communication? Failures? Timing? 14

15 Communication Message-Passing 15

16 Communication Message-Passing Read-Write Memory 16

17 Communication Message-Passing Read-Write Memory Black-Box Memory 17

18 Message-Passing Prof. James Moriarty Brown University Providence RI Mr. S. Holmes 221B Baker Street London NW1 6XE 18

19 Read-Write Memory

20 Read-Write Models write & read individual locations write & take memory snapshot Group writes together then takes snapshots together 20

21 Layered Read-Write Memory 21

22 Black Box Memory Compare-and-swap Fetch-and-add 22

23 Failures Crash failures: processes halt How many? Which ones? 23

24 Wait-Free Failure Model All but one may crash 24

25 t-resilient Failure Model At most t may crash Here, t = 1. 25

26 Correlated Failures Processes on same server may crash 26

27 Adversaries Walt Disney 27

28 Adversaries Determine which sets of processes can halt. Walt Disney 28

29 Adversaries Determine which sets of processes can halt. worst-case scenario Walt Disney 29

30 Timing Models 30

31 Timing Models Processes share a clock 31

32 Timing Models Processes share a clock Synchronous 32

33 Timing Models Processes share a clock Synchronous Processes do not share a clock 33

34 Timing Models Processes share a clock Synchronous Processes do not share a clock Asynchronous 34

35 Timing Models Processes share a clock Synchronous Processes do not share a clock Asynchronous Processes have approximatelysynchronized clocks 35

36 Timing Models Processes share a clock Synchronous Processes do not share a clock Asynchronous Processes have approximatelysynchronized clocks Semi-synchronous 36

37 Synchronous 37

38 Synchronous Failures! detection easy 38

39 Asynchronous 39

40 Asynchronous Failures?? detection impossible 40

41 Semi-Synchronous 41

42 Semi-Synchronous Failures! detection slow 42

43 Computation Model Space asynchronous semi-synchronous synchronous wait-free adversaries t-resilient messages read-write black-box Which combinations make sense? 43

44 Multicores Asynchronous Wait-free Shared Memory Sun Microsystems 44

45 Distributed Computing Internet Asynchronous Message-passing Sensor network 45

46 Parallel Computing Synchronous Message-passing (or shared memory) GPU 46

47 Local Views 110 Each process has a 3-bit local view 47

48 Multiple Local Views local views differ by 1 bit 48

49 Multiple Local Views local views differ by 1 bit but no process knows which one 49

50 Multiple Local Views each view is represented by a labeled vertex 50

51 Global States compatible views represented by an edge 51

52 All possible global states

53 Communication Each process sends local view to the other 53

54 Communication Each process sends local view to the other but at most one message may be lost! 54

55 One Communication Round ? ? 55

56 One Communication Round ? ? 1 Lost 56

57 One Communication Round ? ? 1 Lost none Lost 57

58 One Communication Round ? ? 1 Lost none Lost 1 Lost 58

59 One Communication Round 110? ? 59

60 All possible global states after one round unreliable communication 110? ?

61

62 Informally. Unreliable communication does not change topology of global states

63 Reliable Communication? 110? ? 63

64 Reliable Communication?

65

66 Tasks 66

67 32 19 Tasks 21 Possible set of input values 67

68 32 19 Tasks 21 Possible set of input values Finite computation 68

69 32 19 Tasks 21 Possible set of input values Finite computation Possible set of output values

70 Task Inputs Specification Outputs computation Protocol decision

71 Road Map Distributed Computing Two Classic Distributed Problems The Muddy Children Coordinated Attack 71

72 Muddy Children 11:00 72

73 Muddy Children 11:01 73

74 Muddy Children 12:00 At least one of you is dirty! 74

75 Muddy Children 12:00 You may not communicate! 75

76 Muddy Children 12:00 When you realize you are dirty, confess on the hour! 76

77 Muddy Children 1:00 (silence ) 77

78 Muddy Children 2:00 Me! Me! 78

79 Operational Explanation 1:00 79

80 Operational Explanation Others are clean, so I must be dirty. 1:00 80

81 Operational Explanation Others are clean, so I must be dirty. 1:00 Me! 81

82 Operational Explanation 1:01 82

83 Operational Explanation He was quiet, so I must be dirty. 1:01 He was quiet, so I must be dirty. 83

84 Combinatorial Explanation 12:00 84

85 Combinatorial Explanation 12:00 85

86 Combinatorial Explanation 12:00 Each process has its own input 86

87 Combinatorial Explanation 01??11 12:00 Each process has its own input 0?1 87

88 Combinatorial Explanation 01??11 12:00 Global State 0?1 88

89 all clean 11:59 00? 0? 0?00 0?1 01??01?1 0 10? 1? 0?11 1?1 11? all dirty

90 12:01 00? 0? 0?00 0?1 01??01?1 0 10? 1? 0?11 1?1 11? all dirty

91 1:01 0?1 01??01?1 0 10? 1? 0?11 1?1 11? all dirty

92 2:01?11 1?1 11? all dirty

93 Road Map Distributed Computing Two Classic Distributed Problems The Muddy Children Coordinated Attack 93

94 Coordinated Attack Alice Bob Red army wins If both sides attack together 94

95 The Two Generals Alice Bob Red generals send messengers across the valley 95

96 The Two Generals Alice Bob Messengers don t always make it 96

97 Your Mission Design a protocol to ensure that Alice and Bob attack simultaneously 97

98 Theorem There is no protocol that ensures that the Red armies attack simultaneously 98

99 Operational Proof Suppose Bob receives a message at 1:00 saying attack at Dawn. 99

100 Operational Proof Suppose Bob receives a message at 1:00 saying attack at Dawn. Are we done? 100

101 Operational Proof Suppose Bob receives a message at 1:00 saying attack at Dawn. Are we done? No, because Alice doesn t know if Bob got that message 101

102 Operational Proof So Bob sends an acknowledgment to Alice 102

103 Operational Proof So Bob sends an acknowledgment to Alice Are we done? 103

104 Operational Proof So Bob sends an acknowledgment to Alice Are we done? No, because Bob doesn t know if Alice got that message 104

105 Operational Proof So Bob sends an acknowledgment to Alice Are we done? No, because Bob doesn t know if Alice got that message 105

106 Attack at dawn! Attack at noon! Noon Bob is Alice is

107 delivered lost delivered 1:00 PM

108 delivered lost lost delivered 2:00 PM

109 delivered lost delivered protocol graph Attack at dawn! decision map Attack at noon! Don t attack! output graph

110 delivered lost delivered protocol graph These edges go here dawn! output graph noon!

111 This graph is connected

112 This graph is not connected

113 delivered lost delivered Map not allowed to tear protocol complex

114 protocol graph decision map output graph

115 Test and Set TAS(X) tests if X = 1, sets X to 1 if not, and returns the old value of X Instruction available on almost all processors TAS(X): atomic if X == 1 return 1; X = 1; return 0; atomic X = 1? yes no 1 X := 1 2 processes, P and Q, perform TAS(X) What is the protocol complex? 0

116 2-Process Test and Set initial state output 0 output 1 output 1 output 0 protocol graph What if there are 3 processes: P, Q, and R?

117 HW: (Simplified) Peterson s lock: 2 processes bool flag[0] = false; bool flag[1] = false; int turn; P0: P1: flag[0] = true; turn = 1; if(flag[1] and turn==1){ return false // failure } return true // critical section flag[1] = true; turn = 0; if(flag[0] and turn==0) { return false // failure } return true // critical section What is the protocol complex? Can we prove that the two processes cannot be both in the critical section

118 Operational Reasoning 118

119 Combinatorial Reasoning 119

120 Combinatorial Reasoning Model-independent properties 120

121 Combinatorial Reasoning Model-independent properties restricted model-dependent reasoning 121

122 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 (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 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. Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum

Distributed Computing through Combinatorial Topology. Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum Distributed Computing through Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum 1 In the Beginning 1 0 1 1 0 1 0 a computer was just a Turing machine Distributed Computing though 2 Today??? Computing is

More information

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Introduction Companion slides for The by Maurice Herlihy & Nir Shavit Moore s Law Transistor count still rising Clock speed flattening sharply 2 Moore s Law (in practice) 3 Nearly Extinct: the Uniprocesor

More information

Solution: a lock (a/k/a mutex) public: virtual void unlock() =0;

Solution: a lock (a/k/a mutex) public: virtual void unlock() =0; 1 Solution: a lock (a/k/a mutex) class BasicLock { public: virtual void lock() =0; virtual void unlock() =0; ; 2 Using a lock class Counter { public: int get_and_inc() { lock_.lock(); int old = count_;

More information

Arvind Krishnamurthy Fall Collection of individual computing devices/processes that can communicate with each other

Arvind Krishnamurthy Fall Collection of individual computing devices/processes that can communicate with each other Distributed Systems Arvind Krishnamurthy Fall 2003 Concurrent Systems Collection of individual computing devices/processes that can communicate with each other General definition encompasses a wide range

More information

Concurrent Computing

Concurrent Computing Concurrent Computing Introduction SE205, P1, 2017 Administrivia Language: (fr)anglais? Lectures: Fridays (15.09-03.11), 13:30-16:45, Amphi Grenat Web page: https://se205.wp.imt.fr/ Exam: 03.11, 15:15-16:45

More information

Concurrent Skip Lists. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Concurrent Skip Lists. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Skip Lists Companion slides for The by Maurice Herlihy & Nir Shavit Set Object Interface Collection of elements No duplicates Methods add() a new element remove() an element contains() if element

More information

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit. Art of Multiprocessor Programming

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit. Art of Multiprocessor Programming Introduction Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Art of Multiprocessor Programming Moore s Law Transistor count still rising Clock speed flattening

More information

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects

Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Programming Paradigms for Concurrency Lecture 3 Concurrent Objects Based on companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Thomas Wies New York University

More information

Peterson s Algorithm

Peterson s Algorithm Peterson s Algorithm public void lock() { flag[i] = true; victim = i; while (flag[j] && victim == i) {}; } public void unlock() { flag[i] = false; } 24/03/10 Art of Multiprocessor Programming 1 Mutual

More information

Where I was born. Where I studied. Distributed Computing Honors. Distributed Computing. Lorenzo Alvisi. Lorenzo Alvisi Surbhi Goel Benny Renard

Where I was born. Where I studied. Distributed Computing Honors. Distributed Computing. Lorenzo Alvisi. Lorenzo Alvisi Surbhi Goel Benny Renard Distributed Computing Distributed Computing Honors Lorenzo Alvisi Lorenzo Alvisi Surbhi Goel Benny Renard Where I was born Bologna, Italy Surbhi Goel Benny Renard Where I studied Where I studied What is

More information

7. Optimization! Prof. O. Nierstrasz! Lecture notes by Marcus Denker!

7. Optimization! Prof. O. Nierstrasz! Lecture notes by Marcus Denker! 7. Optimization! Prof. O. Nierstrasz! Lecture notes by Marcus Denker! Roadmap > Introduction! > Optimizations in the Back-end! > The Optimizer! > SSA Optimizations! > Advanced Optimizations! 2 Literature!

More information

Lecture 7: Mutual Exclusion 2/16/12. slides adapted from The Art of Multiprocessor Programming, Herlihy and Shavit

Lecture 7: Mutual Exclusion 2/16/12. slides adapted from The Art of Multiprocessor Programming, Herlihy and Shavit Principles of Concurrency and Parallelism Lecture 7: Mutual Exclusion 2/16/12 slides adapted from The Art of Multiprocessor Programming, Herlihy and Shavit Time Absolute, true and mathematical time, of

More information

Part III Synchronization Software and Hardware Solutions

Part III Synchronization Software and Hardware Solutions Part III Synchronization Software and Hardware Solutions Spring 2018 Computers are useless. They can only give answers. 1 Pablo Picasso Software Solutions for Two Processes Suppose we have two processes

More information

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Introduction. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Introduction Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Moore s Law Transistor count still rising Clock speed flattening sharply Art of Multiprocessor Programming

More information

Universality of Consensus. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Universality of Consensus. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Universality of Consensus Companion slides for The by Maurice Herlihy & Nir Shavit Turing Computability 1 0 1 1 0 1 0 A mathematical model of computation Computable = Computable on a T-Machine 2 Shared-Memory

More information

Mutual Exclusion. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Mutual Exclusion. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Mutual Exclusion Companion slides for The by Maurice Herlihy & Nir Shavit Mutual Exclusion Today we will try to formalize our understanding of mutual exclusion We will also use the opportunity to show

More information

(Refer Slide Time 3:31)

(Refer Slide Time 3:31) Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology Madras Lecture - 5 Logic Simplification In the last lecture we talked about logic functions

More information

ECE 4450:427/527 - Computer Networks

ECE 4450:427/527 - Computer Networks ECE 4450:427/527 - Computer Networks Spring 2017 Dr. Nghi Tran Lecture 1: Introduction Dr. Nghi Tran (ECE-University of Akron) ECE 4450:427/527 Computer Networks 1 / 16 Outline 1 Information 2 Broad Overview

More information

6.852: Distributed Algorithms Fall, Class 21

6.852: Distributed Algorithms Fall, Class 21 6.852: Distributed Algorithms Fall, 2009 Class 21 Today s plan Wait-free synchronization. The wait-free consensus hierarchy Universality of consensus Reading: [Herlihy, Wait-free synchronization] (Another

More information

Part II Process Management Chapter 6: Process Synchronization

Part II Process Management Chapter 6: Process Synchronization Part II Process Management Chapter 6: Process Synchronization 1 Process Synchronization Why is synchronization needed? Race Conditions Critical Sections Pure Software Solutions Hardware Support Semaphores

More information

Wait-Free Computability for General Tasks

Wait-Free Computability for General Tasks Wait-Free Computability for General Tasks Companion slides for Distributed Computing Through Combinatorial Topology Maurice Herlihy & Dmitry Kozlov & Sergio Rajsbaum 1 Road Map Inherently colored tasks

More information

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input

Initial Assumptions. Modern Distributed Computing. Network Topology. Initial Input Initial Assumptions Modern Distributed Computing Theory and Applications Ioannis Chatzigiannakis Sapienza University of Rome Lecture 4 Tuesday, March 6, 03 Exercises correspond to problems studied during

More information

Distributed Systems. Fault Tolerance. Paul Krzyzanowski

Distributed Systems. Fault Tolerance. Paul Krzyzanowski Distributed Systems Fault Tolerance Paul Krzyzanowski Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License. Faults Deviation from expected

More information

Spin Locks and Contention. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Spin Locks and Contention. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Spin Locks and Contention Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Real world concurrency Understanding hardware architecture What is contention How to

More information

Pre- and post- CS protocols. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 7. Other requirements for a mutual exclusion algorithm

Pre- and post- CS protocols. CS 361 Concurrent programming Drexel University Fall 2004 Lecture 7. Other requirements for a mutual exclusion algorithm CS 361 Concurrent programming Drexel University Fall 2004 Lecture 7 Bruce Char and Vera Zaychik. All rights reserved by the author. Permission is given to students enrolled in CS361 Fall 2004 to reproduce

More information

ENCE 688R Civil Information Systems

ENCE 688R Civil Information Systems Mark Austin, Department of Civil Engineering, University of Maryland, College Park. Notes from Class Meet the Class: [ 2012 ] [ 2013 ] [ 2016 ] [ 2017 ] Projects: [ 2012 ] [ 2013 ] [ 2016 ] [ 2017 ] GOALS

More information

Parallel Programming

Parallel Programming Parallel Programming 9. Pipeline Parallelism Christoph von Praun praun@acm.org 09-1 (1) Parallel algorithm structure design space Organization by Data (1.1) Geometric Decomposition Organization by Tasks

More information

Intro. to Computer Network. Course Reading. Class Resources. Important Info.

Intro. to Computer Network. Course Reading. Class Resources. Important Info. Intro. to Computer Network Class Resources Wed. 2:20pm-5:20pm, in CSIE 102 Instructor: Cheng-Fu Chou Email:ccf@csie.ntu.edu.tw Office hours: by appointments TAs: Chun-Bo Wang(217): artoo@csie.ntu.edu.tw

More information

Intro. to Computer Network

Intro. to Computer Network Intro. to Computer Network Thu. 9:10am-12:10pm, in CSIE 102 Instructor: Cheng-Fu Chou Email:ccf@csie.ntu.edu.tw Office hours: by appointments TAs: 劉庠宏 : jimmychad[at]gmail.com; R501 沈昱辰 : lawlietdo[at]gmail.com;

More information

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms

DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms DD2451 Parallel and Distributed Computing --- FDD3008 Distributed Algorithms Lecture 4 Consensus, I Mads Dam Autumn/Winter 2011 Slides: Much material due to M. Herlihy and R Wa8enhofer Last Lecture Shared

More information

Coarse-grained and fine-grained locking Niklas Fors

Coarse-grained and fine-grained locking Niklas Fors Coarse-grained and fine-grained locking Niklas Fors 2013-12-05 Slides borrowed from: http://cs.brown.edu/courses/cs176course_information.shtml Art of Multiprocessor Programming 1 Topics discussed Coarse-grained

More information

Spin Locks and Contention. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Spin Locks and Contention. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Spin Locks and Contention Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Focus so far: Correctness and Progress Models Accurate (we never lied to you) But idealized

More information

Programming Paradigms for Concurrency Introduction

Programming Paradigms for Concurrency Introduction Programming Paradigms for Concurrency Introduction Based on companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Thomas Wies New York University Moore

More information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems Web Page http://pdinda.org/ics Syllabus See the web page for more information. Class discussions are on Piazza We will make only minimal use of Canvas (grade reports, perhaps

More information

The University of Iowa. 22c181: Formal Methods in Software Engineering. Spring Course Overview

The University of Iowa. 22c181: Formal Methods in Software Engineering. Spring Course Overview The University of Iowa 22c181: Formal Methods in Software Engineering Spring 2011 Course Overview Copyright 2010-11 Cesare Tinelli. These notes are copyrighted materials and may not be used in other course

More information

Linked Lists: Locking, Lock-Free, and Beyond. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Linked Lists: Locking, Lock-Free, and Beyond. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Linked Lists: Locking, Lock-Free, and Beyond Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Objects Adding threads should not lower throughput Contention

More information

Thread Synchronization: Foundations. Properties. Safety properties. Edsger s perspective. Nothing bad happens

Thread Synchronization: Foundations. Properties. Safety properties. Edsger s perspective. Nothing bad happens Edsger s perspective Testing can only prove the presence of bugs Thread Synchronization: Foundations Properties Property: a predicate that is evaluated over a run of the program (a trace) every message

More information

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora

What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora Administrivia In class midterm in midterms week; Thurs Mar 13 (closed book;? No lab in midterms week; review session instead. What computers

More information

Maximum flow problem CE 377K. March 3, 2015

Maximum flow problem CE 377K. March 3, 2015 Maximum flow problem CE 377K March 3, 2015 Informal evaluation results 2 slow, 16 OK, 2 fast Most unclear topics: max-flow/min-cut, WHAT WILL BE ON THE MIDTERM? Most helpful things: review at start of

More information

Distributed Systems COMP 212. Lecture 1 Othon Michail

Distributed Systems COMP 212. Lecture 1 Othon Michail Distributed Systems COMP 212 Lecture 1 Othon Michail Course Information Lecturer: Othon Michail Office 2.14 Holt Building Module Website: http://csc.liv.ac.uk/~michailo/teaching/comp212 VITAL may be used

More information

Distributed Algorithms

Distributed Algorithms Course Outline With grateful acknowledgement to Christos Karamanolis for much of the material Jeff Magee & Jeff Kramer Models of distributed comuting Synchronous message-assing distributed systems Algorithms

More information

Consensus Problem. Pradipta De

Consensus Problem. Pradipta De Consensus Problem Slides are based on the book chapter from Distributed Computing: Principles, Paradigms and Algorithms (Chapter 14) by Kshemkalyani and Singhal Pradipta De pradipta.de@sunykorea.ac.kr

More information

Distributed Systems COMP 212. Lecture 1 Othon Michail

Distributed Systems COMP 212. Lecture 1 Othon Michail Distributed Systems COMP 212 Lecture 1 Othon Michail Course Information Lecturer: Othon Michail Office 2.14 Holt Building http://csc.liv.ac.uk/~michailo/teaching/comp2 12 Structure 30 Lectures + 10 lab

More information

Shared-Memory Computability

Shared-Memory Computability Shared-Memory Computability 10011 Universal Object Wait-free/Lock-free computable = Threads with methods that solve n- consensus Art of Multiprocessor Programming Copyright Herlihy- Shavit 2007 93 GetAndSet

More information

Principles of Software Construction: Objects, Design, and Concurrency. The Perils of Concurrency Can't live with it. Cant live without it.

Principles of Software Construction: Objects, Design, and Concurrency. The Perils of Concurrency Can't live with it. Cant live without it. Principles of Software Construction: Objects, Design, and Concurrency The Perils of Concurrency Can't live with it. Cant live without it. Spring 2014 Charlie Garrod Christian Kästner School of Computer

More information

The following are just some of the many possible definitions that can be written:

The following are just some of the many possible definitions that can be written: 2.1 Define in your own words the following terms: agent, agent function, agent program, rationality, autonomy, reflex agent, model-based agent, goal-based agent, utility-based agent, learning agent. The

More information

Spin Locks and Contention

Spin Locks and Contention Spin Locks and Contention Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified for Software1 students by Lior Wolf and Mati Shomrat Kinds of Architectures

More information

Charlie Garrod School of Computer Science

Charlie Garrod School of Computer Science Principles of Software Construction: Objects, Design, and Concurrency Distributed System Design, Part 4 Spring 2014 Charlie Garrod Christian Kästner School of Computer Science Administrivia Homework 6,

More information

Parallélisme. Aim of the talk. Decision tasks. Example: consensus

Parallélisme. Aim of the talk. Decision tasks. Example: consensus Parallélisme Aim of the talk Geometry and Distributed Systems Can we implement some functions on some distributed architecture, even if there are some crashes? Eric Goubault Commissariat à l Energie Atomique

More information

Intro. to Computer Network

Intro. to Computer Network Intro. to Computer Network n Wed. 2:20pm-5:20pm, in CSIE 101 n Instructor: Cheng-Fu Chou Email:ccf@csie.ntu.edu.tw Office hours: by appointments n TAs: (506) 晧 : nypgand1@gmail.com : victorsun1221@gmail.com

More information

Homework 5 (by Tupac Shakur) Solutions Due: Monday Dec 3, 11:59pm

Homework 5 (by Tupac Shakur) Solutions Due: Monday Dec 3, 11:59pm CARNEGIE MELLON UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE 15-445/645 DATABASE SYSTEMS (FALL 2018) PROF. ANDY PAVLO Homework 5 (by Tupac Shakur) Solutions Due: Monday Dec 3, 2018 @ 11:59pm IMPORTANT: Upload

More information

Consensus a classic problem. Consensus, impossibility results and Paxos. Distributed Consensus. Asynchronous networks.

Consensus a classic problem. Consensus, impossibility results and Paxos. Distributed Consensus. Asynchronous networks. Consensus, impossibility results and Paxos Ken Birman Consensus a classic problem Consensus abstraction underlies many distributed systems and protocols N processes They start execution with inputs {0,1}

More information

Linked Lists: Locking, Lock- Free, and Beyond. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Linked Lists: Locking, Lock- Free, and Beyond. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Linked Lists: Locking, Lock- Free, and Beyond Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Coarse-Grained Synchronization Each method locks the object Avoid

More information

Exam Distributed Systems

Exam Distributed Systems Exam Distributed Systems 5 February 2010, 9:00am 12:00pm Part 2 Prof. R. Wattenhofer Family Name, First Name:..................................................... ETH Student ID Number:.....................................................

More information

Lecture 21. Lecture 21: Concurrency & Locking

Lecture 21. Lecture 21: Concurrency & Locking Lecture 21 Lecture 21: Concurrency & Locking Lecture 21 Today s Lecture 1. Concurrency, scheduling & anomalies 2. Locking: 2PL, conflict serializability, deadlock detection 2 Lecture 21 > Section 1 1.

More information

THREADS & CONCURRENCY

THREADS & CONCURRENCY 27/04/2018 Sorry for the delay in getting slides for today 2 Another reason for the delay: Yesterday: 63 posts on the course Piazza yesterday. A7: If you received 100 for correctness (perhaps minus a late

More information

Distributed Computing. CS439: Principles of Computer Systems November 19, 2018

Distributed Computing. CS439: Principles of Computer Systems November 19, 2018 Distributed Computing CS439: Principles of Computer Systems November 19, 2018 Bringing It All Together We ve been studying how an OS manages a single CPU system As part of that, it will communicate with

More information

Principles of Software Construction: Objects, Design, and Concurrency

Principles of Software Construction: Objects, Design, and Concurrency Principles of Software Construction: Objects, Design, and Concurrency Distributed System Design, Part 4 MapReduce, continued, plus Transactions and Serializability Fall 2014 Charlie Garrod Jonathan Aldrich

More information

Parallel Programming

Parallel Programming Parallel Programming 7. Data Parallelism Christoph von Praun praun@acm.org 07-1 (1) Parallel algorithm structure design space Organization by Data (1.1) Geometric Decomposition Organization by Tasks (1.3)

More information

Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08

Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08 Homework 2 CS161 Computer Security, Spring 2008 Assigned 2/13/08 Due 2/25/08 1. Signatures and Attacks Recall that to use the ElGamal signature scheme, Alice randomly selects her private signing key x

More information

10/17/2011. Cooperating Processes. Synchronization 1. Example: Producer Consumer (3) Example

10/17/2011. Cooperating Processes. Synchronization 1. Example: Producer Consumer (3) Example Cooperating Processes Synchronization 1 Chapter 6.1 4 processes share something (devices such as terminal, keyboard, mouse, etc., or data structures) and can affect each other non deterministic Not exactly

More information

CS 460/560 Introduction to Computational Robotics Fall 2017, Rutgers University. Course Logistics. Instructor: Jingjin Yu

CS 460/560 Introduction to Computational Robotics Fall 2017, Rutgers University. Course Logistics. Instructor: Jingjin Yu CS 460/560 Introduction to Computational Robotics Fall 2017, Rutgers University Course Logistics Instructor: Jingjin Yu Logistics, etc. General Lectures: Noon-1:20pm Tuesdays and Fridays, SEC 118 Instructor:

More information

BYZANTINE GENERALS BYZANTINE GENERALS (1) A fable: Michał Szychowiak, 2002 Dependability of Distributed Systems (Byzantine agreement)

BYZANTINE GENERALS BYZANTINE GENERALS (1) A fable: Michał Szychowiak, 2002 Dependability of Distributed Systems (Byzantine agreement) BYZANTINE GENERALS (1) BYZANTINE GENERALS A fable: BYZANTINE GENERALS (2) Byzantine Generals Problem: Condition 1: All loyal generals decide upon the same plan of action. Condition 2: A small number of

More information

Transactions. CS 475, Spring 2018 Concurrent & Distributed Systems

Transactions. CS 475, Spring 2018 Concurrent & Distributed Systems Transactions CS 475, Spring 2018 Concurrent & Distributed Systems Review: Transactions boolean transfermoney(person from, Person to, float amount){ if(from.balance >= amount) { from.balance = from.balance

More information

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL:

Notes slides from before lecture. CSE 21, Winter 2017, Section A00. Lecture 9 Notes. Class URL: Notes slides from before lecture CSE 21, Winter 2017, Section A00 Lecture 9 Notes Class URL: http://vlsicad.ucsd.edu/courses/cse21-w17/ Notes slides from before lecture Notes February 8 (1) HW4 is due

More information

Agenda. Cache-Memory Consistency? (1/2) 7/14/2011. New-School Machine Structures (It s a bit more complicated!)

Agenda. Cache-Memory Consistency? (1/2) 7/14/2011. New-School Machine Structures (It s a bit more complicated!) 7/4/ CS 6C: Great Ideas in Computer Architecture (Machine Structures) Caches II Instructor: Michael Greenbaum New-School Machine Structures (It s a bit more complicated!) Parallel Requests Assigned to

More information

VE281 Data Structures and Algorithms. Introduction and Asymptotic Algorithm Analysis

VE281 Data Structures and Algorithms. Introduction and Asymptotic Algorithm Analysis VE281 Data Structures and Algorithms Introduction and Asymptotic Algorithm Analysis Time and Location Time: Tuesday 10:00-11:40 am, Thursday 10:00-11:40 am. Location: Dong Xia Yuan 200 2 Instructor Weikang

More information

CS 564: DATABASE MANAGEMENT SYSTEMS. Spring 2018

CS 564: DATABASE MANAGEMENT SYSTEMS. Spring 2018 CS 564: DATABASE MANAGEMENT SYSTEMS Spring 2018 DATA IS EVERYWHERE! Our world is increasingly data driven scientific discoveries online services (social networks, online retailers) decision making Databases

More information

Midterm Exam Solutions March 7, 2001 CS162 Operating Systems

Midterm Exam Solutions March 7, 2001 CS162 Operating Systems University of California, Berkeley College of Engineering Computer Science Division EECS Spring 2001 Anthony D. Joseph Midterm Exam March 7, 2001 CS162 Operating Systems Your Name: SID AND 162 Login: TA:

More information

Lecture 1: Introduction to distributed Algorithms

Lecture 1: Introduction to distributed Algorithms Distributed Algorithms M.Tech., CSE, 2016 Lecture 1: Introduction to distributed Algorithms Faculty: K.R. Chowdhary : Professor of CS Disclaimer: These notes have not been subjected to the usual scrutiny

More information

Programming Paradigms for Concurrency Lecture 2 - Mutual Exclusion

Programming Paradigms for Concurrency Lecture 2 - Mutual Exclusion Programming Paradigms for Concurrency Lecture 2 - Mutual Exclusion Based on companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Thomas Wies New York University

More information

Concurrent Queues, Monitors, and the ABA problem. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit

Concurrent Queues, Monitors, and the ABA problem. Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Concurrent Queues, Monitors, and the ABA problem Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Queues Often used as buffers between producers and consumers

More information

Introduction to Cryptology ENEE 459E/CMSC 498R. Lecture 1 1/26/2017

Introduction to Cryptology ENEE 459E/CMSC 498R. Lecture 1 1/26/2017 Introduction to Cryptology ENEE 459E/CMSC 498R Lecture 1 1/26/2017 Syllabus Highlights Best way to contact me is via email: danadach@ece.umd.edu My office hours; Thurs 3:00-4:00pm, Friday, 12:00-1pm in

More information

Testing & Verification of Digital Circuits ECE/CS 5745/6745. Hardware Verification using Symbolic Computation

Testing & Verification of Digital Circuits ECE/CS 5745/6745. Hardware Verification using Symbolic Computation Testing & Verification of Digital Circuits ECE/CS 5745/6745 Hardware Verification using Symbolic Computation Instructor: Priyank Kalla (kalla@ece.utah.edu) 3 Credits Mon, Wed 1:25-2:45pm, WEB 2250 Office

More information

Distributed Recursion

Distributed Recursion Distributed Recursion March 2011 Sergio Rajsbaum Instituto de Matemáticas, UNAM joint work with Eli Gafni, UCLA Introduction Though it is a new field, computer science already touches virtually every aspect

More information

In this course, you need to use Pearson etext. Go to "Pearson etext and Video Notes".

In this course, you need to use Pearson etext. Go to Pearson etext and Video Notes. **Disclaimer** This syllabus is to be used as a guideline only. The information provided is a summary of topics to be covered in the class. Information contained in this document such as assignments, grading

More information

CSC 261/461 Database Systems Lecture 24

CSC 261/461 Database Systems Lecture 24 CSC 261/461 Database Systems Lecture 24 Fall 2017 TRANSACTIONS Announcement Poster: You should have sent us the poster by yesterday. If you have not done so, please send us asap. Make sure to send it for

More information

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017

Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 (1/25) MA284 : Discrete Mathematics Week 8: The fundamentals of graph theory; Planar Graphs 25 and 27 October, 2017 1 Definitions 1. A graph 2. Paths and connected graphs 3. Complete graphs 4. Vertex degree

More information

COMP 322: Fundamentals of Parallel Programming

COMP 322: Fundamentals of Parallel Programming COMP 322: Fundamentals of Parallel Programming! Lecture 1: The What and Why of Parallel Programming; Task Creation & Termination (async, finish) Vivek Sarkar Department of Computer Science, Rice University

More information

Consensus. Chapter Two Friends. 2.3 Impossibility of Consensus. 2.2 Consensus 16 CHAPTER 2. CONSENSUS

Consensus. Chapter Two Friends. 2.3 Impossibility of Consensus. 2.2 Consensus 16 CHAPTER 2. CONSENSUS 16 CHAPTER 2. CONSENSUS Agreement All correct nodes decide for the same value. Termination All correct nodes terminate in finite time. Validity The decision value must be the input value of a node. Chapter

More information

EECS 470 Lecture 7. Branches: Address prediction and recovery (And interrupt recovery too.)

EECS 470 Lecture 7. Branches: Address prediction and recovery (And interrupt recovery too.) EECS 470 Lecture 7 Branches: Address prediction and recovery (And interrupt recovery too.) Warning: Crazy times coming Project handout and group formation today Help me to end class 12 minutes early P3

More information

CSC6290: Data Communication and Computer Networks. Hongwei Zhang

CSC6290: Data Communication and Computer Networks. Hongwei Zhang CSC6290: Data Communication and Computer Networks Hongwei Zhang http://www.cs.wayne.edu/~hzhang Objectives of the course Ultimate goal: To help students become deep thinkers in computer networking! Humble

More information

CSE 344 JANUARY 3 RD - INTRODUCTION

CSE 344 JANUARY 3 RD - INTRODUCTION CSE 344 JANUARY 3 RD - INTRODUCTION COURSE FORMAT Lectures Location: SIG 134 Please attend Sections: Content: exercises, tutorials, questions, new materials (occasionally) Locations: see web Please attend

More information

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei

Non-blocking Array-based Algorithms for Stacks and Queues. Niloufar Shafiei Non-blocking Array-based Algorithms for Stacks and Queues Niloufar Shafiei Outline Introduction Concurrent stacks and queues Contributions New algorithms New algorithms using bounded counter values Correctness

More information

6.824 Distributed System Engineering: Spring Quiz I Solutions

6.824 Distributed System Engineering: Spring Quiz I Solutions Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.824 Distributed System Engineering: Spring 2009 Quiz I Solutions All problems are open-ended questions.

More information

CS4021/4521 INTRODUCTION

CS4021/4521 INTRODUCTION CS4021/4521 Advanced Computer Architecture II Prof Jeremy Jones Rm 4.16 top floor South Leinster St (SLS) jones@scss.tcd.ie South Leinster St CS4021/4521 2018 jones@scss.tcd.ie School of Computer Science

More information

Synchronization. Before We Begin. Synchronization. Credit/Debit Problem: Race Condition. CSE 120: Principles of Operating Systems.

Synchronization. Before We Begin. Synchronization. Credit/Debit Problem: Race Condition. CSE 120: Principles of Operating Systems. CSE 120: Principles of Operating Systems Lecture 4 Synchronization January 23, 2006 Prof. Joe Pasquale Department of Computer Science and Engineering University of California, San Diego Before We Begin

More information

Coordination and Agreement

Coordination and Agreement Coordination and Agreement Nicola Dragoni Embedded Systems Engineering DTU Informatics 1. Introduction 2. Distributed Mutual Exclusion 3. Elections 4. Multicast Communication 5. Consensus and related problems

More information

CS 4349 Lecture October 18th, 2017

CS 4349 Lecture October 18th, 2017 CS 4349 Lecture October 18th, 2017 Main topics for #lecture include #minimum_spanning_trees. Prelude Homework 6 due today. Homework 7 due Wednesday, October 25th. Homework 7 has one normal homework problem.

More information

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus

BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus BOSTON UNIVERSITY Metropolitan College MET CS342 Data Structures with Java Dr. V.Shtern (Fall 2011) Course Syllabus 1. Course Objectives Welcome to MET CS342 Data Structures with Java. The intent of this

More information

Cambridge International AS & A Level Computer Science

Cambridge International AS & A Level Computer Science Topic Support Guide Cambridge International AS & A Level Computer Science 9608 For examination from 2017 Topic 3.3.2 Boolean algebra Cambridge International Examinations retains the copyright on all its

More information

Lecture 20 : Trees DRAFT

Lecture 20 : Trees DRAFT CS/Math 240: Introduction to Discrete Mathematics 4/12/2011 Lecture 20 : Trees Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Last time we discussed graphs. Today we continue this discussion,

More information

Subconsensus Tasks: Renaming is Weaker than Set Agreement

Subconsensus Tasks: Renaming is Weaker than Set Agreement Subconsensus Tasks: enaming is Weaker than Set Agreement Eli Gafni 1, Sergio ajsbaum 2, and Maurice Herlihy 3 1 Computer Science Department UCLA Los Angles, CA 90095 eli@cs.ucla.edu 2 Instituto de Matemáticas,

More information

Exercise 12: Commit Protocols and Replication

Exercise 12: Commit Protocols and Replication Data Modelling and Databases (DMDB) ETH Zurich Spring Semester 2017 Systems Group Lecturer(s): Gustavo Alonso, Ce Zhang Date: May 22, 2017 Assistant(s): Claude Barthels, Eleftherios Sidirourgos, Eliza

More information

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit) CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2003 Lecture 21: Network Protocols (and 2 Phase Commit) 21.0 Main Point Protocol: agreement between two parties as to

More information

Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 24

Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 24 Assume encryption and decryption use the same key. Will discuss how to distribute key to all parties later Symmetric ciphers unusable for authentication of sender Lecturers: Mark D. Ryan and David Galindo.

More information

Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors. Michel Raynal, Julien Stainer

Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors. Michel Raynal, Julien Stainer Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors Michel Raynal, Julien Stainer Synchrony Weakened by Message Adversaries vs Asynchrony Enriched with Failure Detectors

More information

CSC 261/461 Database Systems Lecture 21 and 22. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101

CSC 261/461 Database Systems Lecture 21 and 22. Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 CSC 261/461 Database Systems Lecture 21 and 22 Spring 2017 MW 3:25 pm 4:40 pm January 18 May 3 Dewey 1101 Announcements Project 3 (MongoDB): Due on: 04/12 Work on Term Project and Project 1 The last (mini)

More information

Consensus, impossibility results and Paxos. Ken Birman

Consensus, impossibility results and Paxos. Ken Birman Consensus, impossibility results and Paxos Ken Birman Consensus a classic problem Consensus abstraction underlies many distributed systems and protocols N processes They start execution with inputs {0,1}

More information

CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing

CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing CSCI-1200 Data Structures Fall 2009 Lecture 25 Concurrency & Asynchronous Computing Final Exam General Information The final exam will be held Monday, Dec 21st, 2009, 11:30am-2:30pm, DCC 308. A makeup

More information