Schedulability-Driven Frame Packing for Multi-Cluster Distributed Embedded Systems Embedded Systems Lab (ESLAB)

advertisement
Schedulability-Driven Frame Packing for
Multi-Cluster Distributed Embedded Systems
Paul Pop, Petru Eles, Zebo Peng
Embedded Systems Lab (ESLAB)
Linköping University, Sweden
1 of 1/15
14
Heterogeneous Networks
Distributed Heterogeneous System
...
NoCs
...
...
...
...
Factory Systems
Heterogeneous Networks
Multi-Cluster Systems
Automotive Electronics
2 of 2/15
14
Distributed Safety-Critical Applications
...
 Applications distributed over
the heterogeneous networks
Gateway
...
 Reduce costs:
use resources efficiently
 Requirements:
close to sensors/actuators
 Applications distributed over heterogeneous networks are difficult to...
 Analyze (e.g., guaranteeing timing constraints)
Unsolved
 Design (e.g., efficient implementation)
problems
3 of 3/15
14
Contributions
 Analysis and design of Multi-Cluster Embedded Systems
 Analysis
 Proposed a schedulability analysis for safety-critical hard real-time
applications mapped on multi-cluster distributed embedded systems
 Is the application schedulable? (Are deadlines satisfied?)
 Bounds on the communication delays and communication buffer sizes
 Design optimization
 Several
In this paper
designwe
problems
have addressed
can be addressed
the issue of
once an application
packing
analysis is available.
messages into frames (frame packing) for
 Improving the degree of schedulability of an application
 Reducing the hardware costs needed to run a schedulable application
4 of 4/15
14
Outline
 Motivation
 Contributions
System architecture and application model
 Related work
 Schedulability analysis for multi-clusters
 Frame packing for multi-custers
 Experimental results
 Message and future work
5 of 5/15
14
Hardware Architecture
...
Time-triggered cluster
...
Gateway
 Static cyclic scheduling
 Time-triggered protocol
Event-triggered cluster
 Fixed priority preemptive scheduling
 Controller area network protocol
Time Triggered Protocol (TTP)


Bus access scheme:
time-division multiple-access (TDMA)
Schedule table located in each TTP
controller: message descriptor list (MEDL)
S0 S1
Slot
S2
SG
S0 S1
S2
Controller Area Network (CAN)



Priority bus, collision avoidance
Highest priority message
wins the contention
Priorities encoded in the frame identifier
SG
TDMA Round
Cycle of two rounds
6 of 6/15
14
...
Software Architecture
...
Gateway
Time-triggered cluster
NG CPU
CAN Controller
N1 CPU
OutCAN
m3
T
T
m1
m1m2
P2
MBI
TTP Controller
TTP Controller
OutN2
P4
OutTTP
P1
N2 CPU
CAN Controller
m3
MBI
P
3
Event-triggered cluster
SG
S1
SG
S1
Round2
7 of 7/15
14
Related Work
 Frame packing for TT systems using TTP
 H. Kopez, R. Nossal,
The Cluster-Compiler –
A Tool for the Design of Time Triggered Real-Time Systems,
Workshop on Languages, Compilers, and Tools for Real-Time Systems, 1995
 Frame packing for ET sytems using CAN
 K. Sandström, C. Norström,
Frame Packing in Real-Time Communication,
Real-Time Computing Systems and Applications Conference, 2000
 A. Rajnak, K. Tindell, L. Casparsson,
Volcano Communications Concept,
Volcano Communication Technologies AB, 1998
 Frame packing for multi-clusters (ET + TT)
 Has not been addressed previously
 Cannot be solved separately for each cluster as
inter-cluster communication creates a circular dependency
8 of 8/15
14
Problem Formulation
 Input




An application modeled as a set of process graphs
Each process has an worst case execution time, a period, and a deadline
Each message has a known size
The system architecture and the mapping of the application are given
 Output
 Worst-case response times
...
 A mapping of application messages to frames (frame packing)
such that the application is schedulable
 Mapping of ET messages to frames
 Priorities for ET messages
 Mapping of TT messages to frames
Application:
set of
process graphs
Mapping
 TDMA slot
sequence
...
Architecture: Multi-cluster
9 of 9/15
14
Schedulability Analysis
 Scheduling time-triggered activities:
 Building a schedule table:
static cyclic scheduling (e.g., list scheduling)
 Scheduling event-triggered activities:
 Response time analysis:
calculate worst case response times for each process
 Schedulability test: response times smaller than the deadlines
 Response times depend on the communication delay
between sending and receiving a message
 Communication delays depend on the type of message passing
1. TTC  TTC
2. TTC  ETC
 Communication delays
3. ETC  ETC
 Bounds on the buffer sizes
4. ETC  TTC
10 of10/15
14
Multi-Cluster Scheduling
 Scheduling cannot be addressed separately for each type of cluster
 The inter-cluster communication creates a circular dependency:
 TTC static schedules (offsets)  ETC response times
 ETC response times  TTC schedule table construction
TT Bus
Configuration
Static
Scheduling
Application,
Mapping,
Architecture
Response
Times
Offsets
Priorities
Response
Time
Analysis
Multi-Cluster Scheduling
Schedule
Tables
Offset
earliest possible
start time for an
event-triggered
activity
Response Bounds
times
on the
buffer sizes
11 of11/15
14
...
...
Frame Packing Example
deadline
TTC
TTP
Gateway
CAN
ETC
TTC
TTP
Gateway
CAN
ETC
TTC
TTP
Gateway
CAN
ETC
Messages not packed
deadline missed
m1 and m2 packed in f1,
m3 and m4 not packed,
deadline missed
m1 and m2 packed in f1,
m3 and m4 packed in f2,
deadline met
12 of12/15
14
Frame Packing Optimization Strategies
 Simulated Annealing
 Based on a simulated annealing approach
 Cost function: degree of schedulability
 Obtains near-optimal values for the degree of schedulability
 OptimizeFramePacking
 Based on a greedy approach
 Cost function: degree of schedulability
 Straightforward solution
 Finds a schedulable application
 Does not consider the packing of messages to frames
13 of13/15
14
Can We Improve Schedulability?
Average Percentage Deviation [%]
Cost function: degree of schedulability
Straightforward
solution
100
Does not perform optimizations
80
60
OptimizeFramePacking?
40
OptimizeFramePacking
20
0
80
160
240
320
Number of processes
Simulated Annealing
400 Near-optimal values for
the degree of schedulability
14 of14/15
14
Message and Future Work
Analysis and optimization methods are
needed for the efficient implementation of
applications distributed over interconnected
heterogeneous networks.
 Future Work
 Explore more design problems
 Mapping for multi-clusters
 How to partition an application in ET and TT activities?
15 of15/15
14
Download