Timing Analysis of Real-Time Software



Similar documents
HVM TP : A Time Predictable and Portable Java Virtual Machine for Hard Real-Time Embedded Systems JTRES 2014

Java Virtual-Machine Support for Portable Worst-Case Execution-Time Analysis

GameTime: A Toolkit for Timing Analysis of Software

Making Dynamic Memory Allocation Static To Support WCET Analyses

Spring 2011 Prof. Hyesoon Kim

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Module: Software Instruction Scheduling Part I

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

FPGA area allocation for parallel C applications

Contents. System Development Models and Methods. Design Abstraction and Views. Synthesis. Control/Data-Flow Models. System Synthesis Models

Model-based Testing of Automotive Systems

Tackling the Complexity of Timing-relevant Deployment Decisions in Multicore-based Embedded Automotive Software Systems Rolf Schneider, AUDI AG

Compact Representations and Approximations for Compuation in Games

Methods and Tools For Embedded Distributed System Scheduling and Schedulability Analysis

Clustering and scheduling maintenance tasks over time

Lecture 3 Theoretical Foundations of RTOS

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Test Case Design Techniques

ESE566 REPORT3. Design Methodologies for Core-based System-on-Chip HUA TANG OVIDIU CARNU

Nonlinear Optimization: Algorithms 3: Interior-point methods

Hardware in the Loop (HIL) Testing VU 2.0, , WS 2008/09

Scheduling Shop Scheduling. Tim Nieberg

GEDAE TM - A Graphical Programming and Autocode Generation Tool for Signal Processor Applications

Duality in General Programs. Ryan Tibshirani Convex Optimization /36-725

Static Scheduling. option #1: dynamic scheduling (by the hardware) option #2: static scheduling (by the compiler) ECE 252 / CPS 220 Lecture Notes

Single machine models: Maximum Lateness -12- Approximation ratio for EDD for problem 1 r j,d j < 0 L max. structure of a schedule Q...

Layered Approach to Development of OO War Game Models Using DEVS Framework

Basic Concepts. Project Scheduling and Tracking. Why are Projects Late? Relationship between People and Effort

Introduction to Scheduling Theory

Oracle Real Time Decisions

Partitioning and Divide and Conquer Strategies

Memory Access Control in Multiprocessor for Real-time Systems with Mixed Criticality

How To Test Automatically

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

Online Scheduling for Cloud Computing and Different Service Levels

Specification and Analysis of Contracts Lecture 1 Introduction

Eli Levi Eli Levi holds B.Sc.EE from the Technion.Working as field application engineer for Systematics, Specializing in HDL design with MATLAB and

A Model-driven Approach to Predictive Non Functional Analysis of Component-based Systems

Advanced Operating Systems (M) Dr Colin Perkins School of Computing Science University of Glasgow

Process Models and Metrics

Model-Driven Development of a Biosignal Analysis Framework: Benefits and Impacts on Processes. Nikolas Hofmann

(Refer Slide Time: 01:52)

SolovatSoft. Load and Performance Test Plan Sample. Title: [include project s release name] Version: Date: SolovatSoft Page 1 of 13

Real Time Scheduling Basic Concepts. Radek Pelánek

Software Engineering. What is a system?

Integrating Benders decomposition within Constraint Programming

Architectures and Platforms

REAL TIME OPERATING SYSTEMS. Lesson-18:

Optimized Scheduling in Real-Time Environments with Column Generation

Software Design Document (SDD) Template

Real-Time Component Software. slide credits: H. Kopetz, P. Puschner

Parametric Analysis of Mobile Cloud Computing using Simulation Modeling

Test case design techniques I: Whitebox testing CISS

Software Engineering Reference Framework

Aperiodic Task Scheduling

Chapter 12: Multiprocessor Architectures. Lesson 01: Performance characteristics of Multiprocessor Architectures and Speedup

Software Engineering Introduction & Background. Complaints. General Problems. Department of Computer Science Kent State University

Real-Time Systems Versus Cyber-Physical Systems: Where is the Difference?

Resource Reservation & Resource Servers. Problems to solve

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Scheduling Single Machine Scheduling. Tim Nieberg

Real-Time Scheduling (Part 1) (Working Draft) Real-Time System Example

Five best practices for deploying a successful service-oriented architecture

CSC340: Information Systems Analysis and Design. About the Course

A Static Analyzer for Large Safety-Critical Software. Considered Programs and Semantics. Automatic Program Verification by Abstract Interpretation

VLIW Processors. VLIW Processors

Test case design techniques II: Blackbox testing CISS

Software Development Process Models

Workload Models for System-Level Timing Analysis: Expressiveness vs. Analysis Efficiency

Chapter 4 Software Lifecycle and Performance Analysis

Real-time Process Network Sonar Beamformer

Principles of Software Engineering: Software Methodologies. COSI 120b, Spring 2005

Big Data Systems CS 5965/6965 FALL 2015

HPC enabling of OpenFOAM R for CFD applications

Jitter Transfer Functions in Minutes

OPRE 6201 : 2. Simplex Method

A Business Process Driven Approach for Generating Software Modules

Instruction Set Design

EECS 583 Class 11 Instruction Scheduling Software Pipelining Intro


Analysis of Micro-Macro Transformations of Railway Networks

Overview. Software engineering and the design process for interactive systems. Standards and guidelines as design rules

What is a life cycle model?

Best-Practice Software Engineering: Software Processes to Support Project Success. Dietmar Winkler

Transcription:

Timing Analysis of Real-Time Software Raimund Kirner Vienna University of Technology Austria This is joint work with Peter Puschner and the CoSTA and ForTAS project teams.

From RTS Design to Implementation T1 Task set with precedence constraints and deadline t T2 T4 T3 T1 T2 T3 T4 Can we guarantee that: response time < deadline? Task sequence: execution times, response time t Grenoble, QA'09 2

WCET: Timing Analysis Abstraction In general it is infeasible to model all possible execution scenarios and combinations of task execution times T1 T2 T3 T4 T1 T3 T2 T4 T1 T2 T3 T4 Ti Ti xt < WCET xt = WCET WCET analysis abstracts the different execution times of each task to one single value WCET bound T1 T2 T3 T4 t Grenoble, QA'09 3

WCET vs. calculated WCET bound frequency BCET WCET WCET Bound t Grenoble, QA'09 4

Remarks on WCET Analysis Computes upper bounds Bounds are application-dependent Assesses time that processor is actually executing the code WCET result is hardware-dependent WCET bounds must be safe WCET bounds should be tight Grenoble, QA'09 5

Requirements on WCET Analysis Tools Find feasible abstractions and analysis methods such that: 1. development effort of WCET tool is affordable 2. the calculated WCET estimates are sufficiently precise 3. analysis problems are tractable with acceptable resource requirements, and 4. the WCET tool is easy to use Acceptance depends on application domain Tradeoffs required: there is no single WCET analysis technique that is well-suited for all application domains!! Grenoble, QA'09 6

The Path Problem The path problem: calculate a description or enumeration of the (in)feasible paths of a program Any brute-force approaches like executing or simulating the program with all possible input data are intractable (the different values of input data are even more than different paths exist) Problem is shifted to the user: request for manual path descriptions (requires experts, high effort, is error-prone) Program analyzes with right abstractions help to reduce the needed manual code annotations. Grenoble, QA'09 7

Program Annotations for WCET Analysis Explicit flow information required to guide WCET analysis: intractable program complexity description of execution modes or input data 1 f m1 == [N (N+1)/2] f SCOPE scope { for (i=0; i<n; i++) { maximum N iterations; for (j=0; j<i; j++) { maximum N iterations; marker m1; } } restriction m1 == N (N+1) / 2; } loop bound loop bound flow variable linear flow constraint Grenoble, QA'09 8

Challenge: Correctness of Flow Information after Code Optimization for (i=0; i<n; i++) maximum 10 iterations { f(i); } additional knowledge assumed: N 10 (flow fact given as code annotation) loop unrolling (unrolling factor 3) for (i=0; i<(n-2); i=i+3) { f(i); f(i+1); f(i+2); } for (;i<n; i++) { f(i); } Q: what flow information is known of the transformed code? Grenoble, QA'09 9

Challenge: Correctness of Flow Information after Code Optimization for (i=0; i<n; i++) maximum 10 iterations { f(i); } additional knowledge assumed: N 10 (flow fact given as code annotation) loop unrolling (unrolling factor 3) scope { for (i=0; i<(n-2); i=i+3) maximum 3 iterations { } marker m1; f(i); f(i+1); f(i+2); } for (;i<n; i++) maximum 2 iterations { marker m2; f(i); flow variable flow variable } restriction 3*m1 + m2 <= 10; linear flow constraint Automatic update of flow information in parallel to code transformation loop bound loop bound Grenoble, QA'09 10

Universal Flow-Information Update We developed a framework that allows to update flow information for arbitrary code transformations using rules composed of the following operations: Update of loop bound information ( L ): (create, modify, or delete loop bound information) Update of flow constraints ( R ): (transform terms of the form const flowvariable of a linear flow constraint into a new term respectively a sum of terms, creation of new flow constraints) Grenoble, QA'09 11

Example: Loop Unrolling (3 Times) L1 A?:? B 1 L1 A 0:10 B 2 B C B 3 C S L2 D?:? B 4 E Grenoble, QA'09 12 S

Example: Loop Unrolling (3 Times) L1,0:10 L L1,0:3, L2,0:2 L1 A B 1 0:3 L1 A B C S 0:10 Σ 3 L2 B 2 B 3 C D 0:2 = B 4 n f AS R n f DS E n f AB R 3n f A B1 + n f DB4 Grenoble, QA'09 13 S

Universal Flow-Information Update Advantages: Manual code annotations: Reduced cognitive complexity (no need anymore to annotate machine code) Automatic calculation of flow information: Platform-independent calculation with reduced effort (information more explicit available at source code) Grenoble, QA'09 14

The State Explosion Problem Processor behavior modeling faces the problem of state explosion instruction timing depends on context (execution history) caches, pipelines, etc. even, when using the timing relevant dynamic processor state (TRDPS) The desired solution: decompose the timing analysis problem using divide and conquer Grenoble, QA'09 15

Series Decomposition Analysis on control-flow graphs instead on the set of execution traces Grenoble, QA'09 16

Parallel Composition The execution time T(I,s) of an instruction sequence I depends on the TRDPS s: Grenoble, QA'09 17

Parallel Composition (TRDPS Partitioning) Partitioning the TRDPS between HW component A and HW component B: TRDPS: A B Example: A cache state B pipeline state Grenoble, QA'09 18

Is it that simple? Example Using Newton s of Timing world Anomalies view together with an inadequate observation system may cause underestimation of the timing effects at a local system! Grenoble, QA'09 19

Pitfall: Series Timing Anomalies Grenoble, QA'09 20

Pitfall: Parallel Timing Anomalies Grenoble, QA'09 21

Pitfall: Parallel Timing Anomalies Grenoble, QA'09 22

Pitfall: Parallel Timing Anomalies Grenoble, QA'09 23

Pitfall: Parallel Timing Anomalies Grenoble, QA'09 24

Example of TA-S-A and TA-P-A out-of-order pipeline + cache + data dependencies: Grenoble, QA'09 25

Example of TA-S-I and TA-P-I out-of-order pipeline + cache + data dependencies: Grenoble, QA'09 26

Our Contribution so far against the State Explosion Problem Providing a precise definition of Timing Anomalies (formal but without unnecessary details) Formalizing the different types of decomposition techniques for WCET analysis Proofs of which types of TAs are incompatible with which type of decomposition technique [Kirner,TR-01-2009], [Kirner,ECRTS 09] Grenoble, QA'09 27

Measurement-Based Timing Analysis Research project: ForTAS (Formal Timing Analysis Suite) Cooperation with TU Darmstadt Learning the Hardware Timing Model by systematic execution time measurements Grenoble, QA'09 28

The ForTAS Refinement Loop Testing for Timing Analysis Program Test Cases Model 0.4 0.7 0.3 0.2 SUT Expected Time System (ETS) Measured Timed System (MTS) Environment Richer timing information than just WCET: probabilistic timing model Grenoble, QA'09 29

The Next Steps: Getting Out of the Complexity Mess Take a pro-active approach to advance timing analysis: construction of embedded systems that support: Predictability (with reasonable margins) Composability Scalability Predictable access to shared resources Timing-predictability requires a HW/SW co-design ( patterns of predictability ). Grenoble, QA'09 30

Thank You! http://costa.tuwien.ac.at http://www.fortastic.net Grenoble, QA'09 31