Global Time in Distributed Real-Time Systems Dr. Konstantinos Tatas.

Slides:



Advertisements
Similar presentations
Lecture 1: Logical, Physical & Casual Time (Part 2) Anish Arora CSE 763.
Advertisements

Logical Clocks (2).
Synchronization.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
Time and Clock Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
1 Complexity of Network Synchronization Raeda Naamnieh.
1 The Time-Triggered Model of Computation Lior Zimet.
Time in Embedded and Real Time Systems Lecture #6 David Andrews
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Distributed Systems Fall 2010 Time and synchronization.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
Teaching material based on Distributed Systems: Concepts and Design, Edition 3, Addison-Wesley Copyright © George Coulouris, Jean Dollimore, Tim.
Synchronization Clock Synchronization Logical Clocks Global State Election Algorithms Mutual Exclusion.
20101 Synchronization in distributed systems A collection of independent computers that appears to its users as a single coherent system.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 9: Time, Coordination and Replication Dr. Michael R. Lyu Computer.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
Aran Bergman, Principles of Reliable Distributed Systems, Technion EE, Spring Principles of Reliable Distributed Systems Recitation 5: Reliable.
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
CprE 458/558: Real-Time Systems
EEC-681/781 Distributed Computing Systems Lecture 10 Wenbing Zhao Cleveland State University.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
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.
TIME, CLOCKS AND THE ORDERING OF EVENTS IN A DISTRIBUTED SYSTEM L. Lamport Computer Science Laboratory SRI International.
Add Fault Tolerance – order & time Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Optimal Clock Synchronization T.K. Srikanth.
Chapter 17 Theoretical Issues in Distributed Systems
Logical Clocks (2). Topics r Logical clocks r Totally-Ordered Multicasting r Vector timestamps.
1 Physical Clocks need for time in distributed systems physical clocks and their problems synchronizing physical clocks u coordinated universal time (UTC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
DISTRIBUTED ALGORITHMS Luc Onana Seif Haridi. DISTRIBUTED SYSTEMS Collection of autonomous computers, processes, or processors (nodes) interconnected.
Formal Model for Simulations Instructor: DR. Lê Anh Ngọc Presented by – Group 6: 1. Nguyễn Sơn Hùng 2. Lê Văn Hùng 3. Nguyễn Xuân Hậu 4. Nguyễn Xuân Tùng.
Real-Time Systems Chapter 1 Hermann Kopetz. Real-Time-Systems, Kluwer 1997.
Dina Workshop Analysing Properties of Hybrid Systems Rafael Wisniewski Aalborg University.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
“Virtual Time and Global States of Distributed Systems”
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
Communication & Synchronization Why do processes communicate in DS? –To exchange messages –To synchronize processes Why do processes synchronize in DS?
Distributed Systems Principles and Paradigms Chapter 05 Synchronization.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Time This powerpoint presentation has been adapted from: 1) sApr20.ppt.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Synchronization CSCI 4900/6900. Importance of Clocks & Synchronization Avoiding simultaneous access of resources –Cooperate to grant exclusive access.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Introduction to Embedded Systems Rabie A. Ramadan 5.
Distributed Systems Topic 5: Time, Coordination and Agreement
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Hwajung Lee. Primary standard = rotation of earth De facto primary standard = atomic clock (1 atomic second = 9,192,631,770 orbital transitions of Cesium.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Proof of liveness: an example
Bringing time awareness into the design of System-of-Systems
Time and Clock.
Time and Clock.
Maya Haridasan April 15th
Chapter 5 (through section 5.4)
Physical clock synchronization
Time-Triggered Architecture
Chap 5 Distributed Coordination
Last Class: Naming Name distribution: use hierarchies DNS
Outline Theoretical Foundations
Presentation transcript:

Global Time in Distributed Real-Time Systems Dr. Konstantinos Tatas

OUTLINE Revision of real-time system Distributed real-time system requirements Global time Clock synchronization

What is real-time? Is there any other kind? A real-time computer system is a computer system where the correctness of the system behavior depends not only on the logical results of the computations, but also on the physical time when these results are produced. By system behavior we mean the sequence of outputs in time of a system.

Real-time means reactive A real-time computer system must react to stimuli from its environment The instant when a result must be produced is called a deadline. If a result has utility even after the deadline has passed, the deadline is classified as soft, otherwise it is firm. If severe consequences could result if a firm deadline is missed, the deadline is called hard. Example: Consider a traffic signal at a road before a railway crossing. If the traffic signal does not change to red before the train arrives, an accident could result.

Distributed RT system model From the POV of an outside observer, a real-time (RT) system can be decomposed into three communicating subsystems: –a controlled object (the physical subsystem, the behavior of which is governed by the laws of physics), –a “distributed” computer subsystem (the cyber system, the behavior of which is governed by the programs that are executed on digital computers) –a human user or operator The distributed computer system consists of computational nodes that interact by the exchange of messages. A computational node can host one or more computational components.

Design Challenges in Distributed Systems Theoretically, a distributed system features the same design challenges as a centralized embedded system in terms of performance, power consumption, battery life, etc. However, an additional challenge exists: synchronization between nodes

Definition of time Newtonian physics time model is adequate for most temporal phenomena and is much simpler than relativistic time Time is modeled as an infinite set [T] with the following properties: –{T} is an ordered set, that is, if p and q are any two instants, then either p is simultaneous with q, or p precedes q, or q precedes p, where these relations are mutually exclusive. We call the order of instants on the timeline the temporal order. –{T} is a dense set. This means that there is at least one q between p and r iff p is not the same instant as r, where p, q, and r are instants.

Events in the time model A section of the time line between two different instants is called a duration. An event takes place at an instant of time and does not have a duration. If two events occur at the same instant, then the two events are said to occur simultaneously. Instants are totally ordered; however, events are only partially ordered, Events can be totally ordered if another criterion is introduced to order events that occur simultaneously

Causal order In many real time systems determining cause and effect relations between events is of interest, especially determining the primary event Temporal order is necessary but not sufficient to establish causal order

Global time An important yet challenging task is maintaining a consistent global time in a distributed real-time system There is no global clock, only local clocks Local clocks drift arbitrarily No local clock is always correct A global time is an abstract notion that is approximated by properly selected microticks from the synchronized local physical clocks of an ensemble.

Global time Assume a set of nodes, each one with its own local physical clock that ticks with granularity. Assume that all of the clocks are internally synchronized with a precision Π, i.e., for any two clocks j, k, and all microticks i It is then possible to select a subset of the microticks of each local clock k for the generation of the local implementation of a global notion of time. We call such a selected local microtick i a macrotick (or a tick) of the global time. For example, every tenth microtick of a local clock k may be interpreted as the global tick, the macrotick, of this clock (see Fig. 3.2). If it does not matter at which clock k the (macro) tick occurs, we denote the tick ti without a superscript. A global time is thus an abstract notion that is approximated by properly selected microticks from the synchronized local physical clocks of an ensemble.

Reasonable global time The global time t is called reasonable, if all local implementations of the global time satisfy the condition g>Π Then for a single event e, that is observed by any two different clocks of the ensemble, their global time-stamps can differ by at most one tick. This is the best we can achieve.

Temporal order When to events differ by less than two ticks temporal order cannot be maintained

Errors in duration measurement

Internal clock synchronization The purpose of internal clock synchronization is to ensure that the real-time clocks of each correct node are within precision Π, independently of their drift rates. The global time ticks of each node must be periodically resynchronized within the ensemble of nodes to establish a global time base with specified precision. The period of resynchronization is called resynchronization interval. After that the clocks are left to drift again until they are resynchronized.

Internal clock synchronization The synchronization algorithm must bring the clocks so close together that the amount of divergence during the next free-running resynchronization interval will not cause a clock to leave the precision interval. Φ+Γ≤Π Where Φ is the convergence function and Γ is the drift offset Φ=2ρRint Where Rint is the length of the resynchronization interval and ρ is the maximum specified drift rate

Malicious clock clock synchronization can only be guaranteed in the presence of Byzantine errors if the total number of clocks N (3k + 1), where k is the number of Byzantine faulty clocks.

Central Master Synchronization the central master, periodically sends the value of its time counter in synchronization messages to all other nodes the slave records the time-stamp of message arrival. The difference between the master’s time, contained in the synchronization message, and the recorded slave’s time-stamp of message arrival, corrected by the known latency of the message transport, is a measure of the deviation of the clock of the master from the clock of the slave. The slave then corrects its clock by this deviation to bring it into agreement with the master’s clock. Used at system startup Not fault-tolerant

External clock synchronization External synchronization links the global time of a cluster to an external standard of time. For this purpose it is necessary to access a timeserver, i.e., an external time source that periodically broadcasts the current reference time in the form of a time message. GPS (Global Positioning System). –The accuracy of a GPS receiver is better than 100 ns and it has an authoritative long-term stability – in some sense, GPS is the worldwide measurement standard for measuring the progression of time. Alternatively, the external time source can temperature compensated crystal oscillators (TCXO) –Typical drift rate of better than 1 ppm, causing a drift offset of better 1 μs/s atomic clocks – Rubidum clock typical drift rate in the order of 10^-12 causing a drift offset of about 1 μs in 10 days.

Example 1 Given a clock synchronization system that achieves a precision of 90 μs, what is a reasonable granularity for the global time? What are the limits for the observed values for a time interval of 1.1 ms?

Example 2 Given a –latency jitter of 20 μs, –a clock drift rate of 10^-5 s/s, and –a resynchronization period of 1 s what precision can be achieved by the central master algorithm?

Example 3 A distributed system uses GPS for clock synchronization: –What is the reasonable granularity for the global time? –What are the limits for the observed values for a time interval of 200 ms?

References H. Kopetz, “Real time systems: Design principles for distributed systems” Springer Kopetz, H. & W. Ochsenreiter. (1987). Clock Synchronization in Distributed Real-Time Systems. IEEE Trans. Computers. Vol. 36(8). (pp ). Kopetz, H. (1992). Sparse Time versus Dense Time in Distributed Real-Time Systems. Proc. 14th Int. Conf. on Distributed Computing Systems. IEEE Press. (pp ).