Investigation of System Timing Concerns in Embedded Systems: Tool-based Analysis of AADL Models

Similar documents
Pattern-Based Analysis of an Embedded Real-Time System Architecture

The SAE Architecture Analysis and Description Language (AADL) Standard: A Basis for Architecture- Driven Embedded Systems Engineering

Model-Based Embedded System Engineering & Analysis of Performance-Critical Systems

Model-based Architectural Verification & Validation

Impact of Runtime Architectures on Control System Stability

Flow Latency Analysis with the Architecture Analysis and Design Language (AADL)

AADL v2.1 errata AADL meeting Sept 2014

OSATE Analysis Support

AADL Graphical Editor Design

Architecture Description Languages. Peter H. Feiler 1, Bruce Lewis 2, Steve Vestal 3 and Ed Colbert 4

An Extensible Open Source AADL Tool Environment (OSATE)

Methods and Tools for Embedded Distributed System Timing and Safety Analysis. Steve Vestal Honeywell Labs

Reducing Uncertainty in Architectural Decisions with AADL

CSSE 490 Model-Based Software Engineering: Architecture Description Languages (ADL)

Introduction to AADL analysis and modeling with FACE Units of Conformance

ARINC653 AADL Annex. Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Julien Delange 07/08/2013

An Extensible Open Source AADL Tool Environment (OSATE)

An Information Model for High-Integrity Real Time Systems

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

Traditional Approaches to Modeling

Analysis and Design Language (AADL) for Quantitative System Reliability and Availability Modeling

Executable AADL. Real Time Simulation of AADL Models. Pierre Dissaux 1, Olivier Marc 2.

Modeling the Implementation of Stated-Based System Architectures

AADL Meta Model & XML/XMI

The SAE AADL Standard - An Architecture Analysis & Design Language for Embedded Real-Time Systems

xuml, AADL and Beyond

Update on AADL Requirements Annex

Ensuring Schedulability of Spacecraft Flight Software

1. INTRODUCTION. four years and by 2014 the cost of 27M SLOC of software is estimated to exceed $10B (see Figure 1).

An Implementation of the Behavior Annex in the AADL-toolset Osate2

AADL Simulation and Performance Analysis in SystemC

Schedulability Analysis of AADL Models

A Component Model and Software Architecture for CPS

Data Model Considerations for Radar Systems

AADL : about code generation

Precedence Graphs Revisited (Again)

AADS+: AADL Simulation including the Behavioral Annex

Plug-in Development for the Open Source AADL Tool Environment Part 4: OSATE Infrastructure & Language Extensions

Model-Based Development of Embedded Real-Time Systems

Green Hills Software, Inc.

Efficient Embedded Runtime Systems through Port Communication Optimization

Describing the architecture: Creating and Using Architectural Description Languages (ADLs): What are the attributes and R-forms?

ADeS presentation. a simulator for AADL v Amélie Schyn Romain Sezestre Jean-François Tilman

ARINC653 annex: examples

Model driven Engineering & Model driven Architecture

Plug-in Development for the Open Source AADL Tool Environment Part 3: Generation & External Models

SAE AADL Error Model Annex: Discussion Items

Understanding and Using the Controller Area Network Communication Protocol

Architecture Modeling and Analysis for Embedded Systems

Analytical Architecture Fault Models

Time-Triggered Ethernet

Tasks. Task Implementation and management

Workshop 1: Specification for SystemC-AADL interoperability

AirTight: A Resilient Wireless Communication Protocol for Mixed- Criticality Systems

Introduction to Real-Time Communications. Real-Time and Embedded Systems (M) Lecture 15

Dealing with AADL end-to-end Flow Latency with UML Marte.

Scheduling Algorithm and Analysis

MATLAB Expo Simulation Based Automotive Communication Design using MATLAB- SimEvent. Sudhakaran M Anand H General Motors

Computing and Communications Infrastructure for Network-Centric Warfare: Exploiting COTS, Assuring Performance

2. Introduction to Software for Embedded Systems

Concurrent activities in daily life. Real world exposed programs. Scheduling of programs. Tasks in engine system. Engine system

02 - Distributed Systems

02 - Distributed Systems

Presentation of the AADL: Architecture Analysis and Design Language

System-level co-modeling AADL and Simulink specifications using Polychrony (and Syndex)

CS4514 Real-Time Systems and Modeling

Subsystem Hazard Analysis (SSHA)

Embedded Software Programming

Complexity-Reducing Design Patterns for Cyber-Physical Systems. DARPA META Project. AADL Standards Meeting January 2011 Steven P.

Evolving the CORBA standard to support new distributed real-time and embedded systems

Introduction to Real-time Systems. Advanced Operating Systems (M) Lecture 2

CPU Scheduling. Daniel Mosse. (Most slides are from Sherif Khattab and Silberschatz, Galvin and Gagne 2013)

Priya Narasimhan. Assistant Professor of ECE and CS Carnegie Mellon University Pittsburgh, PA

Presentation of the AADL: Architecture Analysis and Design Language

Reference Model and Scheduling Policies for Real-Time Systems

AADL Webinar. Carnegie Mellon University Notices Architecture Analysis with AADL The Speed Regulation Case-Study... 4

Model-Based Engineering with AADL: An Overview

Dependability Modeling Based on AADL Description (Architecture Analysis and Design Language)

Multimedia Systems 2011/2012

HIERARCHICAL DESIGN. RTL Hardware Design by P. Chu. Chapter 13 1

Automatic Selection of Feasibility Tests With the Use of AADL Design Patterns

Outline HIERARCHICAL DESIGN. 1. Introduction. Benefits of hierarchical design

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Chapter 6 Architectural Design. Chapter 6 Architectural design

AUTOBEST: A United AUTOSAR-OS And ARINC 653 Kernel. Alexander Züpke, Marc Bommert, Daniel Lohmann

AADL Fault Modeling and Analysis Within an ARP4761 Safety Assessment

Probabilistic Worst-Case Response-Time Analysis for the Controller Area Network

Why testing and analysis. Software Testing. A framework for software testing. Outline. Software Qualities. Dependability Properties

ARTIST-Relevant Research from Linköping

An Introduction to TTEthernet

SEI/CMU Efforts on Assured Systems

Transactum Business Process Manager with High-Performance Elastic Scaling. November 2011 Ivan Klianev

An Efficient Modeling and Execution Framework for Complex Systems Development

CS370 Operating Systems

A Server-based Approach for Predictable GPU Access Control

ARINC653 toolset: Ocarina, Cheddar and POK

Implementing a High-Integrity Executive using Ravenscar

The Montana Toolset: OSATE Plugins for Analysis and Code Generation

Query Language for AADLv2, Jérôme Hugues, ISAE Serban Gheorghe, Edgewater

Current Issues and Future Trends. Architectural Interchange

Transcription:

Investigation of System Timing Concerns in Embedded Systems: Tool-based Analysis of AADL Models Peter Feiler Software Engineering Institute phf@sei.cmu.edu 412-268-7790 2004 by Carnegie Mellon University

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 2

System Timing Concerns Critical flows: application perspective Unqueued data streams, event streams, queued message streams Sampling of stream, throttling of processing End-to-end latency, throughput Variability & upper bounds Hybrid control systems & modal operation Critical flows: embedded software perspective Periodic & aperiodic threads Efficient communication mechanisms Time & space partitioning Schedulability of processor & buses/networks Hybrid & modal task architectures 3

An Avionics System Case Study Migration from static timeline to preemptive scheduling Towards distributed partitioned system Software & hardware redundancy Access to detailed design & performance data Pattern-based analysis of architecture Abstract, but precise architecture models Identify potentially systemic issues High-fidelity analysis of network workload Model generated from design data Tool-based analysis of full-scale model 4

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 5

Flight Manager: Principal Functionality 20Hz Periodic I/O From other Partitions Navigation Sensor Processing 20Hz Integrated Navigation 10Hz Flight Manager State To other Partitions Processing functions 20Hz Nav Radio Auxiliary service Guidance Processing Subsystem?= CSCI?= Partition 20Hz 5Hz Flight Plan Processing Aircraft Performance Calculation 2Hz 6

A Cyclic Executive Implementation 1 Periodic I/O 20Hz From other Partitions 2 Navigation Sensor Processing 20Hz 3 Integrated Navigation 10Hz Shared data area To other Partitions Switch clock mod Hyperperiod Case 20Hz: call PIO call NSP call GP Case 2*20Hz: -- 10Hz call PIO call NSP call IN call GP Case 3*20Hz:... Case 4*20Hz: -- 5Hz 4 Guidance Processing 20Hz Simple mapping to a cyclic callout implementation 5 5Hz Flight Plan Processing 6 Aircraft Performance Calculation 2Hz 7

A Naïve Thread-based Design Pr 1 Periodic I/O 20Hz From other Partitions Pr 2 Navigation Sensor Processing Potential priority inversion due to priority assignment Pr 3 20Hz Integrated Navigation Pr 4 10Hz Tasks must complete within frame => cyclic executive behavior Guidance Processing 20Hz Shared data area Pr 6 Potential non-deterministic communication due to preemption Flight Plan Processing Pr 9 5Hz Aircraft Performance Calculation To other Partitions 2Hz Decreasing Priority 8

Priority Inversion Checker Analysis of AADL models User assigned priorities Modeled as new property Potential red flag Recording & reporting of analysis results Tool support Potential priority inversion identifiable by analysis tool Checker operates on system instance bound to execution platform External tool processes XML document Plug-in to Open Source AADL Tool Environment Two pages of Java code 9

Non-deterministic Phase Delay Variable phase delay of data elements Variable timing of user-level send/receive calls Variable send/receive ordering due to preemption Results in variable frame delay of data element Does it matter? Data stream as controller input Latency jitter viewed as noise in data stream Software induced jitter engineered away Data stream as display output Phase delay oscillation results in blurred display Time stamping of data elements Time synchronization of data streams 10

Intended Data Flow 20Hz Periodic I/O From other Partitions Navigation Sensor Processing 20Hz Integrated Navigation 10Hz Guidance Processing 20Hz Shared data area Flight Plan Processing 5Hz To other Partitions Decreasing Priority Implemented via shared data Achieved via precedence ordering Aircraft Performance Calculation 2Hz 11

From other Partitions Shared Data Area Detailing NSP data Navigation Sensor Processing IN data 20Hz Integrated Navigation 10Hz 20Hz Periodic I/O NS data Guidance Processing GP data 20Hz Flight Plan Processing FP data 5Hz To other Partitions Fuel data FPC data Aircraft Performance Calculation 2Hz 12

Flight Manager in AADL From Partitions Nav signal data Navigation Sensor Processing Nav sensor data 20Hz Nav sensor data Integrated Navigation 10Hz Nav data Immediate & delayed data port connections preserve determinism Guidance Processing 20Hz Guidance To Partitions AADL connections have precise timing semantics Flight Plan Processing 5Hz FP data Fuel Flow FP data Nav data Aircraft Performance Calculation 2Hz Performance data 13

Data Stream Characteristics Expected stream characteristics Property values of incoming ports Stream element frame delay Exact or range Non-timing characteristics Stream element miss rate Value & value delta constraints Provided stream characteristics Property values of outgoing ports Communication protocol properties Execution platform (bus) properties Utilize property set extension mechanism of AADL to document assumptions Analysis plug-ins to identify communication nondeterminism & to check data stream consistency 14

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 15

Flow Analysis of Polled Event Streams Event stream examples Multi-Function Display interaction Physical dial & switch processing Periodic polling at 20 Hz Maintain predictability of periodic processing model Reduce sampling latency Issue Realistic scheduling analysis for 100 s of polling tasks Towards event-based system model Realistic bounded arrival rate Leverage system modality Analytic models for stochastic processing 16

Flight Director Command Flow Cockpit Display Request for new page Display Manager New page content Page Content Manager Subsystem assumed to be a partition Flight Manager Flight Director 17

Command Flow Timing Cockpit Display Sampling of input Display Manager Page Content Manager Cross-partition communication assumed to be a frame boundary Flight Manager Flight Director 18

Response Time Analysis Worst-case scenario Period delay per partition communication DM sampling latency (max. = partition period) Six periods of cross-partition communication latency DM execution latency (max. = partition period) Display hardware latency 19

A Flow Latency Analysis Plug-in Leverages timing semantics of partition concept Utilizes introduction of new property Written as OSATE analysis plug-in One page of Java code <demo> Adapt plug-in to assess impact of partitioning due to safety criticality levels on critical flows 20

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 21

ARINC 653 Partitions & AADL ARINC Partition Intra-partition communication Buffer Blackboard Semaphore Event Inter-partition communication Sampling port Queuing port AADL process & processor abstraction AADL thread interaction Event data port connection Shared data component Concurrency protocol property Event port connection AADL process interaction Data port connection Event data port connection Predeclared properties for queue processing characteristics Project-specific properties can be added 22

Cross-Partition Communication Timing ARINC 653 cross-partition communication specifies frame-delayed communication Timing semantics of implementations Application level send/receive calls Periodic I/O to handle cross-partition communication Preemptive I/O communication partition Device I/O with minimized latency Cross-partition communication Modeling with immediate and delayed connection timing semantics 23

Partition Order & Timing Semantics Partition communication via send/receive Transmission initiated by send call Partition A T1 T2 Partition B T3 T4 T1 T2 T3 T4 T1 T2 T3 T4 Timing semantics are sensitive to partition order t 0 Partition A t 1 t 2 Partition B Partition A Partition B Partition A before Partition B 24

Cross-Partition Communication With Periodic I/O Periodic I/O adds phase delay Periodic I/O is sensitive to partition order Partition A T1 Data1 T2 P IO A Partition B T3 P IO B T4 Timing semantics are STILL sensitive to partition order PA T1 T2 PB T3 T4 PA T1 T2 PB T3 T4 PA T1 T2 PB T3 T4 t 0 Partition A t 1 t 2 t Partition B Partition A Partition A 3 Partition B Partition B 25

Response Time Analysis Revisited Period delay per partition communication DM sampling latency (max. = partition period) Six periods of cross-partition communication latency DM execution latency (max. = partition period) Single processor static timeline Account for mid-frame cross-partition communication Reduces cross-partition communication latency to three periods Multiple processor synchronous system Account for mid-frame cross-processor communication Take into consideration bus/network latency Multiple processor asynchronous system Asynchronous sampling with max. sampling latency = period 26

Partition Communication in AADL AADL runtime system manages Partition execution Frame-delayed inter-partition communication Assures delayed communication for synchronous systems Periodic system bus as in Time-Triggered Architecture (TTA) provides a common reference time Communication via ports and connections Delayed connections insulate from partition order Latency variation as flow property 27

Communication in Asynchronous Systems Sampling of data stream Task scheduling based on independent clocks Steve s aging formula provides upper bound on latency Worst-case latency variability: sum of partition rates Flow-driven processing Task dispatch on arrival of data (independent of local clock) No sampling latency Task deadlines provide upper bound on latency Worst-case latency variability: sum of deadline-bcet Globally time-stamped data allows for latency variability control 28

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 29

30

21000 lines of textual AADL 31

CDU Subsystem Architecture 32

Graphical Software (Logical) View 33

Workload-based Performance Analysis Workload determined by Connectivity in application architecture Binding to particular execution platform configuration Modeling options Explicit modeling of bound configuration as devices Utilization of bus abstraction & binding properties Input to In-house network performance analysis tool Via AADL XML representation Device-based model Workload data explicitly recorded Bus-based model Flexibility for what-if analysis Workload computed from bindings Models of different fidelity 34

Multiple Analysis Concerns Architecture annotated with AADL properties Predeclared properties Project-specific properties Demonstration examples Processor binding & scheduling analysis Based on periods, deadlines Flow latency analysis Based on task characteristics Reliability & Fault tree analysis through error model annotations 35

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 36

Modal System Analysis Modeling of system modes Operational modes of systems Hybrid control systems Different task & interaction configurations Different property values Less conservative analysis results Mode-specific analysis results as modal property values Tool-based analysis of modal AADL models Modal system instance models vs. model per mode Transparent modal model traversal vs. modal analysis tools AADL meta model defines modal instance models 37

Outline Case study background Preemptive scheduling & communication timing Low fidelity flow latency analysis Cross-partition communication timing Network load modeling & analysis Modal system analysis AADL-based engineering environments 38

Two-Tier Tool Strategy Open Source AADL Tool Environment (OSATE) Developed by SEI Low entry cost solution (no cost CPL) Multi-platform support based on Eclipse Vehicle for in-house prototyping of project specific architecture analysis Vehicle for architecture research with access to industrial models & industry exposure to research results Commercial Tool Support UML tool environment extension based on UML profile Artisan, Rational, Extension to existing modeling environment with AADL export/import TNI Stood Analysis tools interfacing via XML or XML to native filter Runtime system generation tools 39

Tool Interoperability Textual AADL Parser Co-resident tool AADL XML Tool Interface AADL Front-end Name Resolution Semantic Checking Declarative AADL Model AADL Instance Model Persistent XML document Convert Tool-specific XML Representation Graphical Layout Model Graphical AADL Graphical View Convert Tool-specific representation 40

OSATE Capabilities OSATE Release 0.4.0 based on Eclipse Release 3 Online AADL help Over 250 downloads Text to XML & XML to text internationally Syntax-sensitive text editor Parsing & semantic checking of full AADL AADL property viewer Syntax-Sensitive AADL Object Editor Model versioning & team support Model instantiation Model consistency checking AADL to MetaH translator Plug-in development Processed 21000 line AADL model in 6 sec Next release Feb 2005 Graphical editor Multi-file support 41

An Extensible Engineering Environment Concurrency Analysis OMNET++ Network simulation Architecture Consistency Plug-ins AADL Extensions Error model Concurrency behavior Object Model Interface Network model Embry-Riddle Reliability Analysis Model Export Filters Timing model Architecture Import & Extraction Architecture Export MetaH, TTA System Verification Manager (CMU) Simulink/Matlab, Dymola models MetaH Toolset (Honeywell) Scheduling analysis Reliability analysis Isolation analysis Runtime system generation TimeWeaver (CMU) Distributed resource allocation Multi-platform runtime system generation TimeWiz Commercial Tool Scheduling analysis Execution trace analysis 42

Architecture Consistency Examples Systemic issues discovered in architecture analysis Detection codified as analysis plug-ins Expected component connectivity Data stream characteristics Miss rate of data stream State vs. state delta communication Data value constraints Safety criticality Security levels & information flow Impact dependency Spec-based flow analysis Use in models of different fidelity 43

Benefits Model-based system engineering benefits Prediction early and throughout lifecycle Model evolution & tool-based processing Multiple analyses based on same architecture model Predictable runtime characteristics at different modeling fidelity Reduced integration & maintenance effort Benefits of AADL as SAE standard Common modeling notation across organizations Interchange & integration of architecture models Single architecture model augmented with analysis properties Extensibility accommodates special analysis needs Tool interoperability & extensible engineering environments Aligned with UML-based engineering practices 44