A UML Profile for Real-Time System Modelling with Rate Monotonic Analysis

Post on 05-Dec-2014

343 views 1 download

description

A UML profile for mapping models of real-time systems into models suitable for schedulability analysis using Rate Monotonic Analysis using the RapidRMA tool.

transcript

1 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

A UML Profile for Real-Time System Modelling with Rate Monotonic

Analysis

Dr. Ian Oliver

Nokia Research Center, Finland

FDL02, Marseille, France

25 September 2002

2 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Contents

• Very Brief History

• UML-RT

• Rate Monotonic Analysis

• Copenhagen Profile Overview

• Example

3 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Very Brief History

Timing Analysis

Investigations UML-RT Idea!

UML-RT Proposal RMA Mappings

Convergence

UML-RT Profile

Copenhagen Profile

future development...

4 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

UML-RT

• A Profile based upon UML 1.3/UML 1.4

• Standard defintion of time

• Quality of Service

• Concurrency defintions

• Active/Passive classes

• Signals & Port

5 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Rate Monotonic Analysis

• Formalism for estimating schedulability of a set of tasks with dependency graphs

• Worst Case Analysis

• Extended to take into consideration:

Different scheduling executives

Priorities

Priority Inversion

A

B

E

C F

D

G

)1(21

..1

n

nin

Ti

Ci

6 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Copenhagen

• Adds to the following

Class diagrams

Sequence

State

Deployment

• Includes

Threads

Modes

• Tool Support

Collaboration Diagrams

UML 1.3/1.4

UML-RT

Copenhagen

7 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Why do timing analysis?

• Mobile phone

DSP-MCU interaction and mutual interference

Power consumption-processing power tradeoff

Processing time-quality tradeoff

Optimisation/Overload Discovery

• Software Process

Part of requirements

Constraints on model

8 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Class Diagram

9 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Some Notes...

• Timing Values...from where?

Experiences & Hunches

Previous software

Executable code profiling

Counting assembly language instructions

Does not need to be 100% accurate

10 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Collaboration Diagram (Modes)

Active Objects

Passive Objects

11 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Sequence Diagram (display speed)

12 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Sequence Diagram (measure speed)

13 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Sequence Diagram (regulate speed)

14 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Deployment Diagram

15 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Timing Hierarchy

Active Classes / Capsules

Class - best guess value

Sequence diagrams - task timing

State diagram - transition timing

Class methods - actual code

Passive Data Classes

Class - best guess value

Sequence diagrams - operation timing

Class methods - actual code

Increasing level of refinement

16 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

UML & RMA

UML World

RMA World

mapping from UML to RMA

17 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

RMA Task Model

18 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

"c1.1:C"

UML Task-RMA Mapping 1

• Complex case: Task dependencies

:C c1:C

deadline=d

period=p

exectime=e3

period=p

deadline=p

amountOfWork=e1 mapsTo

:C c2:C

relexectime=e1,e2

"c2:C"

"c1.2:C"

period=p

deadline=p

amountOfWork=e2

period=p

deadline=p

amountOfWork=e3

19 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

"c1.1:C"

UML Task-RMA Mapping 2

• Thread mapping

:C c1:C

:C c2:C

"c2:C"

"c1.2:C"

"c1.1-c1.2:C" "c2:C"

mapsTo

20 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Analysis 1

Cruise Control CPU Analysis

21 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Analysis 2

Engine Control CPU Analysis

22 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Back in the UML World...

23 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Time Demand Analysis

24 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Schedule Analysis

25 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

Tool Support

26 © NOKIA 2002 Ian Oliver, Forum on Design Languages 2002, Marseille, France, 23 Sept 2002. Nokia Internal Use Only

...and now...

• Experience with timing analysis

Two major systems with timing information

• Better tool support

Any XMI supporting tools

Profile (stereotype/tagged value) support in tools

• Scalability Issues

RMA algorithms are naturally parallel => Linux cluster

• UML 2.0 ...