Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times Sorin Manolache

advertisement
Schedulability Analysis of Real-Time
Systems with Stochastic Task Execution
Times
Sorin Manolache
Linköping University, IDA, ESLAB
1
System-Level Design Process
Informal
specification
Architecture
selection
Modelling
Functional
simulation
System model
Formal
verification
System
architecture
Mapping
Estimation
Scheduling
ok
ok
Mapped and
scheduled model
P1
P2
Simulation
ok
Formal
verification
Analysis
Lower levels of design
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
2
Real-Time Systems
Soft RTS
Hard RTS
 Occasionally missing
a deadline
 Missing
a
is not desired but accepted
deadline is
Analysis
unaccaptable
 Can be based on
Analysis
other execution
timeon
models
 Is based
the
WCET
 Provides
a feasibility
 Provides
degree
yes-no
answers
 Focus of this
 Established
thesis
methods
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
3
Outline
 Stochastic execution time model
 Contribution
 Problem formulation
 Exact solution
 Approximate solution
 Extensions
 Conclusions and future work
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
4
Task Execution Time Variability
 Application characteristics (data dependent loops and
branches)
 Architectural factors (pipeline hazards, cache misses)
 External factors (network load)
 Insufficient knowledge
 Alternative Models:
 Average
 Interval
 Stochastic
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
5
Why not WCET?
 Soft real-time applications (missing a deadline is
acceptable)
 WCET becomes pessimistic
probability density
 Leads to processor under-utilization
fast
WCET
computation time
slow
WCET
computation time
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
6
Related Work
 L. Abeni and G. Butazzo, “Integrating Multimedia
Applications in Hard Real-Time Systems”, 1998
 J. Kim and K.G. Shin, “Execution Time Analysis of
Communicating Tasks in Distributed Systems”, 1996
 A. Kalavade, P. Moghe, “A Tool for Performance
Estimation for Networked Embedded Systems”, 1998
 J. Lehoczky, “Real Time Queueing Systems”, 1996
 T. Tia et al., “Probabilistic Performance Guarantee for
Real-Time Tasks with Varying Computation Times”,
1995
 T. Zhou et al., “A Probabilistic Performance Metric for
Real-Time System Design”, 1999
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
7
Limitation of Previous Work
 Monoprocessor systems
 Particular classes of task execution time probability
density functions (exponential)
 Discrete sets of possible execution times
 Particular scheduling policies (FIFO, fixed priority)
 Restricted application classes (independent tasks)
 Analysis applicable under particular circumstances
(heavy traffic)
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
8
Contribution
 An exact method for schedulability analysis, efficiently
applicable but no limited to monoprocessor systems
 An approximate method for schedulability analysis,
trading analysis efficiency for result accuracy
 Both methods are applicable on systems with as
unrestricted assumptions as possible
 Experiments and method-specific extensions
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
9
Problem Formulation (1)
Input:
 Set of task graphs, periodic tasks, deadlines less
than or equal to the periods, statically mapped
 Set of execution times probability density functions
(continuous)
 Scheduling policy
probab
probab
 Designer controlled discarding (rejection)
execution time
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
execution time
10
Problem Formulation (2)
Output:
 Ratio of missed deadlines per task graph
Limitations:
 Non-preemption
15%
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
3%
11
Outline
 Stochastic execution time model
 Contribution
 Problem formulation
 Exact solution
 Approximate solution
 Extensions
 Conclusions and future work
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
12
Analysis Method
 Relies on the analysis of the underlying stochastic
process
 A state of the process should capture enough
information to be able to generate the next states and
to compute the corresponding transition probabilities
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
13
Naive Stochastic Process
0
3
5
A, 0, {B}
B, t0, {}
B, t1, {}
B, tk, {A}
B, tk+1,
{A}
 Number of next states equals the number of possible
execution times (infinitely many)
Group as many states as possible in equivalent
states
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
14
PMIs
 A PMI is delimited by the arrival times and deadlines
 The sorting of the tasks according to their priorities is
unique inside of a PMI
0
t0
t1 3 tk tk+1 5
6
9
10
12
15
A, 0, {B}
B, t0, {}
B, [0, 3),
B, t{}
1, {}
B, B,
tk, [3,
{A}5), {A} B, tk+1, {A}
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
15
Stochastic Process
s1 A, [0, 3), {B}
s2
s4
B, [0, 3), {}
-, [0, 3), {}
s5
s3
0
3
execA
B, [3, 5), {A}
s6
A, [3, 5), {}
A, [5, 6), {B}
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
0
3
5
execB
16
Analysis (1)
[0, 3)
[3, 5)
[5, 6)
[6, 9)
[9, 10)
[10, 12)
[12, 15)
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
17
Influence of the Number of Tasks
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
18
Sliding Window Size
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
19
Influence of the Data Dependencies
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
20
Influence of the Instantiations
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
21
Outline
 Stochastic execution time model
 Contribution
 Problem formulation
 Exact solution
 Approximate solution
 Extensions
 Conclusions and future work
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
22
Limitations of the Exact Solution
 The number of states increases dramatically in the
case of multiprocessor systems
 It has to perform as many convolutions as there exist
states in the stochastic process (time)
 It has to store as many probability distributions as
there exist states in the sliding window (memory)
Approximate the ETPDFs by functions of
exponential distributions
A much larger Markov chain is obtained, but it requires
less resources to solve
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
23
Approach Outline (2)
Task graphs
Modelling
Approximation
GSPN
Coxian distribs
CTMC constr.
CTMC
Results
Analysis
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
24
Application Modelling (1)
Task graphs
Modelling
Approximation
GSPN
Coxian distribs
CTMC constr.
CTMC
Results
Analysis
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
25
Application Modelling (2)
A
E
B
C
F
D
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
26
Application Modelling (3)
A
B
C
D
F
C
F
probab
A
E
D
B
E
Firing delay equals
execution time
firing delay
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
27
Approximation (1)
Task graphs
Modelling
Approximation
GSPN
Coxian distribs
CTMC constr.
CTMC
Results
Analysis
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
28
Approximation (2)
11
(11)1
22
33
(12)2
j
i i 1
G ( s)   i
(1   j )

s  i j 1
s  j
i 1
r
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
29
CTMC Construction (1)
Task graphs
Modelling
Approximation
GSPN
Coxian distribs
CTMC constr.
CTMC
Results
Analysis
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
30
CTMC Construction (2)
X, Y
X, Y
X
SMP
Approximation of the SMP
X
Approximation of X
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
31
Construction of the CTMC
 The global generator of the Markov chain becomes
then
M  (  Aj )  I 
jen
  (  I j )  Bi  (  I j )  D j 
ien
j i ,
jen
j i ,
jen
 M is expressed in terms of small matrices and can be
generated on the fly – memory savings
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
32
Analysis Time vs. Number of Tasks
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
33
Analysis Time vs. Number of Procs
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
34
Growth with Number of Stages
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
35
Accuracy
Accuracy vs analysis complexity compared to
an exact approach presented in previous work
Stages
2
3
4
5
Relative error 8.7% 4.1% 1.04% 0.4%
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
36
Individual Task Periods (1)
360
120
A
2
15
9
B
C
4
6
G
H
3
5
J
D
E
60
12
I
F
9
15
24
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
37
Individual Task Periods (2)
Tasks
12
15
18
21
24
27
Stochastic process size
Identical
Individual
922.14
1440.42
2385.85
3153.47
2034.00
4059.42
14590.66
17012.80
19840.19
35362.85
42486.28
64800.19
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
Increase
56.20%
32.17%
99.57%
16.60%
78.23%
52.52%
38
Deadlines < Periods (1)
 Deadlines shorter than periods lead to an increase in
the number of PMIs
0
0
3
2
3
4
5
6
5
6
8
9
10
12
15
9
10 11 12
14 15
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
39
Deadlines < Periods (2)
Tasks
12
15
18
21
24
27
Stochastic process size
d=p
d<p
1440.42
3153.37
4059.42
11636.29
35142.60
35044.30
2361.38
3851.90
5794.33
24024.35
48964.80
40218.60
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
Increase
63.93%
22.14%
42.73%
106.46%
39.33%
14.76%
40
Rejection vs. Discarding (1)
Tasks
12
15
18
21
24
27
Stochastic process size
Discarding
Rejection
2223.52
95789.23
7541.00 924548.19
4864.60 364146.60
18425.43 1855073.00
14876.16 1207253.83
55609.54 5340827.45
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
Increase
42.07
121.60
73.85
99.68
80.15
95.04
41
Rejection vs. Discarding (2)
Tasks
12
15
18
21
24
27
Stochastic process size
Discarding
Rejection
8437.85
18291.23
27815.28
90092.47
24089.19 194300.66
158859.21 816296.36
163593.31 845778.31
223088.90 1182925.81
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
Increase
1.16
2.23
7.06
4.13
4.17
4.30
42
Conclusions
 Exact solution for the schedulability analysis. Mainly
applicable to monoprocessors systems
 Approximation approach to performance analysis of
multiprocessor real-time applications
 Larger scale applications can be analysed due to the
PMI and sliding window approache (exact solution)
and due to an efficient scheme to store the underlying
stochastic process (approximate solution)
 Provides the possibility to trade-off analysis speed and
memory demand with analysis accuracy
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
43
Future Work
 Better support for design space exploration (more
performance indicators for diagnosis)
 More efficient extraction of the performance indicators
(exploiting symetries at the application and modelling
level)
 Relaxation of the assumptions (inspecting different
mapping possibilities)
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
44
Analysis (2)
[0, 2)
[2, 4)
[4, 6)
[6, 8)
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
45
Stochastic Process
0
3
5
0
3
execA
0
3
5
execB
0
3
s1 A, [0, 3), {B}
0
0
z2
3
s2
3
5
z2*execB
B, [0, 3), {}
s3
8
s4
-, [0, 3), {}
s5
B, [3, 5), {A}
z3
s6
A, [3, 5), {}
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times
Sorin Manolache, Linköping University, IDA, ESLAB
A, [5, 6), {B}
46
Download