Download presentation

Presentation is loading. Please wait.

Published byKenzie Swims Modified about 1 year ago

1
THE UNIVERSITY of TEHRAN Mitra Nasri Sanjoy Baruah Gerhard Fohler Mehdi Kargahi October 2014

2
2 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 2 of 29 Benefits ◦ No context switches ◦ Cache and pipelines are not affected by other tasks More precise estimation of WCET ◦ Simpler mechanisms to protect critical sections In some systems, preemption is either not allowed or too expensive Benefits from the application’s point of view Minimum I/O delay (the delays between sampling and actuation)

3
3 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Non-Preemptive Scheduling is NP-Hard ◦ For Periodic Tasks [Jeffay 1991] ◦ For Harmonic Tasks [Cai 1996] ◦ For Harmonic Tasks with Binary Period Ratio [Nawrocki 1998] k i = {1, 2, 4, 8, 16, …} τ i -1 TiTi T i -1 τiτi Period Ratio

4
4 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Schedulability test for npEDF, npRM, and Fixed Priority ◦ [Kim 1980, Jeffay 1991, George 1996, Park 2007, Andersson 2009, Marouf 2010,…] Heuristic scheduling algorithms ◦ Clairvoyant EDF [Ekelin 2006], Group-Based EDF [Li 2007] Optimal scheduling algorithms for special cases ◦ [Deogun 1986, Cai 1996, Nasri 2014]

5
5 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks [Deogun 1986]: An optimal algorithm if tasks have ◦ Constant integer period ratio K ≥ 3 [Cai 1996]: An optimal algorithm if tasks have ◦ Constant period ratio K = 2, or ◦ Integer period ratio k i ≥ 3 Limitations Linear time in the number of jobs, exponential time in the number of tasks! Constructs an offline time table with exponential number of entries Period Ratio An optimal scheduling algorithm is the one which guarantees all deadlines whenever a feasible schedule exists

6
6 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Precautious-RM [Nasri 2014] is optimal if tasks have ◦ Constant period ratio K = 2 ◦ Integer period ratio k i ≥ 3 ◦ Arbitrary integer period ratio k i ≥ 1 and enough vacant intervals Precautious-RM is online and has O(n) computational and memory complexity (in the number of tasks)

7
7 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 7 of 25 A Framework to Construct Customized Harmonic Periods for RTS We study ◦ The existence of a utilization-based test ◦ The pessimism in the existing necessary and sufficient test ◦ The efficiency of the recent processor speedup approach Then for special cases of harmonic tasks we present ◦ The schedulability conditions ◦ A more efficient speedup factor

8
8 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 8 of 29 Task set τ = {τ 1, τ 2, …, τ n } T i is the period of τ i c i is the WCET of τ i k i is the period ratio of τ i to τ i-1 Deadlines are implicit; D i = T i τ i -1 TiTi T i -1 τiτi Period Ratio

9
9 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 9 of 29 Is it possible to have a utilization-based test for non-preemptive scheduling of periodic tasks? [Liu 1973] EDF [Bini 2003] RM (Hyperbolic Bound)

10
10 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Utilization of a non-preemptive task set which cannot be scheduled by any clairvoyant scheduling algorithm, can be arbitrarily close to zero. 2 1/ε τ 2 :( 2, 1/ ε ) … ε missed 1 τ 1 :( ε, 1) ε ~0 ⇒ U~0

11
11 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 11 of 29 It is impossible to find any relation between utilizations such that if it holds, schedulability of any scheduling algorithm is guaranteed. We build an infeasible task set with those utilizations τ 1 to τ n-1 : T 1 = T 1 = … = T n-1 = an arbitrary value c 1 = u 1 T 1, c 2 = u 2 T 2, …, c n-1 = u n-1 T n-1 … c 1 + c 2 + … + c n-1 T1-crT1-cr T 1 -c r + ε τ n : c n = 2(T 1 -c r )+ ε T n = c n /u n c r = c 1 + c 2 + … + c n-1 c n = 2(T 1 -c r ) + ε τnτn … c 1 + c 2 + … + c n-1 τ 1 to τ n-1 At least one deadline miss

12
12 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 12 of 29 Yes! (for npEDF) [Jeffay 1991]: Necessary and sufficient conditions for the schedulability of periodic tasks with unknown release offsets (with npEDF): Does it provide necessary conditions for task sets with known release offset?

13
13 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks For task sets with no or known release offset, Jeffay’s conditions are only sufficient. This task set is feasible by npEDF, but it is rejected in Jeffay’s test

14
14 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 14 of 29 cici … τiτi Processor with speed 1 Processor with speed S ci/Sci/S … TiTi τiτi [Thekkilakattil 2013]

15
15 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 15 of 29 The speed S that guarantees the feasibility of a non-preemptive execution of a harmonic task set is upper bounded by The proof can be done by finding the bound on the maximum possible execution time of a non-preemptive task! S ≤ 8 It may reduce U=1 to U’=0.125

16
16 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 16 of 29 Can we find cases where npEDF and npRM are optimal? Can we find better speedup factor?

17
17 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 17 of 29 What if the execution times are limited to c i ≤ T 1 – c 1 ? Schedulable!Non-Schedulable!

18
18 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 18 of 29 If we have U ≤ 1 and c i ≤T 1 – c 1 can we guarantee schedulability? Intuition: maximum blocking will be bounded to T 1 – c 1 Is it enough?

19
19 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks npRM and npEDF are not optimal for harmonic tasks with U ≤ 1 and c i ≤T 1 – c 1 This task set is infeasible The relation between periods cannot be ignored easily!

20
20 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 20 of 29 We can count the vacant intervals to make sure each task has its own place to be scheduled!

21
21 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks A vacant interval is constructed by the slack of τ 1 The number of vacant intervals is defined as τ3τ3 c 3 = T 1 – c 1 τ1τ1 c1c1 τ2τ2 c 2 = T 1 – c 1 V 2 = 3 V 3 = 2

22
22 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 22 of 29 c i = T 1 – c 1 npRM and npEDF have no deadline miss if in the harmonic task set we have U ≤ 1 c i ≤T 1 – c 1 V i ≥ 1, 1 < i < n; and V n ≥ 0 τ3τ3 c1c1 τ1τ1 τ2τ2 c 2 = T 1 – c 1 c 3 = T 1 – c 1 τiτi …… k i > 1

23
23 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 23 of 29 npEDF and npRM guarantee schedulability if c i ≤T 1 – c 1 and k i > 1, or c i ≤T 1 – c 1 and V i ≥ 1 [Deogun 1986] c i ≤ 2(T 1 – c 1 ) and K ≥ 3 [Cai 1996] c i ≤ 2(T 1 – c 1 ) and K = 2 or k i ≥ 3 S is bounded to 2

24
24 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 24 of 29 npEDF and npRM with speedup factor 2 are optimal for task sets with enough vacant interval or integer period ratio greater than 1 In ECRTS 2014, we have introduced a framework to construct customized harmonic periods. It can be used to increase the applicability of our results.

25
25 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 25 of 29

26
26 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Non-preemptive RM (npRM) Precautious-RM (pRM) [Nasri 2014] Cai’s Algorithm (GSSP) [Cai 1996] Group-Based EDF (gEDF) [Li 2007] npEDF + Speedup Factor of [Thekkilakattil 2013] (TSP-EDF) npEDF + Our Speedup Factor (OSP-EDF)

27
27 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 27 of 29 Task sets c i ≤ 2(T 1 – c 1 ) V i ≥ 1 k i ∊ {1, 2, …, 6} Parameter: u 1 from 0.1 to 0.9 OSP-EDF, TSP-EDF, and Precautious-RM have no misses. gEDF has the highest amount of miss ratio. In this case, it is worse than npRM. The goal is to show the efficiency of the speedup of TSP- and OSP-EDF.

28
28 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 28 of 29 npEDF npRM Negative Results Non-existence of any utilization-based test Pessimism in the existing test For tasks with known release time Inefficiency of the recent processor speedup approach for many cases of harmonic tasks

29
29 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 29 of 29 npEDF npRM New Results Schedulability conditions with limited execution time Extending those conditions to task sets with k i > 1 Deriving more efficient speedup factor when the execution time is not limited Deriving more efficient speedup factor when the execution time is not limited

30
30 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 30 of 25 A Framework to Construct Customized Harmonic Periods for RTS Questions Thank you

31
31 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks The speedup factor that guarantees feasibility of npRM and npEDF for task sets with U ≤ 1 and c i ≤ 2(T 1 – c 1 ) and V i ≥ 1 (for 1 < i < n), and V n ≥ 0 is bounded to S is bounded to 2

32
32 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks U ≤ 1 c i ≤ 2(T 1 – c 1 ) We call it the Slack Rule

33
33 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 33 of 25 A Framework to Construct Customized Harmonic Periods for RTS We can use a sort of packing in the tasks so that in the formula, each vacant interval can be occupied by different subset of tasks. We might be able to show that the problem of finding the minimum number of V i s is NP-Complete because it can reduces to subset sum problem. T 1 - c 1 τ1τ1 c1c1 … … c 2 + c 5 + … + c j τ 2, τ 5, …, τ j … T2T2

34
34 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks [Kim 1980] : Exact schedulability analysis for npEDF [Jeffay 1991]: ◦ Necessary and sufficient conditions for schedulability of npEDF for periodic tasks with unknown release phase ◦ npEDF is optimal among non-work conserving algorithms [George 1996, Park 2007, Andersson 2009] : Sufficient conditions for RM and FP algorithms [Marouf 2010] : Schedulability analysis for strictly periodic tasks

35
35 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Clairvoyant EDF [Ekelin 2006] ◦ It looks ahead in the schedule and tries to … ◦ Not optimal Group-Based EDF [Li 2007] ◦ Creates groups of tasks with close deadlines ◦ Selects a task with the shortest execution time from a group with the earliest deadline ◦ Efficient for soft real-time tasks ◦ Not optimal

36
36 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks General task sets with limited execution time ◦ c i ≤ 2(T 1 – c 1 ) ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: U from 0.1 to 0.9

37
37 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 37 of 29 TSP-EDF is only optimal algorithm (it uses S ≤ 8 ). OSP-EDF has in average only 1% miss ratio, however, it cannot guarantee schedulability because of not having V i ≥ 1 condition. Precautious-RM is very efficient among other algorithms, yet it is not optimal. Note: some of those task sets are infeasible.

38
38 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks General task sets ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: U from 0.1 to 0.9 (with uUniFast)

39
39 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 39 of 29 TSP-EDF is only optimal algorithm (it uses speedup). OSP-EDF has in average only 0.02 miss ratio, however, it cannot guarantee schedulability Precautious-RM is very efficient among other algorithms, yet it is not optimal. Note: many of those task sets are infeasible.

40
40 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks Feasible task sets ◦ c i ≤ T 1 – c 1 ◦ V i ≥ 1 ◦ k i ∊ {1, 2, …, 6} ◦ Parameter: u 1 from 0.1 to 0.9

41
41 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 41 of 29 gEDF has a lot of misses. GSSP cannot handle k i =1 Others have no misses Before u 1 =0.5, C max is usually from other tasks, after that c 1 becomes larger than others [Thekkilakattil 1013]

42
42 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks 42 of 29 For the proof we use necessary condition c i ≤ 2(T 1 – c 1 ), thus: ◦ C max is either 2(T 1 – c 1 ) or c 1 ◦ D min is T 1 The speed S that guarantees the feasibility of a non-preemptive execution of a harmonic task set is upper bounded by S ≤ 8 It may reduce U=1 to U’=0.125

43
43 of 29 On the Optimality of RM and EDF for Non-preemptive Harmonic Tasks npRM and npEDF are identical if the period is the tie breaker (for npEDF) From now on, any result for npRM is applicable on npEDF as well RM and EDF are also identical

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google