Analysis - Robotics and Embedded Systems

Comments

Transcription

Analysis - Robotics and Embedded Systems
Analysis (II)
Modular Performance Analysis
(Real-Time Calculus)
Kai Huang
Outline
 Timing analysis in general
 Real-Time Calculus
 MPA
1/2/2014
[email protected]
2
Timing Analysis Overview
R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. Whalley, G. Bernat, C. Ferdinand, R.
Heckmann, T. Mitra, F. Mueller, I. Puaut, P. Puschner, J. Staschulat, and P. Stenstr ¨om. The worst-case
execution-time problem—overview of methods and survey of tools. ACM Trans. Embed. Comput. Syst.,
7(3):1–53, 2008
1/2/2014
[email protected]
3
Formal Analysis vs. Simulation
e.g. delay
Worst-Case
upper bound
Best-Case
lower bound
Real System
1/2/2014
Simulation
[email protected]
Formal analysis
4
Analysis and Design
Embedded System = Computation
+ Communication
+ Resource Interaction
Analysis:
Infer system properties from
subsystem properties.
Design:
Build a system from subsystems
while meeting requirements.
1/2/2014
[email protected]
5
Modular Performance Analysis
UML sequence
diagrams
UML/SysML
diagrams
Task graphs
Application
Data
sheets
Measurements
Load Model
(Environment)
Service Model
(Resources)
Formal
specification
Input
traces
Architecture
Mapping
Scheduling
System Model
Performance
Model
Component
simulation
Processing Model
(HW/SW)
Analysis
Analysis Results
1/2/2014
[email protected]
Formal
specification
6
Abstract Models for Performance Analysis
Processor
Task
Input
Stream
Concrete Instance
Abstract Representation
Service
Model
Load
Model
1/2/2014
Processing
Model
[email protected]
7
Modular System Composition
CPU
RM
BUS
DSP
TDMA
TDMA
GPC
GPC
1/2/2014
GPC
GSC
GPC
[email protected]
8
GPC
Abstract Models for Performance Analysis
Processor
C(t)
Task
Input
Stream
R’(t)
R(t)
Concrete Instance
Abstract Representation
Service
Model
()
Load
Model
1/2/2014
()
Processing
Model
[email protected]
9
Outline
 Timing analysis in general
 Real-Time Calculus
 MPA
1/2/2014
[email protected]
10
Event Stream Model: Arrival Curves
events
Event Stream
number of events in
in t=[0 .. 2.5] ms
2.5
time [ms]
2.5
interval [ms]
Arrival Curve
demand
maximum / minimum
arriving demand in any
interval of length 2.5 ms
1/2/2014
4
3
2
[email protected]
11
Service Model (Resources)
availability
Resource Availability
available service
in t=[0 .. 2.5] ms
Service Curves
2.5
t [ms]
2.5
D [ms]
service
maximum/minimum
available service in any
interval of length 2.5 ms
1/2/2014
[email protected]
12
Example 1: Event Arrival Model
 A common event pattern that is used in
literature can be specified by the parameter
triple (p, j, d), where p denotes the period, j
the jitter, and d the minimum inter-arrival
distance of events in the modeled stream.
periodic
p
periodic
jitter
p
1/2/2014
j
d
[email protected]
13
Example 1: Periodic (with Jitter)
periodic
1/2/2014
periodic with jitter
[email protected]
14
Example 1: (p, J, d) model
1/2/2014
[email protected]
15
Example 2: TDMA Resource
 Consider a real-time system consisting of n applications
that are executed on a resource with bandwidth B that
controls resource access using a TDMA policy.
 Analogously, we could consider a distributed system with n
communicating nodes, that communicate via a shared bus
with bandwidth B, with a bus arbitrator that implements a
TDMA policy.
 TDMA policy: In every TDMA cycle of length , one single
resource slot of length si is assigned to application i.
appl.1
appl.2
c
1/2/2014
...
appl. n
appl.1
sn
[email protected]
appl.2
...
appl. n
c
16
Example 2: TDMA Resource
 Service curves available to the applications / node i:
B si
si c-si
1/2/2014
[email protected]
c
2c
17
Event and Resource Models
1/2/2014
[email protected]
18
Greedy Processing Component (GPC)
available
resources
input
event
stream
 Examples:
FIFO buffer
output
event
stream
remaining
resources
o computation (event – task instance, resource –
computing resource [tasks/second])
o communication (event – data packet, resource –
bandwidth [packets/second])
1/2/2014
[email protected]
19
Greedy Processing Component
 Behavioral Description
GPC
1/2/2014
o Component is triggered by
incoming events.
o A fully preemptable task is
instantiated at every event
arrival to process the
incoming event.
o Active tasks are processed in
a greedy fashion in FIFO
order.
o Processing is restricted by the
availability of resources.
[email protected]
20
Greedy Processing Component (GPC)
Conservation Laws
C(t)
R(t)
C(t)
R(t)
GPC
R’(t)
R’(t)
C’(t)
1/2/2014
t
[email protected]
21
Greedy Processing
 For all times u  t we have R’(u)  R(u) (conservation law).
 We also have R’(t)  R’(u)+C(t)–C(u) as the output can not
be larger than the available resources.
 Combining both statements yields R’(t)  R(u) + C(t) –
C(u).
 Let us suppose that u* is the last time before t with an
empty buffer. We have R(u*) = R’(u*) at u* and also R’(t)
= R’(u*) + C(t) – C(u*) as all available resources are used
to produce output. Therefore, R’(t) = R(u*) + C(t) – C(u*).
 As a result, we obtain
B(t)
u*
1/2/2014
[email protected]
t
22
Abstract Models for Performance Analysis
Processor
C(t)
Task
Input
Stream
R’(t)
R(t)
Concrete Instance
Abstract Representation
Service
Model
()
Load
Model
1/2/2014
()
Processing
Model
[email protected]
23
Abstraction
GPC
GPC
time domain
cumulative functions
1/2/2014
time-interval domain
variability curves
[email protected]
24
Some Definitions and Relations

is called min-plus convolution

is called min-plus de-convolution
 For max-plus convolution and de-convolution:
 Relation between convolution and deconvolution
»
1/2/2014
[email protected]
25
Arrival and Service Curve
 The arrival and service curves provide bounds on event
and resource functions as follows:
 We can determine valid variability curves from cumulative
functions as follows:
 One proof:
1/2/2014
[email protected]
26
Abstraction
GPC
GPC
time domain
cumulative functions
1/2/2014
time-interval domain
variability curves
[email protected]
27
The Most Simple Relations
 The output stream of a component satisfies:
 The output upper arrival curve of a component
satisfies:
 The remaining lower service curve of a
component satisfies:
1/2/2014
[email protected]
28
Two Sample Proofs
1/2/2014
[email protected]
29
Tighter Bounds
 The greedy processing component transforms the
variability curves as follows:
[bl, bu]
[al’, au’]
[al, au]
GPC
Without proof ... .
[bl’, bu’]
1/2/2014
[email protected]
30
Performance Analysis Based on Arrival Curves
Backlog & Delay
Schedulability
 Close-form solution
 Modular and composition
1/2/2014
[email protected]
31
Delay and Backlog
l
[bl, bu]
[al, au]
GPC
maximum delay D
[al’, au’]
maximum
backlog B
[bl’, bu’]
1/2/2014
u
[email protected]
32
Proof of Backlog Bound
l
u
maximum
backlog B
1/2/2014
[email protected]
33
Outline
 Timing analysis in general
 Real-Time Calculus
 Modular Performance Analysis
1/2/2014
[email protected]
34
System Composition
CPU
RM
BUS
DSP
TDMA
How to interconnect service?
Scheduling!
1/2/2014
GPC
GPC
GPC
GPC
[email protected]
GPC
35
Scheduling and Arbitration
FP/RM
EDF
RR
GPC
EDF
RR
GPC
TDMA
GPS
TDMA
share
GPC
GPC
GPC
GPC
sum
1/2/2014
[email protected]
36
Extending the Framework




New HW behavior
New SW behavior
New scheduling scheme
...
 Find new relations:


RTC
This is the hard part…!
1/2/2014
’
[email protected]
37
’
Wave Field Synthesis Example
System view
1/2/2014
Analysis model
[email protected]
38
Wave Field Synthesis Example
 Duration of Analysis Model Generation and
Calibration
1/2/2014
[email protected]
39

Similar documents

Welcome to the world of satellite radio

Welcome to the world of satellite radio Play-by-Play Not available on Internet Radio

More information

GENERAL AGREEMENT ON TARIFFS AND TRADE ACCORD

GENERAL AGREEMENT ON TARIFFS AND TRADE ACCORD Vice-Président de la délégation M. R„ Arents

More information