Undoing the Task: Moving Timing Analysis back to Functional Models Marco Di Natale, Haibo Zeng Scuola Superiore S. Anna – Pisa, Italy McGill University.

Slides:



Advertisements
Similar presentations
UNIT 8: Synthesis Basics
Advertisements

Simulation of Feedback Scheduling Dan Henriksson, Anton Cervin and Karl-Erik Årzén Department of Automatic Control.
Introduction to Embedded Systems Resource Management - III Lecture 19.
Yaron Doweck Yael Einziger Supervisor: Mike Sumszyk Spring 2011 Semester Project.
Explicit Preemption Placement for Real- Time Conditional Code via Graph Grammars and Dynamic Programming Bo Peng, Nathan Fisher, and Marko Bertogna Department.
Timed Automata.
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.
MotoHawk Training Model-Based Design of Embedded Systems.
Automatic Verification of Component-Based Real-Time CORBA Applications Gabor Madl Sherif Abdelwahed
Event Driven Real-Time Programming CHESS Review University of California, Berkeley, USA May 10, 2004 Arkadeb Ghosal Joint work with Marco A. Sanvido, Christoph.
Abhijit Davare 1, Qi Zhu 1, Marco Di Natale 2, Claudio Pinello 3, Sri Kanajan 2, Alberto Sangiovanni-Vincentelli 1 1 University of California, Berkeley.
Architecture Modeling and Analysis for Embedded Systems Oleg Sokolsky CIS700 Fall 2005.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
DISTRIBUTED CONSISTENCY MANAGEMENT IN A SINGLE ADDRESS SPACE DISTRIBUTED OPERATING SYSTEM Sombrero.
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
Chapter 13 Embedded Systems
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.
VHDL Intro What does VHDL stand for? VHSIC Hardware Description Language VHSIC = Very High Speed Integrated Circuit Developed in 1982 by Govt. to standardize.
(Page 554 – 564) Ping Perez CS 147 Summer 2001 Alternative Parallel Architectures  Dataflow  Systolic arrays  Neural networks.
4/10/20081 Lab 9 RT methodology introduction Register operations Data Path Control Path ASM Example TA: Jorge Crichigno.
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.
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.
CprE 458/558: Real-Time Systems
A. Frank - P. Weisberg Operating Systems Introduction to Tasks/Threads.
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
MOBIES Project Progress Report Engine Throttle Controller Design Using Multiple Models of Computation Edward Lee Haiyang Zheng with thanks to Ptolemy Group.
A Tool for Describing and Evaluating Hierarchical Real-Time Bus Scheduling Policies Author: Trevor Meyerowitz, Claudio Pinello, Alberto DAC2003, June 24,2003.
Problem Background Motivation Design a task and bus scheduling tool that works with the automotive design process and captures the constraints that the.
DATE Optimizations of an Application- Level Protocol for Enhanced Dependability in FlexRay Wenchao Li 1, Marco Di Natale 2, Wei Zheng 1, Paolo Giusto.
BRASS Analysis of QuasiStatic Scheduling Techniques in a Virtualized Reconfigurable Machine Yury Markovskiy, Eylon Caspi, Randy Huang, Joseph Yeh, Michael.
1 Correct and efficient implementations of synchronous models on asynchronous execution platforms Stavros Tripakis UC Berkeley and Verimag EC^2 Workshop,
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
EECE **** Embedded System Design
Transformation of Timed Automata into Mixed Integer Linear Programs Sebastian Panek.
Operating Systems. Definition An operating system is a collection of programs that manage the resources of the system, and provides a interface between.
Hardware/Software Co-design Design of Hardware/Software Systems A Class Presentation for VLSI Course by : Akbar Sharifi Based on the work presented in.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Natallia Kokash (Accepted for PACO’2011) ACG, 31/05/ Input-output conformance testing for channel-based connectors 1.
Fall 2004EE 3563 Digital Systems Design EE 3563 VHSIC Hardware Description Language  Required Reading: –These Slides –VHDL Tutorial  Very High Speed.
Stateflow Toolbox  Stateflow ® is an environment for modeling and simulating combinatorial and sequential decision logic based on state machines and.
6. A PPLICATION MAPPING 6.3 HW/SW partitioning 6.4 Mapping to heterogeneous multi-processors 1 6. Application mapping (part 2)
End-To-End Scheduling Angelo Corsaro & Venkita Subramonian Department of Computer Science Washington University Distributed Systems Seminar, Spring 2003.
Processor Architecture
Module 2 Overview of Real Time System Scheduling
CSCI1600: Embedded and Real Time Software Lecture 33: Worst Case Execution Time Steven Reiss, Fall 2015.
Multiprocessor Fixed Priority Scheduling with Limited Preemptions Abhilash Thekkilakattil, Rob Davis, Radu Dobrin, Sasikumar Punnekkat and Marko Bertogna.
04/26/20031 ECE 551: Digital System Design & Synthesis Lecture Set : Introduction to VHDL 12.2: VHDL versus Verilog (Separate File)
Lecture 2, CS52701 The Real Time Computing Environment I CS 5270 Lecture 2.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Slides created by: Professor Ian G. Harris Operating Systems  Allow the processor to perform several tasks at virtually the same time Ex. Web Controlled.
Istituto di Tecnologie della Comunicazione dell’Informazione e della Percezione Explicit Preemption Point (EPP) placement for conditional code Marko Bertogna.
 Operating system.  Functions and components of OS.  Types of OS.  Process and a program.  Real time operating system (RTOS).
CHaRy Software Synthesis for Hard Real-Time Systems
Towards a framework for architectural design decision support
Advanced Operating Systems CIS 720
Albert M. K. Cheng Embedded Real-Time Systems
ESE532: System-on-a-Chip Architecture
CSCI1600: Embedded and Real Time Software
Shanna-Shaye Forbes Ben Lickly Man-Kit Leung
Peter Poplavko, Saddek Bensalem, Marius Bozga
P. Poplavko, D. Socci, R. Kahil, M. Bozga, S. Bensalem
Limited-Preemption Scheduling of Sporadic Tasks Systems
Chapter 4: Threads.
Foundations and Definitions
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Undoing the Task: Moving Timing Analysis back to Functional Models Marco Di Natale, Haibo Zeng Scuola Superiore S. Anna – Pisa, Italy McGill University – Montreal, Canada 3rd International Real-Time Scheduling Open Problems Seminar

Model-based Design Popular in many application domains of real-time systems –Automotive –Avionics To deal with complexity –Model everything for design (engineering) and analysis (science) –It is necessary to select a modeling language in the most natural and easy way The four tenets on the right are fundamental to model-based design by Ali Behboodian, DSP Magazine Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng No program by hand Starting point is functional model Automatic generation of implementation is key Synthesis of tasks, priorities, allocation, communication mechanisms …

Undoing the Task Real-time research has been looking at ways to look inside the task and find smaller granularity entities and/or models for conditional execution. Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng Examples: –Task graphs (see left) –Identify a task segment to be managed without preemption (see [1]) –Identify a task segment to be executed at a different priority level (see [2]) –… [1] M. Bertogna, G. Buttazzo, and G. Yao, “Improving feasibility of fixed priority tasks using non-preemptive regions”, RTSS 2011 [2] R. Davis and A. Wellings, “Dual Priority Scheduling” RTSS, 1995.

Synchronous Models: Simulink/Stateflow Synchronous FSMs are used in the most popular model-based design tools –SCADE –Simulink/Stateflow The system is a network of “dataflow” blocks and Stateflow (EFSM) blocks e1=2ms e2=5ms S1 S2 S3 e1/{action1();o1} e1/{action3();o1} e2/{action4();o2} e2/{action2();o2} 2 1 i1i1 i2i2 inin o1o1 o2o2 omom Where are the tasks? Timing constraints? Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng

Problem Statement: Input System is a network of blocks b j of two types –Regular (Dataflow): period T j (an integer multiple of a system-wide base periodT b ) inputs i j,p. at each kT j output and state are updated, with a WCET  j. –State machine (Stateflow): can have multiple activation events e j,p. at any multiple of the event periods kT j,p, different transitions may be taken. each update function has a WCET labeled as  j,q Order of execution –For two communicating blocks –If b j has a feedthrough semantics, then b i → b j –This partial order of execution of functions can be enforced by static code scheduling inside the task or by the scheduler –This precedence constraint can be avoided by adding a delay Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng bibi bjbj

Problem Statement: Input Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng zero logical execution time zero logical communication time AB f c (4,2) D t v =0: A,B,D,C t v =1:A,B C 4 2 A B 3 1 t v =2: A,B,D A B 2 0 D T=1 T=2 T=4 B A C D C f c (4,1)? 4 1 AB 4 2 t r =1 A B 3 1 A B 2 0 D t r =0 t r =2 C Behavior in Implementation Behavior in Simulation Order in simulation: A->B->D->C  The requirement of preserving the behavior in functional model can impose additional constraints Either tighter deadline for block C Or other mechanisms (but possibly with memory overhead)

Problem Statement Unlike traditional manual programming, in MBD –the task (or threads) model becomes an intermediate artifact –the timing analysis becomes part of a synthesis problem (to facilitate automatic code generation) Analysis problem –deadline may depends on the function-to-task mapping –additional requirements from the correct implementation of function models Synthesis problem: –mapping functions into tasks –assigning the execution order of functions inside tasks, –assigning the task parameters (priority, deadline, offset) –assigning scheduling attributes to functions (including preemptability and preemption threshold) –designing communication Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng

Example Open Problem Given –functional model (composed of multiple communicating state machine blocks and dataflow blocks) –a multicore platform as the implementation architecture Find –mapping of state machine actions and block reactions onto tasks –placement of tasks onto the cores –assignment of task activation offsets and priorities Such that –functional model semantics are preserved –each block finish in time for the follower blocks Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng

Example Open Problem II Given –functional model (composed of multiple communicating state machine blocks and dataflow blocks) –a multicore platform as the implementation architecture Find –mapping of state machine actions and block reactions onto tasks –placement of tasks onto the cores –assignment of task activation offsets and priorities –assignment of preemption thresholds to actions inside the tasks Such that –functional model semantics are preserved –each block finish in time for the follower blocks –memory usage is minimized Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng

Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng Thank you! Initial discussion on the example problems [3] M. Di Natale and H. Zeng, “Task implementation of synchronous finite state machines,” in Proc. the Conference on Design, Automation, and Test in Europe, [4] H. Zeng and M. Di Natale, “Schedulability Analysis of Periodic Tasks Implementing Synchronous Finite State Machines,” in Proc. 23rd Euromicro Conference on Real-Time Systems, 2012.

Baseline (Single-Task) Implementation Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng S1 S2 S3 e1/{action1();o1} e1/{action3();o1} e2/{action4();o2} e2/{action2();o2} 2 1 e1=2ms e2=5ms i1i1 i2i2 inin o1o1 o2o2 omom The generated code runs in the context of a 1 ms task (gcd), but reactions do not occur every 1ms A single task forces the execution of all the actions at the same priority level Simple periodic model: Worst-case exec time of a reaction to any event – deadline at 1ms – quite pessimistic

Partitioned (Multi-task) Implementation One task for each event rate. Priority of transitions is handled by task priorities Single reaction execution by an “inhibit signal” Atomicity (state consistency) by deadlines. Undoing the Task: Moving Timing Analysis back to Functional Models M. Di Natale, H. Zeng e1=2ms e2=5ms S1 S2 S3 e1/{action1();o1} e1/{action3();o1} e2/{action4();o2} e2/{action2();o2} 2 1 e1=2ms e2=5ms i1i1 i2i2 inin o1o1 o2o2 omom Applicable if the priority of a transition is determined by the corresponding event