Basics of Distributed Systems

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Time and Clocks u uses of time in distributed systems: –time-based algorithms (e.g. in security) –distributed make –gathering event traces.
Advertisements

Last Class: Clock Synchronization
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
Time and synchronization (“There’s never enough time…”)
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Logical Clocks and Global State.
Distributed Systems Dinesh Bhat - Advanced Systems (Some slides from 2009 class) CS 6410 – Fall 2010 Time Clocks and Ordering of events Distributed Snapshots.
Distributed Systems Spring 2009
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.
Ordering and Consistent Cuts
Logical Time and Logical Clocks
Time, Clocks and the Ordering of Events in a Distributed System - by Leslie Lamport.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Logical Clocks and Global State.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM L. Lamport Computer Science Laboratory SRI International.
Chapter 17 Theoretical Issues in Distributed Systems
Chapter 5.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Project Reference Some slides are in courtesy of Dr. Erciyes,
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
1 Causal Delivery Advanced Networks PhD. Saúl Pomares Hernández.
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
Issues with Clocks. Context The tree correction protocol was based on the idea of local detection and correction. Protocols of this type are complex to.
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
“Virtual Time and Global States of Distributed Systems”
Distributed Systems Fall 2010 Logical time, global states, and debugging.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
9/14/20051 Time, Clocks, and the Ordering of Events in a Distributed System by L. Lamport CS 5204 Operating Systems Vladimir Glina Fall 2005.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Lecture 1: Logical and Physical Time with some Applications Anish Arora CSE 6333 Notes include material from Dr. Jeff Brumfield.
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.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Logical time Causality between events is fundamental to the design of parallel and distributed systems. In distributed systems, it is not possible to have.
CSE 486/586 Distributed Systems Logical Time
CSE 486/586 Distributed Systems Logical Time
Overview of Ordering and Logical Time
Logical time (Lamport)
COT 5611 Operating Systems Design Principles Spring 2012
Logical Clocks and Casual Ordering
Outline Theoretical Foundations - continued Lab 1
Time And Global Clocks CMPT 431.
Event Ordering.
Outline Theoretical Foundations
CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM
Chapter 5 (through section 5.4)
Chien-Chung Shen CIS/UD
CDK: Sections 11.1 – 11.4 TVS: Sections 6.1 – 6.2
Lecture 8 Processes and events Local and global states Time
Outline Theoretical Foundations - continued
Logical time (Lamport)
Logical time (Lamport)
by Manas Hardas for Advanced Operating Systems Nov 27th 2007
CSE 486/586 Distributed Systems Logical Time
Logical time (Lamport)
CSE 542: Operating Systems
COT 5611 Operating Systems Design Principles Spring 2014
Chien-Chung Shen CIS/UD
Outline Theoretical Foundations
Presentation transcript:

Basics of Distributed Systems Chien-Chung Shen CIS/UD cshen@udel.edu

Introduction Concept of time is fundamental to our way of thinking Derived from the basic concept of (temporal) order in which events occur A distributed system consists of a collection of distinct processes which are spatially separated no shared memory interact via message passing A system is distributed if the message transmission delay is not negligible (and not deterministic) Clocks are not (easily to be) synchronized in distributed systems hard to tell which event occurs first

Introduction How to define happened-before relationship between events? The happened-before relationship defines a partial order between (certain) events Design a distributed algorithm for extending the happened-before relation to a consistent total ordering of all the events Total order is an ordering that defines the exact order of every event Partial order defines the order between certain events that depend on each other

Causality Causality - the cause precedes the effect Sending of a message precedes the receipt of the message Types of events in distributed systems local computation sending a message receive a message Distributed systems are causal How to define happened-before relationship between events is a distributed system without using (physical) clocks?

Logical Time and Clocks The order of events each process consists of a sequence of events - two events occurred in the order they appear in a process event of sending occurred before event of receiving Happened-before relation (denoted by H) HB1: on process p: x occurred before y, then x H y HB2: For any message m, send(m) H receive(m) HB3: If x, y and z are events such that x H y and y H z, then x H z Two events a and b are concurrent if not(a H b) and not(b H a) The order of events occurring at different processes can be critical in a distributed application. To determine the order of the events that occur at different processes in a distributed application, two obvious points are: If two events occurred at the same process, then they occurred in the order in which it observes them. Whenever a message is sent between processes, the event of sending the message occurred before the event of receiving the message. The ordering obtained by generalizing these two relationships is called happen-before relation. We write x p y if two events x and y occurred at a single process p and x occurred before y. Using this restricted order we can define the happened-before relation, denoted by , as follows: HB1: If  process p: x p y, then x  y. HB2: For any message m, send(m)  rcv(m), where send(m) is the event of sending the message, and rcv(m) is the event of receiving it. HB3: If x, y and z are events such that x  y and y  z, then x  z.

time Space-Time diagram p3 and q3 p1 and r4

Logical Timestamps Example Events occurring at three processes If x  y, then we can find a series of events occurring at one or more processes such that either HB1 or HB2 applies between them. The sequence of events need not be unique. If two events are not related by the  relation (I.e., neither a  b nor b  a), then they are concurrent (a || b). a  b  c  d  f; e  f but a || e.

Lamport’s Logical Clock Alg.

Lamport Timestamps Example Events occurring at three processes 2 3 => 7 1 6 4 3 1 5