Embedded Software: Building the Foundations Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center for Hybrid and Embedded Software.

Slides:



Advertisements
Similar presentations
Concurrent Computational Systems Edward A. Lee Professor, UC Berkeley Ptolemy Project CHESS: Center for Hybrid and Embedded Software Systems University.
Advertisements

DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
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: Programming Temporally Integrated Distributed Embedded Systems Yang Zhao, EECS, UC Berkeley Edward A. Lee, EECS, UC Berkeley Jie Liu, Microsoft.
Process-Based Software Components for Networked Embedded Systems Edward A. Lee, PI UC Berkeley Core Technical Team (Mobies, SEC, and GSRC): Christopher.
Center for Hybrid and Embedded Software Systems College of Engineering, University of California at Berkeley Presented by: Edward A. Lee, EECS, UC Berkeley.
Component Technologies for Embedded Systems Johan Eker.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Causality Interfaces for Actor Networks Ye Zhou and Edward A. Lee University of California,
SRC ETAB Summer Study Colorado Springs, June 25-26, 2001 Model-Based Approaches to Embedded Software Design Edward A. Lee UC Berkeley & GSRC.
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.
February 21, 2008 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, UC Berkeley.
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.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley Behavioral Types for Actor-Oriented Design Edward A. Lee.
Behavioral Types as Interface Definitions for Concurrent Components Center for Hybrid and Embedded Software Systems Edward A. Lee Professor UC Berkeley.
Building Unreliable Systems out of Reliable Components: The Real Time Story Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center.
February 11, 2010 Center for Hybrid and Embedded Software Systems Ptolemy II - Heterogeneous Concurrent Modeling and Design.
Chess Review October 4, 2006 Alexandria, VA Edited and presented by Advanced Tool Architectures Edward A. Lee UC Berkeley.
Heterogeneous Modeling and Design in Ptolemy II Johan Eker UC Berkeley with material courtesy of Edward Lee and the Ptolemy group ECE Seminar Series, Carnegie.
Modeling Heterogeneous Systems Edward Lee UC Berkeley Design for Safety Workshop NASA Ames Research Center Mountain View, CA 11 October, Design.
February 23, 2012 Center for Hybrid and Embedded Software Systems Organization Board of Directors Edward A. Lee, EECS Thomas.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
The Case for Precision Timed (PRET) Machines Edward A. Lee Professor, Chair of EECS UC Berkeley With thanks to Stephen Edwards, Columbia University. National.
Building Unreliable Systems out of Reliable Components: The Real Time Story Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center.
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.
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.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 Cyber-Physical Systems: A Vision of the Future Edward A. Lee Robert S. Pepper Distinguished.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
Understandable Concurrency Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS Director, CHESS: Center for Hybrid and Embedded Software Systems.
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.
MoBIES Working group meeting, September 2001, Dearborn Ptolemy II The automotive challenge problems version 4.1 Johan Eker Edward Lee with thanks.
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
State of the Art Lecture IEEE Instrumentation and Measurement Technology Conference Budapest, Hungary, May 21-23, 2001 Computing for Embedded Systems Edward.
Embedded Software: Leveraging Concurrent Models of Computation Edward A. Lee Professor, UC Berkeley Center for Hybrid and Embedded Software Systems (CHESS)
5 th Biennial Ptolemy Miniconference Berkeley, CA, May 9, 2003 The Component Interaction Domain: Modeling Event-Driven and Demand- Driven Applications.
Embedded Software Challenges for the Next 10 Years Chess: Center for Hybrid and Embedded Software Systems Infineon Embedded Software Days Munich, Sept.
Panel: What Comes After C++ in System-Level Specification Edward Lee UC Berkeley Forum on Design Languages Workshop on System Specification & Design Languages.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
Concurrent Models of Computation Edward A. Lee Professor, UC Berkeley Ptolemy Project CHESS: Center for Hybrid and Embedded Software Systems HP Workshop.
Department of Electrical Engineering and Computer Sciences University of California at Berkeley The Ptolemy II Framework for Visual Languages Xiaojun Liu.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Universität Dortmund Actual design flows and tools.
Composing Models of Computation in Kepler/Ptolemy II
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.
Actor Networks Edward A. Lee Robert S. Pepper Distinguished Professor Chair of EECS UC Berkeley Invited Talk Workshop Foundations and Applications of Component-based.
Incremental Checkpointing with Application to Distributed Discrete Event Simulation Thomas Huining Feng and Edward A. Lee {tfeng,
What’s Ahead for Embedded Software? (Wed) Gilsoo Kim
February 14, 2013 Center for Hybrid and Embedded Software Systems Organization Faculty Edward A. Lee, EECS Alberto Sangiovanni-Vincentelli,
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
TRUST:Team for Research in Ubiquitous Secure Technologies
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Retargetable Model-Based Code Generation in Ptolemy II
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
An overview of the CHESS Center
Embedded Systems: A Focus on Time
Ptolemy II - Heterogeneous Concurrent Modeling and Design in Java
Concurrent Models of Computation for Embedded Software
An overview of the CHESS Center
Concurrent Models of Computation
Presentation transcript:

Embedded Software: Building the Foundations Edward A. Lee Professor, Chair of EE, and Associate Chair of EECS CHESS: Center for Hybrid and Embedded Software Systems UC Berkeley BEARS Conference Berkeley EECS Annual Research Symposium February 10, 2005 Berkeley, CA

Lee, Berkeley 2 Abstract Embedded software has traditionally been thought of as "software on small computers." In this traditional view, the principal problem is resource limitations (small memory, small data word sizes, and relatively slow clocks). Solutions emphasize efficiency; software is written at a very low level (in assembly code or C), operating systems with a rich suite of services are avoided, and specialized computer architectures such as programmable DSPs and network processors are developed to provide hardware support for common operations. These solutions have defined the practice of embedded software design and development for the last 25 years or so. However, thanks to the semiconductor industry's ability to follow Moore's law, the resource limitations of 25 years ago should have almost entirely evaporated today. Why then has embedded software design and development changed so little? It may be that extreme competitive pressure in products based on embedded software, such as consumer electronics, rewards only the most efficient solutions. This argument is questionable, however, since there are many examples where functionality has proven more important than efficiency. In this talk, we argue that resource limitations are not the only defining factor for embedded software, and may not even be the principal factor. Instead, the dominant factors are much higher reliability requirements than for desktop software, greater concurrency, and tighter timing requirements. These differences drive the technology towards different techniques than those that have been applied in conventional computer software. In this talk, we explore those techniques and map out a research agenda for embedded software.

Lee, Berkeley 3 Are Resource Limitations the Key Defining Factor for Embedded Software? small memory small data word sizes relatively slow clocks To deal with these problems, emphasize efficiency: write software at a low level (in assembly code or C) avoid operating systems with a rich suite of services develop specialized computer architectures programmable DSPs network processors This is how embedded SW has been designed for 25 years

Lee, Berkeley 4 Why hasn’t Moore’s law changed all this in 25 years?

Lee, Berkeley 5 Hints that Embedded SW Differs Fundamentally from General Purpose SW time matters “as fast as possible” is not good enough concurrency is intrinsic it’s not an illusion object-oriented techniques are rarely used classes and inheritance dynamic binding processors avoid memory hierarchy virtual memory dynamically managed caches memory management is avoided allocation/de-allocation garbage collection To be fair, there are some applications that use some of these techniques: e.g. Java in cell phones, but mainly providing the services akin to general purpose software.

Lee, Berkeley 6 Current fashion – Pay Attention to “Non-functional properties” Time Security Fault tolerance Power consumption Memory management But the formulation of the question is very telling: How is it that when a braking system applies the brakes is any less a function of the braking system than how much braking it applies?

Lee, Berkeley 7 What about “real time”? Make it faster! What if you need “absolutely positively on time” (APOT)? Need to rethink everything: hardware architecture, software abstractions, etc.

Lee, Berkeley 8 Prioritize and Pray! Real-Time Multitasking?

Lee, Berkeley 9 Standard Software Abstraction (20-th Century Computation) initial state final state sequence f : State  State Time is irrelevant All actions are ordered Alan Turing

Lee, Berkeley 10 Standard Software Abstraction: Processes or Threads suspend Infinite sequences of state transformations are called “processes” or “threads” The operating system (typically) provides: suspend/resume mutual exclusion semaphores resume

Lee, Berkeley 11 stalled for rendezvous stalled by precedence race condition Standard Software Abstraction: Concurrency via Interacting Threads Potential for race conditions, deadlock, and livelock severely compromises software reliability. These methods date back to the 1960’s (Dijkstra).

Lee, Berkeley 12 A Stake in the Ground Nontrivial concurrent programs based on threads, semaphores, and mutexes are incomprehensible to humans. No amount of process improvement is going to change this. the human brain doesn’t work this way. Formal methods may help scalability? understandability? Better concurrency abstractions will help more

Lee, Berkeley 13 What it Feels Like to Use the synchronized Keyword in Java Image “borrowed” from an Iomega advertisement for Y2K software and disk drives, Scientific American, September 1999.

Lee, Berkeley 14 Diagnosis: Interacting Threads are Not Compositional An aggregation of threads is not a thread. What is it? Many software failures are due to this ill- defined composition.

Lee, Berkeley 15 Better Concurrency Models Better concurrency models exist. We are building the foundations of a family of such models that we call actor-oriented models. Semantics of distributed discrete-event systems Process networks & algebras Hybrid systems Models and meta models for model-integrated computing

Lee, Berkeley 16 What is an Actor-Oriented MoC? Actor oriented: actor name data (state) ports Input data parameters Output data What flows through an object is streams of data class name data methods call return What flows through an object is sequential control Traditional component interactions:

Lee, Berkeley 17 Ptolemy II: A Laboratory for Experimenting with Actor-Oriented Models of Computation Director from a library defines component interaction semantics Large, domain-polymorphic component library. Basic Ptolemy II infrastructure: Visual editor supporting an abstract syntax Type system for transported data

Lee, Berkeley 18 Models of Computation Implemented in Ptolemy II CI – Push/pull component interaction Click – Push/pull with method invocation CSP – concurrent threads with rendezvous CT – continuous-time modeling DE – discrete-event systems DDE – distributed discrete events DDF – Dynamic dataflow DPN – distributed process networks DT – discrete time (cycle driven) FSM – finite state machines Giotto – synchronous periodic GR – 2-D and 3-D graphics PN – process networks SDF – synchronous dataflow SR – synchronous/reactive TM – timed multitasking Most of these are actor oriented.

Lee, Berkeley 19 Models of Computation Implemented in Ptolemy II CI – Push/pull component interaction Click – Push/pull with method invocation CSP – concurrent threads with rendezvous CT – continuous-time modeling DE – discrete-event systems DDE – distributed discrete events DDF – Dynamic dataflow DPN – distributed process networks DT – discrete time (cycle driven) FSM – finite state machines Giotto – synchronous periodic GR – 2-D and 3-D graphics PN – process networks SDF – synchronous dataflow SR – synchronous/reactive TM – timed multitasking

Lee, Berkeley 20 Example Model of Computation: Discrete Events (DE) DE Director implements timed semantics using an event queue Event source Time line Reactive actors Signal

Lee, Berkeley 21 Semantics Clears Up Subtleties: E.g. Simultaneous Events By default, an actor produces events with the same time as the input event. But in this example, we expect (and need) for the BooleanSwitch to “see” the output of the Bernoulli in the same “firing” where it sees the event from the PoissonClock. Events with identical time stamps are also ordered, and reactions to such events follow data precedence order.

Lee, Berkeley 22 Semantics Clears Up Subtleties: E.g. Feedback Data precedence analysis has to take into account the non-strictness of this actor (that an output can be produced despite the lack of an input).

Lee, Berkeley 23 Semantics Clears Up Subtleties: E.g. Zeno Systems DE systems may have an infinite number of events in a finite amount of time. Carefully constructed semantics gives these systems meaning.

Lee, Berkeley 24 A Rough Sense of Discrete-Event Semantics: Metric Space Formulation Cantor metric: where  is the earliest time where x and y differ.  x y The set of signals with this metric form a complete metric space. Generalizations of this metric handle multiple events at the same time.

Lee, Berkeley 25 Causality in DE Causal: Strictly causal: Delta causal: A delta-causal component is a “contraction map.”

Lee, Berkeley 26 Fixed Point Theorem (Banach Fixed Point Theorem) Let (S n = [T  V ] n, d ) be a complete metric space and f : S n  S n be a delta causal function. Then f has a unique fixed point, and for any point s  S n, the following sequence converges to that fixed point: s 1 = s, s 2 = f (s 1 ), s 3 = f (s 2 ), … This means no Zeno! Current work: Other formulations (using generalized ultrametric spaces, ordinals, and posets) give meaning to a broader class of systems.

Lee, Berkeley 27 Application of DE Modeling Wireless Sensor Nets in VisualSense VisualSense extends the Ptolemy II discrete- event domain with communication between actors representing sensor nodes being mediated by a channel, which is another actor. The example at the left shows a grid of nodes that relay messages from an initiator (center) via a channel that models a low (but non- zero) probability of long range links being viable.

Lee, Berkeley 28 Example of Current Research Challenges Use distributed discrete-event systems as a timed model of computation for embedded software in unreliable, sporadically connected networks, such as wireless sensor networks. The most interesting possibilities are based on distributed consensus algorithms (as in Croquet, Reed, Lamport). Research challenges include: Defining the semantics Combining the semantics heterogeneously with others. E.g.: Signal processing for channel modeling TinyOS for node functionality Creating efficient runtime environments Building the design environment

Lee, Berkeley 29 Conclusion Threads are a poor concurrent MoC There are many better concurrent MoCs The ones we know are the tip of the iceberg Ptolemy II is a lab for experimenting with them This is a rich research area.