Expressing Giotto in xGiotto and related schedulability problems Class Project Presentation Concurrent Models of Computation for Embedded Software University.

Slides:



Advertisements
Similar presentations
Chapter 7: Deadlocks.
Advertisements

Separate Compilation of Hierarchical Real-Time Programs into Linear-Bounded Embedded Machine Code Arkadeb GHOSAL, UC Berkeley Christoph KIRSCH, University.
Flexible Scheduling of Software with Logical Execution Time Constraints* Stefan Resmerita and Patricia Derler University of Salzburg, Austria *UC Berkeley,
Logical Reliability of Interacting Real-Time Tasks Krishnendu Chatterjee, UC Berkeley Arkadeb Ghosal, UC Berkeley Thomas A. Henzinger, EPFL Daniel Iercan,
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
A Hierarchical Co-ordination Language for Interacting Real-time Tasks Arkadeb Ghosal, UC Berkeley Thomas A. Henzinger, EPFL Daniel Iercan, "Politehnica"
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Multiprocessor OS The functional capabilities often required in an OS for a multiprogrammed computer include the resource allocation and management schemes,
Parallel and Distributed Simulation Time Warp: Other Mechanisms.
Time Safety Checking for Embedded Programs Thomas A. Henzinger, Christoph M. Kirsch, Rupak Majumdar and Slobodan Matic.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Integrated Design and Analysis Tools for Software-Based Control Systems Shankar Sastry (PI) Tom Henzinger Edward Lee University of California, Berkeley.
1 Wednesday, June 28, 2006 Command, n.: Statement presented by a human and accepted by a computer in such a manner as to make the human feel that he is.
Esterel Overview Roberto Passerone ee249 discussion section.
Timed Simulation with Multiple Resource Schedulability Analysis Yang Zhao and Slobodan Matic University of California, BerkeleyDec 10, 2004.
Exceptions in Java Fawzi Emad Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
1 Quasi-Static Scheduling of Embedded Software Using Free-Choice Petri Nets Marco Sgroi, Alberto Sangiovanni-Vincentelli Luciano Lavagno University of.
Real-Time Kernels and Operating Systems. Operating System: Software that coordinates multiple tasks in processor, including peripheral interfacing Types.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Process Concept An operating system executes a variety of programs
CprE 458/558: Real-Time Systems
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Data Flow Analysis Compiler Design Nov. 8, 2005.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
1 Chapter 2 Problem Solving Techniques INTRODUCTION 2.2 PROBLEM SOLVING 2.3 USING COMPUTERS IN PROBLEM SOLVING : THE SOFTWARE DEVELOPMENT METHOD.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
EMBEDDED SOFTWARE Team victorious Team Victorious.
IAY 0600 Digitaalsüsteemide disain Event-Driven Simulation Alexander Sudnitson Tallinn University of Technology.
Java Threads 11 Threading and Concurrent Programming in Java Introduction and Definitions D.W. Denbo Introduction and Definitions D.W. Denbo.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
“Software” Esterel Execution (work in progress) Dumitru POTOP-BUTUCARU Ecole des Mines de Paris
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Controlling Execution Programming Right from the Start with Visual Basic.NET 1/e 8.
© S. Ramesh / Kavi Arya / Krithi Ramamritham 1 IT-606 Embedded Systems (Software) S. Ramesh Kavi Arya Krithi Ramamritham KReSIT/ IIT Bombay.
Chapter 7 Selection Dept of Computer Engineering Khon Kaen University.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Real Time Systems Real-Time Schedulability Part I.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
IAY 0600 Digital Systems Design Event-Driven Simulation VHDL Discussion Alexander Sudnitson Tallinn University of Technology.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
 Simulation enables the study of complex system.  Simulation is a good approach when analytic study of a system is not possible or very complex.  Informational,
1 Chapter 11 Global Properties (Distributed Termination)
Operational Semantics Mooly Sagiv Tel Aviv University Sunday Scrieber 8 Monday Schrieber.
Reachability Testing of Concurrent Programs1 Reachability Testing of Concurrent Programs Richard Carver, GMU Yu Lei, UTA.
Giotto Embedded Control Systems Development with Thomas A. Henzinger Ben Horowitz Christoph M. Kirsch University of California, Berkeley
Operational Semantics Mooly Sagiv Reference: Semantics with Applications Chapter 2 H. Nielson and F. Nielson
Introduction to Problem Solving Programming is a problem solving activity. When you write a program, you are actually writing an instruction for the computer.
Lecture 6: Real-Time Scheduling
Software Testing.
IAY 0600 Digitaalsüsteemide disain
HDL simulation and Synthesis (Marks16)
Software Engineering (CSI 321)
PL/SQL Scripting in Oracle:
Operating Systems CPU Scheduling.
Loop Control Structure.
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Lesson 4 Synchronous Design Architectures: Data Path and High-level Synthesis (part two) Sept EE37E Adv. Digital Electronics.
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
UNIT V Run Time Environments.
DEADLOCK.
Programming with Shared Memory Specifying parallelism
Presentation transcript:

Expressing Giotto in xGiotto and related schedulability problems Class Project Presentation Concurrent Models of Computation for Embedded Software University of California, Berkeley, USA Dec 10, 2004 Arkadeb Ghosal Joint work with Christoph M. Kirsch and Thomas A. Henzinger

10 DecProject Presentation2 Overview  Introduction  xGiotto Language Features  The LET model  Basic Constructs  Event Scoping  Event Handling  Giotto-to-xGiotto Translation  Observations and Present Status

10 DecProject Presentation3 Introduction  Languages based on Logical Execution Time (LET) for tasks  A termination event is specified on release of a task  The evaluation of a task is available only after the termination event  Giotto  Time Triggered  Periodic invocation of tasks  A mode describes a set of periodic tasks  Mode switch defines conditions to jump from one mode to another  Timed Multitasking  Event triggered  Assigns deadline for a task at the time of release  xGiotto  Event Triggered  Scoping of events

10 DecProject Presentation4 Logical Execution Time release eventtermination event active Logical Execution Time (LET) { Logical The logical and physical execution times are depicted below. The events controlling a task behavior are: Events from physical side: start preempt resume completion Events from logical side: release termination releasestartpreemptionresumecompletiontermination running { Physical

10 DecProject Presentation5 xGiotto: Basic Constructs  Reaction Blocks  Basic programming blocks in xGiotto  Consists of release statements and trigger statements along with an termination information  Releases tasks and invokes triggers  react {reaction block} until [event];  Release Statements  Tasks are released with the invocation of the reaction block  Tasks are terminated with the termination of the reaction block  release task (input ports) (output ports);  LET of the task is given by the life-span of the reaction block  Trigger Statements  Associates an event with a reaction block  The reaction block is invoked when the event occurs  when [event] reaction block;  Repetition construct using whenever  Event Scopes  A reaction block defines a scope for its events  When a reaction block is invoked (a trigger is activated)  The events of the new reaction block are enabled (active)  The events of the callee reaction block become passive (inactive)

10 DecProject Presentation6 Basic Features (cont.) react R1 { when [e2] react R2; when [e3] react R3; } until [e7]; Reaction Block Reaction Name Triggers Termination Event Events of R1: e2, e3, e7 Scope of e2, e3, e7: R1 react R1 { release t1 (i1) (o1); when [e2] react R2; when [e3] react R3; } until [e7]; Release Statement Task Name Input Port Output Port

10 DecProject Presentation7 Reactions and Triggers e4,e6 e3 e5 react R1 { when [e2] react R2; when [e3] react R3; } until [e7]; react R3 { when [e4] react R4; } until [e6]; react R4 { } until [e5]; e2,e3,e7 e6 e4 e2 e2,e7 e6 e5 e2,e7 react R2 { when [e8] react R5; } until [e9]; e2,e7e7 e8,e9 e6 e2

10 DecProject Presentation8 Tasks e4,e6 e3 e5 react R1 { when [e2] react R2; when [e3] react R3; } until [e7]; react R3 { release t1; when [e4] react R4; } until [e6]; react R4 { release t2; } until [e5]; e2,e3,e7 e6 e4 e2 e2,e7 e6 e5 e2,e7 react R2 { release t3; when [e8] react R5; } until [e9]; e2,e7e7 e8,e9 e6 e2 t1t1, t2 t1 t3  Tasks are released with the invocation of the reaction block  Tasks are terminated with the termination of the reaction block

10 DecProject Presentation9 Handling Events e4,e6 e3 e5 react R1 { when [e2] react R2; when [e3] react R3; } until [e7]; react R3 { when [e4] react R4; } until remember [e6]; react R4 { } until [e5]; e2,e3,e7 e6 e4 e2 e2,e7 e6 e2,e7 react R2 { when [e8] react R5; } until [e9]; e2,e7e7 e8,e9 e5e2 e5  A reaction block defines a scope: this implicitly denotes the scope of an event  When an active trigger is invoked, the called reaction becomes the active scope and the caller reaction, the passive scope  The event of a passive scope can be  Ignored (forget)  Postponed until its scope becomes active again (remember)

10 DecProject Presentation10 Parallelism e2 react R1 { when [e2] react R2 || R3; } until [e7]; react R3 { release t1; when [e5] react R5; } until [e9]; e2,e7 e9 e7 react R2 { release t2; when [e6] react R6; } until [e8]; e8 t1, t2 e6,e8e5,e9 react R6 { } until [e4]; e7 t1, t2 e8e5,e9 e4 e6 e4 e7 t2 e8 e4 t2 e7 e8  A trigger may invoke multiple reaction blocks in parallel.  When the trigger is invoked all the reactions become active simultaneously.  The parent block is active only when all the parallel reaction blocks have terminated.

10 DecProject Presentation11 The Program Flow Event Filter: The Event Filter implements the event scoping mechanism and filter the incoming event. It determines which event needs to be reacted upon depending upon the event qualifiers – forget, remember or asap. Reactor: The Reactor executes the specified reaction and activates new events (when/whenever/until) and activates and terminates tasks. Scheduler: The Scheduler chooses from the active tasks, a task to be executed on the given platform (CPU). Event Reaction Reactive Machine R1:call driver schedule task1 when(ever) A exit R2:call driver schedule task1 by X when(ever) Y until A exit Activate Event (when/whenever) (until) Schedule Terminate task1 task2 task3 task4 task n SchedulerEvent Filter e1e1 e2e2 e3e3 e5e5 e4e4

10 DecProject Presentation12 Program Analysis  Platform independent  Race Condition Detection  Verifying whether a port may be updated by multiple task invocations and thus leading to non-determinism  Resource Size Analysis  Predicting the run-time memory requirements for executing an xGiotto program: the bound on the size of the event filter and scopes (trigger queue size and active task set size).  Platform dependant  Schedulability Analysis  Ensuring that all the task invocations get access to the executing platform at least equal to their worst-case-execution times before their termination

10 DecProject Presentation13 Motivation  Simple Schedulability check for Giotto  If all modes are reachable, check is polynomial and is necessary  If some modes are unreachable the check is sufficient  Reachability of modes is pspace-complete  Type system  Typed E-code has simple schedulability check  Giotto compiler generates typed E-code  Interesting Sub-class of xGiotto  Time-triggered  Expressing Giotto  Syntactic characteristics of such a sub-class  Scheduling the sub-class  Extending to event-triggered systems  Schedulability check is not possible for arbitrary event

10 DecProject Presentation14 Giotto-to-xGiotto (mode) mode m period 6 task t1 period 3 task t2 period m_0 m_1 m_2 m_3 m_4 m_5

10 DecProject Presentation15 Giotto-to-xGiotto (mode switch) mode m1 period 6 task t1 period 3 task t2 period 2 switch frequency 3 mode m2 period 6 task t1 period 3 task t3 period 2 switch frequency m1_0 m1_1 m1_2 m1_3 m1_4 m1_5 m2_4 m2_5

10 DecProject Presentation16 Giotto-to-xGiotto (?) All Giotto programs cannot be expressed in xGiotto in its present form mode m1 period 6 task t1 period 6 task t2 period 3 switch frequency 2 mode m2 period 12 task t1 period 6 task t3 period 4 switch frequency 3 Giotto programs with all modes releasing a task of frequency one and/ or releasing a a set of harmonic tasks can be expressed No cyclic calls Termination Events are finite

10 DecProject Presentation17 Proposed modifications  No parallel construct  All triggers with same event will be enabled simultaneously  Out-of-scope activation  Trigger events with immediate form  Modification of until event  Extending to termination event and continuation event  Tasks terminate by termination event  Parallel reaction blocks can be released at continuation event  Constraints on parallelism react M12 until 3 continue 2; react M2 until 2 continue 1; react M1 until 3 continue 1; react M2 until 2 continue 2;

10 DecProject Presentation18 Proposed Modifications (cont.) react m1_0 until 6 continue 3; if (sw12) { react {} until 1; react m2_5 until 2; } else react m1_1 until 3; react m1_0 until 6 continue 4; if (sw21) { react {} until 2; } else { react m1_2 until 4 continue 2; react m1_3 until 6 continue 2; if (sw21) { react {} until 1; if (sw12) { react {} until 1; react m2_5 until 2; } else react m1_1 until 3; } else { react m1_4 until 4; } /* main */ if (mode = m1) react m1; if (mode = m2) react m2;

10 DecProject Presentation19 Schedulability  Sub-class under study  Time triggered, all events remembered, all children terminates before their parent (span of a node is never extended)  Sub-class that can express Giotto  Composability  Two parallel reaction blocks should be schedulable independent of each other  Reaction Dependency Graph  A Graph denoting the calling pattern of the reaction blocks  For time-triggered programs the exact pattern can be derived  An efficient way to describe the size of the program

10 DecProject Presentation20 Schedulability (cont.)  Horn’s algorithm  Given a set of aperiodic tasks with their release time, termination time and worst-case-execution-time determines the schedulability  Provides an EDF based scheduling strategy  EDF is optimal for such a task pattern  Efficient pruning of conditional branches  Utilization test  Syntactic constraints t1t2t3t4t5 Release Time Termination Time Worst-case Execution-time 23123

10 DecProject Presentation21 Thank You !