7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.

Slides:



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

Discrete Event Models: Getting the Semantics Right Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley With thanks to Xioajun.
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.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,
Berkeley, CA, March 12, 2002 Modal Models in Vehicle-Vehicle Coordination Control Xiaojun Liu The Ptolemy Group EECS Department, UC Berkeley.
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Type System, March 12, Data Types and Behavioral Types Yuhong Xiong Edward A. Lee Department of Electrical Engineering and Computer Sciences University.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Leveraging Synchronous Language Principles for Hybrid System Models Haiyang Zheng and.
Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.
6th Biennial Ptolemy Miniconference Berkeley, CA May 12, 2005 Some Developments in the Tagged Signal Model Xiaojun Liu With J. Adam Cataldo, Edward A.
A denotational framework for comparing models of computation Daniele Gasperini.
April 16, 2009 Center for Hybrid and Embedded Software Systems PtidyOS: An Operating System based on the PTIDES Programming.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Causality Interface  Declares the dependency that output events have on input events.  D is an ordered set associated with the min ( ) and plus ( ) operators.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
8th Biennial Ptolemy Miniconference Berkeley, CA April 16, 2009 Precision Timed (PRET) Architecture Hiren D. Patel, Ben Lickly, Isaac Liu and Edward A.
6th Biennial Ptolemy Miniconference Berkeley, CA May 12, 2005 Operational Semantics of Hybrid Systems Haiyang Zheng and Edward A. Lee With contributions.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Correctness in Causal Systems Eleftherios Matsikoudis UC Berkeley.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Discrete Event Models: Getting the Semantics Right Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley With special thanks.
Chess Review November 21, 2005 Berkeley, CA Edited and presented by Causality Interfaces and Compositional Causality Analysis Rachel Zhou UC Berkeley.
Run-Time Models for Measurement & Control Systems and Their Support in Ptolemy II Jie Liu EECS, UC Berkeley 9/13/2000 Agilent Technologies.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Ptolemy Miniconference May 9, 2003 Berkeley, CA Ptolemy Project Plans for the Future Edward A. Lee Professor Ptolemy Project Director.
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 System-Level Types for Component-Based Design Edward A.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Concurrent Component Patterns, Models of Computation, and.
Chess Review May 11, 2005 Berkeley, CA Discrete-Event Systems: Generalizing Metric Spaces and Fixed-Point Semantics Adam Cataldo Edward Lee Xiaojun Liu.
State of the Art Lecture IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, 2001 Computing for Embedded Systems Edward.
SNAL Sensor Networks Application Language Alvise Bonivento Mentor: Prof. Sangiovanni-Vincentelli 290N project, Fall 04.
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Models of Computation Reading Assignment: L. Lavagno, A.S. Vincentelli and E. Sentovich, “Models of computation for Embedded System Design”
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Tufts Wireless Laboratory School Of Engineering Tufts University “Network QoS Management in Cyber-Physical Systems” Nicole Ng 9/16/20151 by Feng Xia, Longhua.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
1 H ardware D escription L anguages Modeling Digital Systems.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
The 14 th IEEE Real-Time and Embedded Technology and Applications Symposium, April 2008 Real-Time Distributed Discrete-Event Execution with Fault Tolerance.
Design Languages in 2010 Chess: Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley Panel Position Statement Forum on Design.
Electrical and Computer Engineering University of Cyprus LAB 1: VHDL.
Computing For Embedded System IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, Author : Edward A. Lee UC.
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
Royal Institute of Technology System Specification Fundamentals Axel Jantsch, Royal Institute of Technology Stockholm, Sweden.
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
Design-Directed Programming Martin Rinard Daniel Jackson MIT Laboratory for Computer Science.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
February 12, 2009 Center for Hybrid and Embedded Software Systems Timing-aware Exceptions for a Precision Timed (PRET)
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Retargetable Model-Based Code Generation in Ptolemy II
Timing-aware Exceptions for a Precision Timed (PRET) Target
Embedded Systems: A Focus on Time
Concurrent Models of Computation for Embedded Software
Concurrent Models of Computation
Modeling Event-Based Systems in Ptolemy II EE249 Project Status Report
Presentation transcript:

7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft Research

Zhao, Berkeley 2Ptolemy Miniconference, February 13, 2007 Distributed Real-Time Systems Multiple computers, comprising of sensors and actuators, connected on a network that act and react on events to meet timing constraints.

Zhao, Berkeley 3Ptolemy Miniconference, February 13, 2007 Related Work RTOS: prioritize tasks and trigger computation. Languages: synchronous languages: Esterel, Scade, Luster, Signal time-triggered languages and the concept of logical execution time: Simulink (RTW), Giotto. Real-Time Networking Time Triggered Protocol (MARS project) FlexRay (BMW, etc.) SAFEbus (Honeywell) deterministic message sending or guaranteed message latency clock synchronization requiring special bus-architecture

Zhao, Berkeley 4Ptolemy Miniconference, February 13, 2007 Related Work Time synchronization over standard network NTP (~ms): internet RBS (~ms): wireless network IEEE1588(~ns): Ethernet Provides a useful common notion of time for general distributed real- time systems. How to design such systems leveraging time synchronization? Event-triggered approach: more dynamic environment. PTIDES (Programming Time-Integrated Distributed Embedded Systems): Discrete-event semantics Carefully chosen relations between model time and real time. Efficient execution based on causality analysis that guarantees determinacy is preserved at runtime. Does not depends on domain specific network architectures

Zhao, Berkeley 5Ptolemy Miniconference, February 13, 2007 Discrete Event Modeling in Ptolemy II DE Director implements timed semantics to make sure ordering of time stamps be respected. Event source Time line Reactive actors Signal

Zhao, Berkeley 6Ptolemy Miniconference, February 13, 2007 Discrete Event Models DE models have been primarily used in performance modeling and simulation: Hardware systems (VHDL, Verilog) Manufacturing systems Communication networks (OPNET, NS-2) Transportation systems Stock market DDE is usually to accelerate simulation, not to implement distributed real-time systems. PTIDES uses DE as a application specification language which serves as a semantic basis for obtaining determinism in distributed real-time systems. Applications are given as distributed DE models. Certain events have their model time mapped to real time.

Zhao, Berkeley 7Ptolemy Miniconference, February 13, 2007 Example: Networked Cameras Camera has computer-controlled zoom and focus capabilities. Zoom and focus take time to set up, and the camera should not take picture during this period. The video of each camera is synchronized and time stamped All the views of some interesting moment can be played back in sequence How often a camera takes picture is also controlled by the computer. e: zoom camera at t e’: take picture at t’ If t – t’ <, then e should be dropped.

Zhao, Berkeley 8Ptolemy Miniconference, February 13, 2007 DE Model for the Example

Zhao, Berkeley 9Ptolemy Miniconference, February 13, 2007 DE Model on the Central Computer zoom in all t r = 2 tmtm v v = 2: zoom in camera.

Zhao, Berkeley 10Ptolemy Miniconference, February 13, 2007 DE Model on the Central Computer double period t r = 5.5 tmtm v v = 2: zoom in camera v > 2: change period p to (v-2)*p.

Zhao, Berkeley 11Ptolemy Miniconference, February 13, 2007 DE Model for the Cameras tmtm v tmtm 1 v

Zhao, Berkeley 12Ptolemy Miniconference, February 13, 2007 DE Model for the Cameras tmtm v tmtm v Assume d = 1

Zhao, Berkeley 13Ptolemy Miniconference, February 13, 2007 DE Model for the Cameras tmtm v Assume d = 1 tmtm v tmtm v

Zhao, Berkeley 14Ptolemy Miniconference, February 13, 2007 DE Model for the Cameras tmtm 1 v tmtm v tmtm 1 v e: zoom camera at t e’: take picture at t’ If t – t’ < =1, then e should be dropped.

Zhao, Berkeley 15Ptolemy Miniconference, February 13, 2007 DE Model for the Cameras tmtm 1 v Ex. v = 1, t m = 1: take a picture at t r = 1. v = 2, t m = 3: zoom in camera at t r = 3.

Zhao, Berkeley 16Ptolemy Miniconference, February 13, 2007 Actors bind model time to real time double period t r = 5.5 tmtm v producing an event with model time corresponding to the real time when the user input happens.

Zhao, Berkeley 17Ptolemy Miniconference, February 13, 2007 Actors bind model time to real time tmtm 1 v The Device actor producing an physical action at the real time corresponding to the model time of each input event. Input events must be made available for processing at real time strictly earlier than the model time.

Zhao, Berkeley 18Ptolemy Miniconference, February 13, 2007 Challenges in Executing the Model Not be practical nor efficient to use a centralized event queue to sort events in chronological order. Do the techniques developed for distributed DE simulation work? Conservative (Chandy and Misra) Optimistic (Time warp, Jefferson) Our approach: events only need to be processed in time-stamp order when they are causally related.

Zhao, Berkeley 19Ptolemy Miniconference, February 13, 2007 Conservative Execution of the Example tmtm v Assure no event with time stamp t m <= 3 at t r = 3 Received at real time t r > 3 Deadline missed!

Zhao, Berkeley 20Ptolemy Miniconference, February 13, 2007 Challenges in Executing the Model Not be practical nor efficient to use a centralized event queue to sort events in chronological order. Do the techniques developed for distributed DE simulation work? Conservative (Chandy and Misra) Optimistic (Time warp, Jefferson) Our approach: events only need to be processed in time-stamp order when they are causally related.

Zhao, Berkeley 21Ptolemy Miniconference, February 13, 2007 Intuition on Out of Order Execution tmtm v If there is an event with time stamp t m <= 3-d at t r <= 3-d Received by real time t r < 3-d+D tmtm ? tmtm 1 13-d ? D : is the up bound of network delay; d > D

Zhao, Berkeley 22Ptolemy Miniconference, February 13, 2007 Intuition on Out of Order Execution tmtm v D : is the up bound of network delay; d > D We can always safely process an event e at the first input of Merge by t r > t m - d + D, no matter whether there are events received at s 1 or not! (If some sub-system fails, the rest of the system can continue without being blocked.)

Zhao, Berkeley 23Ptolemy Miniconference, February 13, 2007 Relevant Dependency Analysis Relevant dependency analysis gives a formal framework for analyzing causality relationships to determine the minimal ordering constraints on processing events. It capture the idea that events only need to be processed in time-stamp order when they are causally related. Can preserve the deterministic behaviors specified in DE models without paying the penalty of totally ordered executions. Yang Zhao, Jie Liu and Edward A. Lee, "A Programming Model for Time- Synchronized Distributed Real-Time Systems", in Proceedings of the 13th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS 07), Bellevue, WA, United States, April 3-6, 2007.A Programming Model for Time- Synchronized Distributed Real-Time Systems

Zhao, Berkeley 24Ptolemy Miniconference, February 13, 2007 Causality Interface [Zhou--Lee] Causality interface of a component declares the dependency between input and output.

Zhao, Berkeley 25Ptolemy Miniconference, February 13, 2007 Causality Interface Composition

Zhao, Berkeley 26Ptolemy Miniconference, February 13, 2007 Relevant Dependency Relevant dependency on any pair of input ports p1 and p2 specifies whether an event at p1 will affect an output signal that may also depend on an event at p2.

Zhao, Berkeley 27Ptolemy Miniconference, February 13, 2007 Relevant Dependency d( p 1, p 6 ) = d means any event with time stamp t at p 2 can be processed when all events at p 1 are known up to time stamp t − d.

Zhao, Berkeley 28Ptolemy Miniconference, February 13, 2007 Relevant Order Relevant dependencies induce a partial order, called the relevant order, on events. e 1 < r e 2 means that e1 must be processed before e2. If neither e 1 < r e 2, nor e 2 < r e 1, i.e. e 1 || r e 2, then e 1, e 2 can be processed in any order. This technique can be adapted to distributed execution.

Zhao, Berkeley 29Ptolemy Miniconference, February 13, 2007 Conclusion Time synchronization can greatly change the way distributed systems are designed. Discrete-event model can be used as a programming model to explicitly specify and manipulate time relations between events. It is challenging to design distributed systems to make sure they are executable. Causality analysis can be used to determine when events can be processed out of order to improve executability and reliability. Work in progress: statically check whether a system design is executable. Implementing a runtime environment on P1000 by Agilent.