Logical Clocks (addendum). Logical Clocks In the class of Feb 3 the question was asked about having different numbers for different events.

Slides:



Advertisements
Similar presentations
Statements and Questions By Tracie Kile 3 rd grade.
Advertisements

Vocabulary Match-up Click on the vocabulary word that matches the meaning. (not just in the box) Something that is not known by many people secret clue.
My Internet Safety Guide I have used scratch to program a guide to internet safety using QR codes.
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
COMMUNICATING SEQUENTIAL PROCESSES C. A. R. Hoare The Queen’s University Belfast, North Ireland.
Logical Clocks.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 6 Instructor: Haifeng YU.
CSI 3120, Implementing subprograms, page 1 Implementing subprograms The environment in block-structured languages The structure of the activation stack.
CLUE protocol CLUE design team meeting 28/10/2014.
MODUL 1 Analisis & Informasi Proses Bisnis (CSA221)
Logical Time Each event is assigned a logical time from a totally ordered set T The logical times for the events must respect any possible dependencies.
Exercise 1: Write out the values of logical clocks p1p1 p1p1 p1p1.
CS514: Intermediate Course in Operating Systems Professor Ken Birman Vivek Vishnumurthy: TA.
Slides prepared by Rose Williams, Binghamton University Chapter 17 Swing I.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
S A B D C T = 0 S gets message from above and sends messages to A, C and D S.
COMPE575 Parallel & Cluster Computing 5.1 Pipelined Computations Chapter 5.
State Machines CS 614 Thursday, Feb 21, 2002 Bill McCloskey.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
Slides prepared by Rose Williams, Binghamton University ICS201 Lecture 13 : Swing I King Fahd University of Petroleum & Minerals College of Computer Science.
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Lecture 20 The last function of reason is to recognize that there are an infinity of things which surpass it. Blaise Pascal.
Real Time Systems Advanced State Machines. Behaviour (part 2) - 2 Outline  Simple and Composite States  Transition Segments and Junction Points  Run-to-Completion.
1 Signals (continued) CS 241 April 9, 2012 University of Illinois.
Distributed Coordination. Turing Award r The Turing Award is recognized as the Nobel Prize of computing r Earlier this term the 2013 Turing Award went.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Logical Clocks. Topics Logical clocks Totally-Ordered Multicasting Vector timestamps.
Feb 15, 2001CSCI {4,6}900: Ubiquitous Computing1 Announcements.
MIS 3200 – Unit 3.2 Page_Load method AutoPostBack property of controls IsPostBack method of the Page object Understanding web page life cycle.
High Level Architecture Time Management. Time management is a difficult subject There is no real time management in DIS (usually); things happen as packets.
Think Possibility 1 Iterative Constructs ITERATION / LOOPS C provides three loop structures: the for-loop, the while-loop, and the do-while-loop. Each.
Error Handling Tonga Institute of Higher Education.
Page 1 Mutual Exclusion & Election Algorithms Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Functional Skills Code Breaking LO: Use logic and frequency analysis to read and write in code.
A PC Wakes Up A STORY BY VICTOR NORMAN. Once upon a time…  a PC (we’ll call him “H”) is connected to a network and turned on. Aside: The network looks.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Efficient Algorithms for Distributed Snapshots and Global Virtual Time Approximation Author: Friedermann Mattern Presented By: Shruthi Koundinya.
USING CONDITIONAL CODE AMIR KHANZADA. Conditional Statement  Conditional statements are the set of commands used to perform different actions based on.
Simulation Examples And General Principles Part 2
Lecture #12 Page 1 ECE 4110– Digital Logic Design Lecture #12 Agenda 1.VHDL : Behavioral Design (Processes) Announcements 1.n/a.
親愛的吉姆舅舅: 今天吃完晚餐後,奶奶說,在家 裡情況變好以前,您要我搬到城裡跟 您住。奶奶有沒有跟您說,爸爸已經 好久沒有工作,也好久沒有人請媽媽 做衣服了? 我們聽完都哭了,連爸爸也哭了, 但是媽媽說了一個故事讓我們又笑了。 她說:您們小的時候,她曾經被您追 得爬到樹上去,真的嗎? 雖然我個子小,但是我很強壯,
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
ПЕЧЕНЬ 9. Закладка печени в период эмбрионального развития.
Distributed Systems Lecture 6 Global states and snapshots 1.
Additional Examples CSE420/598, Fall 2008.
Introduction to Networking Recital 4
Timing Model Start Simulation Delay Update Signals Execute Processes
Think What will be the output?
Overview of Ordering and Logical Time
Applied Operating System Concepts
SYNCHORNIZATION Logical Clocks.
Transactional Memory Semaphores, monitors, and conditional critical regions all suffer from limitations based on lock semantics Naïve synchronization may.
LO: Use logic and frequency analysis to read and write in code.
Tonga Institute of Higher Education
Quiz.
Lecture 10: Coordination and Agreement
PROGRAMMING FUNDAMENTALS Lecture # 03. Programming Language A Programming language used to write computer programs. Its mean of communication between.
Sequence Diagram Traces
How to allow the program to know when to stop a loop.
Presentation transcript:

Logical Clocks (addendum)

Logical Clocks In the class of Feb 3 the question was asked about having different numbers for different events.

Example 1 Assume that P3 has a loop that is executed n times. At the termination of the loop a message is sent to P1. The value of n is arbitrary. A part of P3’s code could look something like this: 3.1: i = 0; 3.2: while (i < n) 3.3: i = i+1; 3.4: send (i,P2); Assume that n = 2; The timing diagram would look something like what appears on the next page.

Example 1 a b P1P2 P3 c d e f g h i j p j is the event that statement 3.1 executes; k is the event that 3.2 executes; l is the event that 3.3 executes; m is the event that 3.2 executes; n is the event that 3.3 executes; o is the event that 3.2 executes; p is the event that statement 3.4 executes k l m l n o

Example 1 a b P1P2 P3 c d e f g h i j Assume n is 1 instead of 2. Event j is associated with statement 3.1; Event k is associated with statement 3.2; Event l is associated with Statement 3.3; Event m is associated with statement 3.2; Event n is associated with statement 3.4 k l m l n

Example 2 In the previous examples we had statements like “recv(x, P3)” – basically it was made explicit where a message was to be received from. However, this doesn’t have to be the case. Essentially we can have “recv(x,?)” where the process is waiting for any process. Assume that P2 has a code segment that looks like the following: 3.1: while(;;) { 3.2: recv(x,?); 3.3 Process message} P1 and P3 are processes that send messages to P2.

Example a b P1P2 P3 c d e f g i j m n o Event e represents the execution of 3.1; Event f represents the execution of 3.2; event g represents the execution of event 3.3; event h represents the execution of 3.1; event i represents the execution of 3.2; event j represents the execution of 3.3; event k represents the execution of 3.1; Event l represents the execution of h5 k l Lots of processing; Assume that k is 50

Example P1 may be on a much faster machine then P3 and so both its messages may arrive at P2 before P3’s messages

Example a b P1P2 P3 c d e f g i j j k l Event e represents the execution of 3.1; Event f represents the execution of 3.2; event g represents the execution of event 3.3; event h represents the execution of 3.1; event i represents the execution of 3.2; event j represents the execution of 3.3; event k represents the execution of 3.1; Event l represents the execution of h k l 8 5