3 Unit Course, Spring 2001 EECS Department, UC Berkeley Embedded Software Engineering www.eecs.berkeley.edu/~fresco/giotto/course Christoph Kirsch.

Slides:



Advertisements
Similar presentations
A Hierarchical Co-ordination Language for Interacting Real-time Tasks Arkadeb Ghosal, UC Berkeley Thomas A. Henzinger, EPFL Daniel Iercan, "Politehnica"
Advertisements

Timed Automata.
Leveraging Synchronized Clocks in Distributed Applications Edward A. Lee Robert S. Pepper Distinguished Professor UC Berkeley Swarm Lab Retreat January.
Time Safety Checking for Embedded Programs Thomas A. Henzinger, Christoph M. Kirsch, Rupak Majumdar and Slobodan Matic.
The Fixed Logical Execution Time (FLET) Assumption Tom Henzinger University of California, Berkeley.
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Automatic Verification of Component-Based Real-Time CORBA Applications Gabor Madl Sherif Abdelwahed
Fault-Tolerant Real-Time Networks Tom Henzinger UC Berkeley MURI Kick-off Workshop Berkeley, May 2000.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
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.
Systems Engineering for Automating V&V of Dependable Systems John S. Baras Institute for Systems Research University of Maryland College Park
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.
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.
From Models to Code: The Missing Link in Embedded Software Tom Henzinger University of California, Berkeley Joint work with Ben Horowitz and Christoph.
1 of 30 June 14, 2000 Scheduling and Communication Synthesis for Distributed Real-Time Systems Paul Pop Department of Computer and Information Science.
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.
Mixing Models of Computation Jie Liu Palo Alto Research Center (PARC) 3333 Coyote Hill Rd., Palo Alto, CA joint work with Prof. Edward.
1 of 16 March 30, 2000 Bus Access Optimization for Distributed Embedded Systems Based on Schedulability Analysis Paul Pop, Petru Eles, Zebo Peng Department.
Models of Computation for Embedded System Design Alvise Bonivento.
Expressing Giotto in xGiotto and related schedulability problems Class Project Presentation Concurrent Models of Computation for Embedded Software University.
Real-Time Systems and Programming Languages
Run-Time Models for Measurement & Control Systems and Their Support in Ptolemy II Jie Liu EECS, UC Berkeley 9/13/2000 Agilent Technologies.
1 of 14 1 Analysis and Synthesis of Communication-Intensive Heterogeneous Real-Time Systems Paul Pop Computer and Information Science Dept. Linköpings.
Giotto A Time-Triggered Language for Embedded Programming Thomas A. Henzinger, Benjamin Horowitz Christoph M. Kirsch, Rupak Majumdar UC Berkeley.
NSF Foundations of Hybrid and Embedded Software Systems UC Berkeley: Chess Vanderbilt University: ISIS University of Memphis: MSI A New System Science.
Courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building.
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.
Interfaces for Control Components Rajeev Alur University of Pennsylvania Joint work with Gera Weiss (and many others)
7th Biennial Ptolemy Miniconference Berkeley, CA February 13, 2007 PTIDES: A Programming Model for Time- Synchronized Distributed Real-time Systems Yang.
Verifying Distributed Real-time Properties of Embedded Systems via Graph Transformations and Model Checking Gabor Madl
Designing Predictable and Robust Systems Tom Henzinger UC Berkeley and EPFL.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
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.
EMBEDDED SOFTWARE Team victorious Team Victorious.
Niranjan Rao Julapelly Real-Time Scheduling [ Chapter 5.5]
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Advanced Operating Systems CIS 720 Lecture 1. Instructor Dr. Gurdip Singh – 234 Nichols Hall –
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.
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 of 14 1/15 Synthesis-driven Derivation of Process Graphs from Functional Blocks for Time-Triggered Embedded Systems Master thesis Student: Ghennadii.
Real Time Auction System Metex Systems Inc.. Inside the UML The Problem Auctioning in real time over the Web requires that many people connect and participate.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Aravind Venkataraman. Topics of Discussion Real-time Computing Synchronous Programming Languages Real-time Operating Systems Real-time System Types Real-time.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
Copyright 1999 G.v. Bochmann ELG 7186B ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
CS4730 Real-Time Systems and Modeling Fall 2010 José M. Garrido Department of Computer Science & Information Systems Kennesaw State University.
CS244-Introduction to Embedded Systems and Ubiquitous Computing Instructor: Eli Bozorgzadeh Computer Science Department UC Irvine Winter 2010.
Lecture 2, CS52701 The Real Time Computing Environment I CS 5270 Lecture 2.
1 of 14 1/15 Schedulability-Driven Frame Packing for Multi-Cluster Distributed Embedded Systems Paul Pop, Petru Eles, Zebo Peng Embedded Systems Lab (ESLAB)
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
T imed Languages for Embedded Software Ethan Jackson Advisor: Dr. Janos Szitpanovits Institute for Software Integrated Systems Vanderbilt University.
Giotto Embedded Control Systems Development with Thomas A. Henzinger Ben Horowitz Christoph M. Kirsch University of California, Berkeley
Embedded System Design and Development Introduction to Embedded System.
Embedded Control System Development with Giotto Thomas A. Henzinger, Benjamin Horowitz, Christoph Meyer Kirsch UC Berkeley.
Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)
Real-Time Operating Systems RTOS For Embedded systems.
REAL-TIME OPERATING SYSTEMS
מעבדה במערכות משובצות ד"ר מרינה ליפשטיין דוא"ל:
Gabor Madl Ph.D. Candidate, UC Irvine Advisor: Nikil Dutt
Real-Time Process Scheduling Concepts, Design and Implementations
Presentation transcript:

3 Unit Course, Spring 2001 EECS Department, UC Berkeley Embedded Software Engineering Christoph Kirsch

It’s significant

It’s tricky

It’s risky

It’s fun

Problem Real-Time Computer System Controlled Object Operator Man-Machine Interface Instrumentation Interface Kopetz97 Methodologies for the implementation of embedded real-time applications Methodology: tool-supported, logical, compositional Implementation: compositional, scalable, dependable

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Microcontroller Market Cost Performance

Mechatronics Fly-by-wire Drive-by-wire

Engine Controller Temporal accuracy of 3μsec Up to 100 concurrent software tasks Hard real-time: no missed 6000rpm, 10ms for 360º 0.1°

Video Streaming 25 frames/sec Dynamic resource allocation Soft real-time: degraded QoS

Real-Time Systems CharacteristicsHardSoft Response timeHard-requiredSoft-desired Peak-load performance PredictableDegraded Control of paceEnvironmentComputer RedundancyActiveCheckpoint Error detectionAutonomousUser assisted Kopetz97

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Concurrency Task1Task2 Host Network Message1 Message2 In addition: Other resource constraints Time constraints

Real-Time Not later than Time Time-instantDeadline for

Real-Time Task fInputOutput Worst case execution time

Real-Time Scheduling terminateactivate PassiveActivation Active

Off-Line Scheduling terminateactivate PassiveTable Active Static System

On-Line Scheduling terminateactivate PassiveAlgorithm Active Dynamic System

Non-Preemptive Scheduling ReadyRun schedule terminateactivate PassiveActivation

Preemptive Scheduling ReadyRun schedule terminateactivate PassiveActivation preempt

Shared Resources ReadyRun Wait schedule preempt terminate busyfree activate PassiveActivation

Scheduling Problem Real-Time Scheduling SoftHard Off-lineOn-line PreemptiveNon-preemptive Preemptive

Earliest Due Date Time Processors P1P1 T1T1 T5T5 10 T1T1 T2T2 T3T3 T4T4 T5T5 CiCi didi T3T3 T4T4 T2T2 d1d1 d5d5 d3d3 d4d4 d2d2 Buttazzo97

Earliest Deadline First Time Tasks T1T1 T5T5 10 T1T1 T2T2 T3T3 T4T4 T5T5 aiai CiCi didi T3T3 T4T4 T2T2 T2T2 T4T4 Buttazzo97

Real-Time Periodic Task fInputOutput Worst case execution time Frequency

Rate Monotonic Analysis Time Tasks T1T1 10 T1T1 T2T2 CiCi 21 pipi 5 T2T2 T2T2 T1T1 T1T1 T1T1

Scheduling Anomalies T1T1 T9T9 T4T4 T8T8 T7T7 T6T6 T5T5 Time Processors P1P1 P2P2 P3P3 T1T1 T2T2 T3T3 T4T4 T6T6 T7T7 T9T9 12 T5T5 T8T8

Shorter Computation Times T1T1 T9T9 T4T4 T8T8 T7T7 T6T6 T5T5 Time Processors P1P1 P2P2 P3P3 T1T1 T2T2 T3T3 T4T4 T6T6 T7T7 T9T9 13 T5T5 T8T8

More Processors T1T1 T9T9 T4T4 T8T8 T7T7 T6T6 T5T5 Time Processors P1P1 P2P2 P3P3 P4P4 T1T1 T2T2 T3T3 T4T4 T5T5 T6T6 T7T7 T8T8 T9T9 15

Weaker Precedence T1T1 T9T9 T4T4 T6T6 T5T5 Time Processors P1P1 P2P2 P3P3 T1T1 T2T2 T3T3 T4T4 T7T7 T8T8 T9T9 16 T5T5 T6T6

Real-Time Communication Network Message1 Message2

Real-Time Message mSourceTarget Latency

Explicit Flow Control Network Message1 Message2 Send time not known a priori Sender can detect errors

Implicit Flow Control Network Message1 Message2 Send time is known a priori Receiver can detect errors

Explicit Flow Control: Priority Network Message1 Message2 Medium-Access Protocols: CSMA/CD - LON, Echelon 1990 CSMA/CA - CAN, Bosch 1990 FTDMA - Byteflight, BMW 2000 TDMA - TTP, Kopetz 1993

Control Area Network M1M1 M2M2 Time Messages M2M2 M1M

Implicit Flow Control: Time Network Message1 Message2 Medium-Access Protocols: FTDMA - Byteflight, BMW 2000 TDMA - TTP, Kopetz 1993

Time-Triggered Protocol M1M1 M2M2 Time Network N1N1 M1M1 M2M2 Slot 1 Slot 2

Literature RT scheduling: –Hard Real-Time Computing Systems: Predictable Scheduling Algorithms and Applications. G. Buttazzo. Kluwer, RT communication: –Real-Time Systems – Design Principles for Distributed Embedded Applications. H. Kopetz. Kluwer, –Byteflight, CAN papers.

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Concurrency ControlData Task1Task2Task1Task2 Parallel CompositionI/O Decomposition

Control Operators ParallelChoice Sequential Loop

Real-Time State Time EventFrequency Time Change of state Function

Real World Time Data

Discrete Data Time d0d0 d1d1 d2d2 Data d3d3

State Time State 1 d0d0 State 2 Data State 0 d1d1 d2d2 d0d0 d1d1 d1d1 d2d2 d2d2 d3d3 d3d3

Continuous Time Time Interval Start EventTerminating Event t1t1 t2t2 State 1 Data

Digital Clock Time Data Granule t1t1 t2t2 Clock 1/(t2-t1) Hz

Discrete Time Time Data t1t1 t2t2 State 1

Event-Triggered (ET) System Time Data Change of state

Time-Triggered (TT) System Time Data Clock tick

Esterel - Giotto Esterel: –Synchronous reactive language –Event-triggered semantics Giotto: –Time-triggered semantics –Distributed platforms

Esterel: Operators Choice:Parallel: P || Qpresent S then P else Q Sequential: P ; QPQ P Q P Q

Esterel: Event Event: Time emit S Loop: loop P each SP await S

Event - Reaction fEventReaction

Esterel: Controller module normal: input A, B, R; output O; loop [ await A || await B ]; emit O each R end module R?R? R?R?R?R? A?.~R?.O! A?.~R?B?.~R? B?.~R?.O! A?.B?.~R?.O!

Giotto: Operators Choice:Parallel: ModeProgram Sequential: Task

Giotto: Time Sequential: Task Time InputOutput

Sensor - Control Law - Actuator fSensorsActuators

Giotto: Helicopter Control mode normal ( ) period 20ms { taskfreq 1 do servo = Control ( position ) ; taskfreq 4 do position = Navigation ( GPS, position ) ; }

50Hz Semantics Task 200Hz msec

Input Task msec

Computation Task msec Control LawNavigation Integrator

Output Task msec

Literature Esterel: –The Foundations of Esterel. G. Berry. In Proof, Language and Interaction: Essays in Honour of Robin Milner. G. Plotkin, C. Stirling and M. Tofte, editors. MIT Press, –Synchronous programming of reactive systems. N. Halbwachs. Kluwer, Giotto: –Embedded Control System Development with Giotto. B. Horowitz, T. Henzinger, C. Kirsch –Giotto: A Time-Triggered Language for Embedded Programming. B. Horowitz, T. Henzinger, C. Kirsch

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Concurrency Task1Task2Task1Task2 Parallel CompositionI/O Decomposition Task1Task2; Task1; Task2 Task1

Real-Time Task1Task2;;Task1Task3Task2Task1; Time Event DeadlineTime Frequency

50Hz Helicopter Control Task 200Hz msec

Read Task msec Input

Write Task msec Output

Worst Case Execution Time Task msec Control LawNavigation Integrator

Deadline Task msec

Code Task msec

Literature Some compiler books: –Compilers, Principles, Techniques, and Tools. A.V. Aho, R. Sethi, J.D. Ullman. Addison- Wesley, –Compiler Design. R. Wilhelm, D. Maurer. Addison- Wesley, 1995.

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Real-Time Task fInputOutput Worst case execution time

Type Abstract Data Type Interface: Set of methods

Empty Abstract Interface Interface: Set of methods

Application-dependent Framework Application-dependent Application-independent

? Type vs. Task Interface: Set of methods InputOutput

Literature Patterns & Frameworks: –Design Patterns: Elements of Reusable Object Oriented Software. E. Gamma, J. Vlissides, R. Johnson, R. Helm. Addison Wesley, –Design Patterns for Object-Oriented Software Development. W. Pree, E. Gamma. Addison Wesley, 1995.

Embedded Programming …requires the integration of: 1.Real-time scheduling/communication concepts 2.Programming language design 3.Compiler design 4.Classical software engineering techniques 5.Formal methods

Formal Verification Time SafetyLiveness Control Data Safety: Wrong things never happen! Liveness: Something useful will happen eventually! Property Space

Language Hierarchy Design Model Program Executable Non-Deterministic synthesizeanalyze compile expand Deterministic Sequential Universal Macros Automata Code Machine

Non-Determinism ParallelChoice Sequential Non-Determinism A E Programming OperatorsModeling Operator

Esterel: Verification EsterelProperty Automata Esterel Abstraction“Bisimulation” Model Checking

Esterel: Hierarchy Design Model Esterel Executable Bisimulation compile Non-Det. Automata Deterministic Code Sequential Circuit Model Checking

Giotto: Verification GiottoProperty MasaccioAutomata Masaccio Model Checking Abstraction“Refinement”

Giotto: Hierarchy ? Masaccio Giotto Executable synthesizeRefinement compile expand Hybrid Modules Deterministic Code Seq. Stack Machine Model Checking

Giotto: Hierarchy

Literature Esterel: Giotto: –T.A. Henzinger. Masaccio: A Formal Model for Embedded Components. LNCS 1872, Springer, 2000, pp

End