Mitra Nasri* Morteza Mohaqeqi Gerhard Fohler RTNS, October 2016
Since 1973 it is known that period ratio affects the RM Schedulability The hardest-to-schedule task set [Liu and Layland] T 2 T n T 1 T 2 T n 2T 1 1 T 2 T 1 2, 1 T 3 T 2 2, T 1 2T 1 However, the exact test is very efficient in this case! R i C i + i 1 j=1 Ri T j C j Schedulability ratio The cost of analysis Small period ratios Large period ratios NP-hard problem [Eisenbrand08] 2 of 21
Schedulability Ratio U = 0.8 U = 0.85 U = 0.9 U = 0.95 1.00 0.80 0.60 0.40 0.20 0.00 K max (ratio between consecutive periods) Periods: T 1 uniform distribution from [1, 10] K i uniform distribution from 1, K max Utilizations: uunifast [Bini05] WCETs: C i = u i T i T i = K i T i 1 Task sets satisfy the Liu and Layland assumptions 3 of 21
A large number of tasks Each task might have a set of configurations Cost of schedulability analysis System designer Cost of re-configuration of the system if the previous configuration was not feasible Identifying RM-Friendly periods reduces the costs 4 of 21
To understand what we get in the experiments! Example: Utilizations: uunifast, U=0.9, Periods: uniform from [10, 1000], WCET: C i = u i T i What does it tell us? The exact schedulability test What does it NOT tell us? Task sets satisfy the Liu and Layland assumptions 5 of 21
Consecutive period ratio To understand what we get in the experiments! Example: Utilizations: uunifast, U=0.9 Periods: uniform from [10, 1000] WCET: C i = u i T i What does it NOT tell us? The effect of period ratio! Average period ratio is 1.07 Maximum per-task utilization for n=40 is 0.09. 6 of 21
We quantify the effect of period ratio on RM schedulability Base period ratio (integer part of period ratio) Period residual (fractional part of period ratio) and Task utilization We derive a set of design hints We present a necessary schedulability test for RM based on period ratios Read it in the paper 77of of 21 21
Related work System model and definitions Quantifying the effect of period ratios Evaluation Conclusion A Framework to Construct Customized Harmonic Periods for RTS 8 of 25 8 of 21
When the period ratio approaches to infinity, the maximum schedulable utilization reaches to 1 [Lehozcky89] If periods are harmonic, and U 1, the task set will be schedulable by RM [Han97] Davis et al., showed that if periods are selected randomly by log-uniform distribution, RM schedulability increases [Davis08, Emberson10]. Wei et al., presented an efficient schedulability bound for RM based on the ratio between the smallest and the largest periods and utilization of the tasks [Wei08]. Bini presented a utilization-based schedulability test in which the minimum value of consecutive period ratios is used too [Bini15]. 9 of 21
Assumptions Preemptive periodic or sporadic tasks Implicit deadline No dependency or self-suspension τ = τ 1, τ 2,, τ n τ i = (C i, T i ) Tasks are indexed by their periods Period ratio of two tasks τ i τ j T j 2T j T i Base period ratio (integer part) K i,j = T i T j = k i,j + γ i,j Period residual (fractional part) k i,j N 0 γ i,j < 1 Example τ 4 K 4,2 = 2.6 τ 2 10 20 26 k 4,2 = 2 γ 4,2 = 0.6 10 of 21
Related work System model and definitions Quantifying the effect of period ratios EValuation Conclusion A Framework to Construct Customized Harmonic Periods for RTS 11 of 25 11 of 21
We start from a sufficient schedulability test for τ i t C i + i 1 j=1 t T j C j We evaluate the WCRT equation at t = T i T i C i + i 1 j=1 Ti T j C j (some arithmetic operations) i 1=j T i T j N 1 γ i,j k i,j + γ i,j u j + i j=1 u j 1 K i,j = T i T j = k i,j + γ i,j ki,j N, 0 γ i,j < 1 12 of 21
1- The effect of periods that are not-harmonic with T i i 1=j T i T j N 1 γ i,j k i,j + γ i,j u j + i j=1 u j 1 2- The contribution of task utilization 3- The contribution of period ratio 4- The contribution of period residual Design hints: 1- Only the tasks with non-harmonic period with T i have an adverse effect on the schedulability of τ i 2- If you have a highly utilized task in the system, try to force other periods to be harmonic with its period. 3- Try to have either large period ratios or low utilization for the tasks that are not harmonic with T i. 4- Force the period residual of highly utilized tasks to be large with respect to T i. Note: γ i,j shows how close is a period to be harmonic with another period.γ i,j ~0 or γ i,j ~1 are almost harmonic. Remember: K i,j = T i T j = k i,j + γ i,j k i,j N, 0 γ i,j < 1 13 of 21
14 of 21 14 of 21
What is the effect of period residual? How different schedulability tests react towards an increase in The maximum value of consecutive period ratios The period residual Schedulability Tests: Linear approximation DCT [Han97] based on harmonic periods Park 2014: verify the WCRT inequality at the latest releases of the high priority tasks t C i + i 1 j=1 t T j C j 15 of 21
Periods: T 1 uniform distribution from [1, 10] k i,i 1 uniform distribution from {1, 2, 3} γ i,i 1 uniform distribution from 0, γ Utilizations: uunifast [Bini05] WCETs: C i = u i T i T i = k i,i 1 + γ i,i 1 T i 1 16 of 21
Periods: T 1 uniform distribution from [1, 10] K i uniform distribution from 1, K max Utilizations: uunifast [Bini05] WCETs: C i = u i T i T i = K i T i 1 17 of 21
Periods: T 1 uniform distribution from [1, 10] k i,i 1 uniform distribution from {1, 2, 3} γ i,i 1 uniform distribution from 0, γ Utilizations: uunifast [Bini05] WCETs: C i = u i T i T i = k i,i 1 + γ i,i 1 T i 1 18 of 21
Related work System model and definitions Quantifying the effect of period ratios A necessary schedulability test Experiments Conclusion A Framework to Construct Customized Harmonic Periods for RTS 19 of 25 19 of 21
We quantified the effect of period ratio We have considered the effect of Base period ratio Period residual Utilization of each task It helps designers to create RM-Friendly task sets It helps us to understand the experimental results It helps us to design fair experiments Future work Designing an efficient task partitioning algorithm based on RM-Friendly tasks Considering tasks with constrained or arbitrary deadlines Using our result to build a parameter assignment tool for systems with a set of configurations 20 20of of 21 21
Thank you. 21 of 21
Now you are behind the scene! A Framework to Construct Customized Harmonic Periods for RTS 22 of 25 22 of 21
A necessary schedulability test More interesting experiments The proof for small period residual A Framework to Construct Customized Harmonic Periods for RTS 23 of 25 23 of 21
Example of a feasible schedule 24 of 21 24 of 21
Exact workload that MUST be finished before T i The upper bound of the workload that MUST be finished before T i f i,4 f i,2 f i,3 f i,1 25 of 21 25 of 21
A necessary schedulability test More interesting experiments The proof for small period residual A Framework to Construct Customized Harmonic Periods for RTS 26 of 25 26 of 21
To understand what we get in the experiments! Another example: Utilizations: uunifast, U=0.9, Periods: log-uniform from [1, 1000], WCET: C i = u i T i Average period ratio: 1.20 Maximum per-task utilization: 0.09 27 of 21
To understand what we get in the experiments! Example: Utilizations: uunifast, U=0.9 Periods: uniform from [10, 1000] WCET: C i = u i T i So how about the effect of task utilizations? Will it not help? Maximum per-task utilization: 0.09 28 of 21
Recursive step Initial Value 29 of 21 29 of 21
30 of 21 30 of 21
31 of 21 31 of 21
32 of 21 32 of 21
33 of 21 33 of 21
34 of 21 34 of 21
A necessary schedulability test More interesting experiments The proof for small period residual A Framework to Construct Customized Harmonic Periods for RTS 35 of 25 35 of 21
γ i,j 0 1 i j=1 u j A i,m = min A i,j 36 of 21 36 of 21