Leveraging Synchronized Clocks in Distributed Applications Edward A. Lee Robert S. Pepper Distinguished Professor UC Berkeley Swarm Lab Retreat January.

Slides:



Advertisements
Similar presentations
Computer Systems & Architecture Lesson 2 4. Achieving Qualities.
Advertisements

Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
A Hierarchical Co-ordination Language for Interacting Real-time Tasks Arkadeb Ghosal, UC Berkeley Thomas A. Henzinger, EPFL Daniel Iercan, "Politehnica"
Time for High-Confidence Distributed Embedded Systems Edward Ashford Lee Robert S. Pepper Distinguished Professor UC Berkeley Invited keynote talk IEEE.
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
P. Albertos* & A. Crespo + Universidad Politécnica de Valencia * Dept. of Systems Engineering and Control, + Dept. of Computer Engineering POB E
PTIDES Project Overview
Overview of PTIDES Project
2/11/2010 BEARS 2010 On PTIDES Programming Model John Eidson Jeff C. Jensen Edward A. Lee Slobodan Matic Jia Zou PtidyOS.
PTIDES: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Architecture Modeling and Analysis for Embedded Systems Oleg Sokolsky CIS700 Fall 2005.
Distributed Systems Fall 2010 Time and synchronization.
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
April 16, 2009 Center for Hybrid and Embedded Software Systems PtidyOS: An Operating System based on the PTIDES Programming.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Why Behavioral Wait statement Signal Timing Examples of Behavioral Descriptions –ROM.
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Models of Computation for Embedded System Design Alvise Bonivento.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Cyber-Physical Systems: A Vision of the Future Edward A. Lee Robert S. Pepper Distinguished.
Lecture 13 Synchronization (cont). EECE 411: Design of Distributed Software Applications Logistics Last quiz Max: 69 / Median: 52 / Min: 24 In a box outside.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
Real-Time Systems and Programming Languages
SEC PI Meeting Annapolis, May 8-9, 2001 Component-Based Design of Embedded Control Systems Edward A. Lee & Jie Liu UC Berkeley with thanks to the entire.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Concurrent Component Patterns, Models of Computation, and.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
CprE 458/558: Real-Time Systems
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Comparing Models of Computation for Real-time, Distributed Control Systems Shawn Schaffert Bruno Sinopoli.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
Lecture 12 Synchronization. EECE 411: Design of Distributed Software Applications Summary so far … A distributed system is: a collection of independent.
Code Generation from CHARON Rajeev Alur, Yerang Hur, Franjo Ivancic, Jesung Kim, Insup Lee, and Oleg Sokolsky University of Pennsylvania.
[ §4 : 1 ] 4. Requirements Processes II Overview 4.1Fundamentals 4.2Elicitation 4.3Specification 4.4Verification 4.5Validation Software Requirements Specification.
Distributed Real-Time Systems for the Intelligent Power Grid Prof. Vincenzo Liberatore.
Safe Collaborative Driving Systems NSF and Nick Maxemchuk Columbia University Engineering is the Art of Managing Complexity Photograph.
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:
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 16 System Architecture and Design II.
1. Introduction 1.1 Background 1.2 Real-time applications 1.3 Misconceptions 1.4 Issues in real-time computing 1.5 Structure of a real-time system.
“Fly-By-Wireless” Chris Dimoulis CS 441 Fall 2013.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Virtual Environments Introduction. Outline What are they? DVEs vs. Analytic Simulations DIS –Design principles Example.
Quality of System requirements 1 Performance The performance of a Web service and therefore Solution 2 involves the speed that a request can be processed.
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
ICT Strategy Intelligent Highways: Endpoint Adapters.
Global Time in Distributed Real-Time Systems Dr. Konstantinos Tatas.
Doc.: IEEE /1080r0 Submission September 2004 Todor Cooklev, SF State UniversitySlide 1 IEEE 1588 over b Afshaneh Pakdaman San Francisco.
The 14 th IEEE Real-Time and Embedded Technology and Applications Symposium, April 2008 Real-Time Distributed Discrete-Event Execution with Fault Tolerance.
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Advantages of Time-Triggered Ethernet
Building Dependable Distributed Systems, Copyright Wenbing Zhao
Data and Applications Security Developments and Directions Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #25 Dependable Data Management.
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
February 12, 2009 Center for Hybrid and Embedded Software Systems Timing-aware Exceptions for a Precision Timed (PRET)
Ptolemy Project Vision Edward A. Lee Robert S. Pepper Distinguished Professor Eighth Biennial Ptolemy Miniconference April 16, 2009 Berkeley, CA, USA.
CS5270 Lecture 41 Timed Automata I CS 5270 Lecture 4.
The Ptolemy Project Closing Remarks
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
COT 5611 Operating Systems Design Principles Spring 2012
Embedded Systems: A Focus on Time
Introduction of Week 13 Return assignment 11-1 and 3-1-5
COT 5611 Operating Systems Design Principles Spring 2014
Presentation transcript:

Leveraging Synchronized Clocks in Distributed Applications Edward A. Lee Robert S. Pepper Distinguished Professor UC Berkeley Swarm Lab Retreat January 14, Berkeley, CA

A Major Emerging Opportunity: Clock Synchronization Clock synchronization is going to change the world (again) 1500s days Gregorian Calendar (BBC history) Musée d'Orsay clock (Wikimedia Commons) 1800s seconds 2000s nanoseconds 2005: first IEEE 1588 plugfest Lee, Berkeley2

Global Positioning System Provides ~100ns accuracy to devices with outdoor access. Lee, Berkeley3 Images: Wikimedia Commons

Precision Time Protocols (PTP) IEEE 1588 on Ethernet It is becoming routine for physical network interfaces (PHY) to provide hardware support for PTPs. With this first generation PHY, clocks on a LAN agree on the current time of day to within 8ns, far more precise than GPS older techniques like NTP. Press Release October 1, 2007 Lee, Berkeley4

An Extreme Example: The Large Hadron Collider The WhiteRabbit project at CERN is synchronizing the clocks of computers 10 km apart to within about 80 psec using a combination of GPS, IEEE 1588 PTP and synchronous ethernet. Lee, Berkeley5

How PTP Synchronization works Source: John Eidson Lee, Berkeley6

Clock Synchronization Enables: Energy efficiency Coordination, even without communication Security Resource management Determinism Lee, Berkeley7 … but I will skip this story in the interest of time…

Ptides: Programming Temporally Integrated Distributed Embedded Systems First step: Time-stamped messages. Messages carry time stamps that define their interleaving Actors specify computation

Ptides: Second step: Network clock synchronization GPS, NTP, IEEE 1588, OpenWSN, time-triggered busses, … they all work. We just need to bound the clock synchronization error. Assume bounded clock error Assume bounded clock error e Clock synchronization gives global meaning to time stamps Messages are processed in time- stamp order

Ptides: Third step: Bind time stamps to real time at sensors and actuators Time stamp value is a deadline Time stamp value is time of measurement Actors wrap sensors Actors wrap actuators

Global latencies between sensors and actuators become controllable, which enables analysis of system dynamics. Ptides: Fourth step: Specify latencies in the model Model includes manipulations of time stamps, which control latencies between sensors and actors Actuators may be designed to interpret input time stamps as the time at which to take action. Feedback through the physical world

Ptides: Fifth step Safe-to-process analysis (ensures determinacy) Safe-to-process analysis guarantees that events are processed in time-stamp order, given some assumptions. Assume bounded network delay d Assume bounded clock error Assume bounded clock error e An earliest event with time stamp t here can be safely merged when real time exceeds t + s + d + e – d2 Assume bounded clock error e Assume bounded sensor delay s Application specification of latency d2 Technical: Need to have deadlines on network interfaces, to guarantee time-stamp order irrespective of execution times of actors.

So Many Assumptions? All of the assumptions are achievable with today’s technology, and in fact are requirements anyway for hard-real-time systems. The Ptides model makes the assumptions explicit. Violations of the assumptions are detectable as out-of- order events and can be treated as faults. Lee, Berkeley13

Faults and Deadline Misses Faults occur if: Network latency exceeds expectations Clock synchronization error exceeds bound Sensor latency exceeds bound Faults manifest as out-of-order time stamps. Deadline misses occur if: Execution time exceeds expectations Deadline misses are detected at actuators and network interfaces. They are not necessarily faults! Lee, Berkeley14 Events cannot be processed according to DE semantics. Possible reactions: Backtracking (transactions) Switch to degraded mode Drop events Reboot Events have been processed according to DE semantics. Reactions: Warning Degraded mode Drop action

Ptides Schedulability Analysis Determine whether deadlines can be met The problem turns out to be decidable for a large class of models.

Google Spanner Google independently developed a very similar technique and applied it to distributed databases. Lee, Berkeley16 Proceedings of OSDI 2012

Ptides is a Change in Philosophy The implementation platform affects timing in a distributed real-time system. Conventional approach: Specify functionality, implementation architecture, and mapping. Timing emerges from the combination. Ptides approach: Specify temporal behavior. Then verify that it is met by a candidate implementation architecture.

Ptides offers a deterministic model of computation for distributed real-time systems.

What is the Value of Models? Solomon Wolf Golomb on Modeling You will never strike oil by drilling through the map! Lee, Berkeley19

But this does not, in any way, diminish the value of a map! Lee, Berkeley20

Determinate Models Physical System Model Synchronous digital logic Lee, Berkeley21 Image: Wikimedia Commons

Determinate Models Physical System Model Single-threaded imperative programs Lee, Berkeley22 Image: Wikimedia Commons

Determinate Models Physical System Model Synchronous language programs Lee, Berkeley23 module Timer: input R, SEC; output L, S; Loop weak abort await 3 SEC; [ sustain S || await 5 SEC; sustain L ] when R; end end module [S. Edwards, Columbia U.] Image: Wikimedia Commons

Determinate Models Physical System Model Signal Differential Equations Lee, Berkeley24 Image: Wikimedia Commons

A Major Problem Today: Cyber-Physical Combinations are Nondeterminate Signal Lee, Berkeley25 Image: Wikimedia Commons

Ptides offers a deterministic model of computation for distributed real-time systems.

Acknowledgements Patricia Derler John Eidson Slobodan Matic Christos Stergiou Yang Zhao Jia Zou Plus: The entire Ptolemy II Pteam Lee, Berkeley27