Outline Theoretical Foundations - continued Lab 1

Slides:



Advertisements
Similar presentations
Distributed Snapshots: Determining Global States of Distributed Systems - K. Mani Chandy and Leslie Lamport.
Advertisements

Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
1 Global State $500$200 A B C1: Empty C2: Empty Global State 1 $450$200 A B C1: Tx $50 C2: Empty Global State 2 $450$250 A B C1: Empty C2: Empty Global.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Theoretical Aspects Logical Clocks Causal Ordering
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.
CS 582 / CMPE 481 Distributed Systems
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
Slides for Chapter 10: Time and Global State
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
Ordering and Consistent Cuts Presented by Chi H. Ho.
EEC-681/781 Distributed Computing Systems Lecture 11 Wenbing Zhao Cleveland State University.
1 Distributed Process Management: Distributed Global States and Distributed Mutual Exclusion.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
Chapter 17 Theoretical Issues in Distributed Systems
Chapter 5.
CIS 720 Distributed algorithms. “Paint on the forehead” problem Each of you can see other’s forehead but not your own. I announce “some of you have paint.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
1 Consistent Global States of Distributed Systems: Fundamental Concepts and Mechanisms Author: Ozalp Babaoglu and Keith Marzullo Distributed Systems: 526.
“Virtual Time and Global States of Distributed Systems”
Distributed Systems Fall 2010 Logical time, global states, and debugging.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
CIS825 Lecture 2. Model Processors Communication medium.
D ISTRIBUTED S YSTEM UNIT-2 Theoretical Foundation for Distributed Systems Prepared By: G.S.Mishra.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
CS533 Concepts of Operating Systems Class 8 Time, Clocks, and the Ordering of Events in a Distributed System By Constantia Tryman.
11-Jun-16CSE 542: Operating Systems1 Distributed systems Time, clocks, and the ordering of events in a distributed system Leslie Lamport. Communications.
Distributed Systems Lecture 6 Global states and snapshots 1.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Global state and snapshot
Time, Clocks, and Global State Part-2
Global State Recording
Global state and snapshot
Theoretical Foundations
Overview of Ordering and Logical Time
COT 5611 Operating Systems Design Principles Spring 2012
Global State Recording
Distributed Systems CS
Outline Communication Primitives - continued Theoretical Foundations
Outline Theoretical Foundations - continued Vector clocks - review
Outline Announcement Existing distributed systems Final Review
Outline Announcement Midterm Review
湖南大学-信息科学与工程学院-计算机与科学系
Logical Clocks and Casual Ordering
Time And Global Clocks CMPT 431.
Outline Distributed Mutual Exclusion Introduction Performance measures
Event Ordering.
Outline Theoretical Foundations
CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
Distributed Systems CS
Chapter 5 (through section 5.4)
Slides for Chapter 11: Time and Global State
Lecture 8 Processes and events Local and global states Time
Outline Theoretical Foundations - continued
ITEC452 Distributed Computing Lecture 8 Distributed Snapshot
Distributed Systems CS
Jenhui Chen Office number:
Distributed algorithms
CIS825 Lecture 5 1.
Slides for Chapter 14: Time and Global States
CSE 542: Operating Systems
COT 5611 Operating Systems Design Principles Spring 2014
Outline Theoretical Foundations
Distributed Snapshot.
Presentation transcript:

Outline Theoretical Foundations - continued Lab 1 Lamport’s algorithm for distributed mutual exclusion Casual ordering of messages – continued Global state Cuts Termination detection 1/3/2019 COP5611

Regarding Lab 1 For this project, you can work as a team with at most two members per team Each team only needs to turn in one report However, all the members are required to understand all the parts as you may be tested on the midterm or the final exam Three processes Bank Account Server Bank Office Clients Bank Office Mutual Exclusion Processes 1/3/2019 COP5611

Lamport’s Clock Implementation rules [IR1] Clock Ci is incremented between any two successive events in process Pi Ci := Ci + d ( d > 0) [IR2] If event a is the sending of message m by process Pi, then message m is assigned a timestamp tm = Ci(a). On receiving the same message m by process Pj, Cj is set to Cj := max(Cj, tm + d) 1/3/2019 COP5611

Total Ordering Using Lamport’s Clocks If a is any event at process Pi and b is any event at process Pj, then a => b if and only if either Where is any arbitrary relation that totally orders the processes to break ties 1/3/2019 COP5611

Lamport’s Distributed Mutual Exclusion Algorithm This algorithm is based on the total ordering using Lamport’s clocks Each process keeps a Lamport’s logical clock Each process is associated with a unique id that can be used to break the ties In the algorithm, each process keeps a queue, request_queuei, which contains mutual exclusion requests ordered by their timestamp and associated id Ri of each process consists of all the processes The communication channel is assumed to be FIFO 1/3/2019 COP5611

Lamport’s Distributed Mutual Exclusion Algorithm – cont. 1/3/2019 COP5611

Lamport’s Distributed Mutual Exclusion Algorithm – cont. 1/3/2019 COP5611

Vector Clocks Implementation rules [IR1] Clock Ci is incremented between any two successive events in process Pi Ci[i] := Ci[i] + d ( d > 0) [IR2] If event a is the sending of message m by process Pi, then message m is assigned a timestamp tm = Ci(a). On receiving the same message m by process Pj, Cj is set to Cj[k] := max(Cj[k], tm[k]) 1/3/2019 COP5611

Vector Clocks – cont. In a system of vector clocks, where 1/3/2019 COP5611

Causal Ordering of Messages The causal ordering of messages tries to maintain the same causal relationship that holds among “message send” events with the corresponding “message receive” events In other words, if Send(M1) -> Send(M2), then Receive(M1) -> Receive(M2) This is different from causal ordering of events 1/3/2019 COP5611

Birman-Schiper-Stephenson Protocol 1/3/2019 COP5611

Schiper-Eggli-Sando Protocol 1/3/2019 COP5611

Schiper-Eggli-Sando Protocol – cont. 1/3/2019 COP5611

Schiper-Eggli-Sando Protocol – cont. 1/3/2019 COP5611

Global State 1/3/2019 COP5611

Local State Local state More notations For a site Si, its local state at a given time is defined by the local context of the distributed application, denoted by LSi. More notations mij denotes a message sent by Si to Sj send(mij) and rec(mij) denote the corresponding sending and receiving event. 1/3/2019 COP5611

Definitions – cont. 1/3/2019 COP5611

Definitions – cont. 1/3/2019 COP5611

Global State – cont. 1/3/2019 COP5611

Definitions – cont. Strongly consistent global state: A global state is strongly consistent if it is consistent and transitless 1/3/2019 COP5611

Global State – cont. 1/3/2019 COP5611

Chandy-Lamport’s Global State Recording Algorithm 1/3/2019 COP5611

Cuts of a Distributed Computation A cut is a graphical representation of a global state A consistent cut is a graphical representation of a consistent global state Definition A cut of a distributed computation is a set C={c1, c2, ...., cn}, where ci is a cut event at site Si in the history of the distributed computation 1/3/2019 COP5611

Cuts of a Distributed Computation – cont. 1/3/2019 COP5611

Cuts of a Distributed Computation – cont. 1/3/2019 COP5611

Cuts of a Distributed Computation – cont. 1/3/2019 COP5611

Cuts of a Distributed Computation – cont. 1/3/2019 COP5611

Cuts of a Distributed Computation – cont. 1/3/2019 COP5611

Termination Detection Termination detection is to detect when a distributed algorithm is terminated, such as election, a deadlock detection, or token generating algorithm A process can be active or idle A computation is said to have terminated if and only if all the processes are idle and there are no messages in transit Basic idea We are not going to cover the algorithm in detail 1/3/2019 COP5611

Summary The absence of global time and the absence of shared memory are two main characteristics of distributed systems Two schemes, Lamport’s logical clocks and vector clocks are used to order events Two algorithms for causal ordering of messages based on the vector clock-based ideas are discussed Global states and cuts of a distributed system are also covered These provide the theoretical foundations for other distributed algorithms 1/3/2019 COP5611