institut fÜr datentechnik und kommunikations- netze 1 steffen stein, tu braunschweig, 2009 a...

18
Steffen Stein, TU Braunschweig, 2009 INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 A Timing-Aware Update Mechanism for Networked Real-Time Systems Steffen Stein, Moritz Neukirchner, Harald Schrom, Rolf Ernst

Upload: reginmund-jaeger

Post on 05-Apr-2015

103 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

1

A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, Moritz Neukirchner,

Harald Schrom, Rolf Ernst

Page 2: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

2

Outline

• Motivation, Problem Statement

• Approach

• Challenges

• Framework Architecture, Update Protocol

• Demonstrator description

• Demonstration

• Conclusion

Page 3: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

3

Motivation

• Embedded Systems are Software-Intense

• Many variants in e.g. automotive systems

• In-Field Updates are becoming common

• How do we ensure correctness?

• Lab Testing for all variants

– Becomes infeasible with number of variants

– Each update potentially adds a variant

• Our proposition

– Trustable update procedure

– Ensure correctness of individuum

Page 4: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

4

RTE

Platform

CPU

contracting interface

application 1 application n

request assert contract

contracting interface

request assert contract

CPU

Paradigm: Contracting

• Separation of Platform and Application

– Applications request resources and assert meeting of contraints

– Platform guarantees performance

– Contracts

• Application can be accepted if sufficient platform resources exist

• Runtime Environment as broker

• Here: Focus on Performance Aspects

Page 5: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

5

General Idea of Update Flow

Heterogeneous Networked Embedded System

Model-Based Feasibility Check engine

Contractinterface

ContractRepository

WatchdogsApplications

Annotations• WCET• Comm. Partners• Constraints• …

…arg = arg; err = CANOS_Init(); if (err != CANOS_NO_ERR) { CanBusFreeLst = NULL; CanBusUsedLst = NULL;result = err;…

Software Update

Monitoring

Adaptation

Page 6: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

6

Challenges in Distributed Performance Analysis

• Distributed Algorithm for Performance Analysis [Isola2006]

– Exchange Event Stream Data

– Local Analysis as soon as new data is available

• Compare distributed and centralized Algorithm

– Convergence Properties (submitted to EMSOFT)

– Quality of results • does one of the algorithms yield tighter bounds?

• Consider runtime of Distributed Performance Analysis

– Busy-Window Analysis as key component

– Global iteration

• Convergence Detection

Page 7: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

7

Challenges in Update Management

• Develop an Architecture to cope with Updates

– Strict Separation of Model and Execution Domain

– Communication over Contract Repository

• Description of Software (Contracts)

– Contents

– Representation

• Development of Update Protocol

– Interaction between Architecture Components

• Synchronization

– Exploit task graph information

– Barrier Synchronization

Page 8: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

8

Outline

• Motivation, Problem Statement

• Approach

• Challenges

• Framework Architecture, Update Protocol

• Demonstrator description

• Demonstration

• Conclusion

Page 9: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

9

General Architecture

UpdateController

Task Management

Model Management

Contract Repository

Model domain Execution domain

Application code & model

model

code

contract contract

contract

Contract interface

Page 10: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

10

Model Domain

UpdateController

Contract Repository

Model domain

model

contract

contract

Contract interface

Model Optimization

Model Analysis

model

model

metricsmetrics

Contract Negotiation

Page 11: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

11

Update Protocol

3. Model

Contract Enforcement

1. Annos2. Test Annos

8. OK

6. Evaluation

9. Code

12. Configuration

13. Done

Analysis Framework

Contract Negotiation

Update Controller

Contract Repository Tasks

5. Analysis

11. Parameters

4. Application wide synchronisation

7. Application wide synchronisation

10. Application wide synchronisation

Page 12: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

12

Outline

• Motivation, Problem Statement

• Approach

• Challenges

• Framework Architecture, Update Protocol

• Demonstrator description

• Demonstration

• Conclusion

Page 13: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

13

RTE Implementation Work

• Plain C

• Based on RT-Kernel uC/OS-II

• Flexible Communication Infrastructure

– Supports task migration

– API inspired by AUTOSAR

• Task and Contract Management as outlined before

– Contract Management

– Task Migration

• Distributed Analysis Engine

– Basic concepts (SPP Analysis, PJD Models)

Page 14: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

14

Physical Demonstrator Setup

Stepper motors

Angle sensor

Track w/ photosensors

IR illumination

Page 15: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

15

Demonstrator Application Setup

• Insertion of second Application breaks timing constraints of first

• Framework detects this

• Second Application is denied

Left Controller

D1CSensorCCommCCtrl.

T1 T2 T3

Right ControllerCAN-Bus

Analysis Core 1 Analysis Core 2

Page 16: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

16

Demo

• Working Demo – see Demonstrator

Page 17: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

17

Performance Data

• Update verification, acceptance and integration in fractions of a second

• Most of the time spent for CAN communication (~ 90%)

• Memory footprint of the RTE (unoptimized)

– 30kB für uC/OS

– 30kB Analysis Engine

– 170kB Contracting and Runtime Framework

– 100kB Data (scalable)

– Stacks not considered

Page 18: INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS- NETZE 1 Steffen Stein, TU Braunschweig, 2009 A Timing-Aware Update Mechanism for Networked Real-Time Systems

Steffen Stein, TU Braunschweig, 2009INSTITUT FÜR DATENTECHNIK UND KOMMUNIKATIONS-NETZE

18

Conclusion

• Distributed Performance Analysis

• Contracting Framework

• Task migration

• Integrated in a runtime Framework

• Enables performance-safe updates

• Ongoing work

– Online Optimization

– Distributed Performance Analysis

– Online Monitoring