460 likes | 472 Views
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times. Sorin Manolache. Linköping University, IDA, ESLAB. Informal specification. Functional simulation. Modelling. Architecture selection. Formal verification. System model. Mapping. Estimation. Scheduling.
E N D
Schedulability Analysis of Real-Time Systems with Stochastic Task Execution Times Sorin Manolache Linköping University, IDA, ESLAB
Informal specification Functional simulation Modelling Architecture selection Formal verification System model Mapping Estimation Scheduling Simulation P2 System architecture Formal verification ok P1 ok Mapped and scheduled model Analysis ok System-Level Design Process Lower levels of design
Soft RTS • Occasionally missing a deadline is not desired but accepted Hard RTS • Missing a deadline is unaccaptable Analysis • Can be based on other execution time models • Providesa feasibility degree • Focus of this thesis Analysis • Is based on the WCET • Providesyes-no answers • Established methods Real-Time Systems
Outline • Stochastic execution time model • Contribution • Problem formulation • Exact solution • Approximate solution • Extensions • Conclusions and future work
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
Why not WCET? • Soft real-time applications (missing a deadline is acceptable) • WCET becomes pessimistic • Leads to processor under-utilization fast WCET probability density computation time slow WCET computation time
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
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)
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
probab probab execution time execution time 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 • Designer controlled discarding (rejection)
Problem Formulation (2) Output: • Ratio of missed deadlines per task graph Limitations: • Non-preemption 15% 3%
Outline • Stochastic execution time model • Contribution • Problem formulation • Exact solution • Approximate solution • Extensions • Conclusions and future work
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
A, 0, {B} B, t0, {} B, t1, {} B, tk+1, {A} B, tk, {A} Group as many states as possible in equivalent states Naive Stochastic Process 0 3 5 • Number of next states equals the number of possible execution times (infinitely many)
A, 0, {B} B, tk+1, {A} B, t0, {} B, t1, {} B, [0, 3), {} B, [3, 5), {A} t0 t1 tk tk+1 B, tk, {A} 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 3 5 6 9 10 12 15
0 3 0 3 5 A, [3, 5), {} B, [0, 3), {} -, [0, 3), {} A, [0, 3), {B} s2 s3 B, [3, 5), {A} s6 s5 s4 A, [5, 6), {B} Stochastic Process s1 execA execB
Analysis (1) [0, 3) [3, 5) [5, 6) [6, 9) [9, 10) [10, 12) [12, 15)
Outline • Stochastic execution time model • Contribution • Problem formulation • Exact solution • Approximate solution • Extensions • Conclusions and future work
Approximate the ETPDFs by functions of exponential distributions A much larger Markov chain is obtained, but it requires less resources to solve 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)
Approximation Modelling CTMC constr. Analysis Coxian distribs Task graphs GSPN CTMC Results Approach Outline (2)
Approximation Modelling CTMC constr. Analysis Coxian distribs Task graphs GSPN CTMC Results Application Modelling (1)
C A Application Modelling (2) E B F D
A C F D B E Firing delay equals execution time probab firing delay Application Modelling (3) A E B C D F
Approximation Modelling CTMC constr. Analysis Coxian distribs Task graphs GSPN CTMC Results Approximation (1)
Approximation (2) a1l1 a2l2 a3l3 (1-a1)l1 (1-a2)l2
Approximation Modelling CTMC constr. Analysis Coxian distribs Task graphs GSPN CTMC Results CTMC Construction (1)
CTMC Construction (2) X, Y X, Y X SMP Approximation of the SMP Approximation of X X
Construction of the CTMC • The global generator of the Markov chain becomes then • M is expressed in terms ofsmallmatrices and can begenerated on the fly– memory savings
Accuracy Accuracy vs analysis complexity compared to an exact approach presented in previous work
A C B D E F G H I J Individual Task Periods (1) 360 120 2 15 9 4 6 3 5 9 12 15 60 24
Deadlines < Periods (1) • Deadlines shorter than periods lead to an increase in the number of PMIs 0 3 5 6 9 10 12 15 0 2 3 4 5 6 8 9 10 11 12 14 15
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
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)
Analysis (2) [0, 2) [2, 4) [4, 6) [6, 8)
0 0 3 3 0 3 0 3 5 B, [0, 3), {} A, [3, 5), {} -, [0, 3), {} A, [0, 3), {B} z2 z3 s2 s3 B, [3, 5), {A} 0 3 5 8 s6 z2*execB s5 s4 A, [5, 6), {B} Stochastic Process 0 3 5 execA execB s1