Presentation is loading. Please wait.

Presentation is loading. Please wait.

Quantifying the sub-optimality of uniprocessor fixed priority non-pre-emptive scheduling Robert Davis 1, Laurent George 2, Pierre Courbin 3 1 Real-Time.

Similar presentations


Presentation on theme: "Quantifying the sub-optimality of uniprocessor fixed priority non-pre-emptive scheduling Robert Davis 1, Laurent George 2, Pierre Courbin 3 1 Real-Time."— Presentation transcript:

1 Quantifying the sub-optimality of uniprocessor fixed priority non-pre-emptive scheduling Robert Davis 1, Laurent George 2, Pierre Courbin 3 1 Real-Time Systems Research Group, University of York 2 AOSTE Team, INRIA 3 Ecole Centrale d’Electronique de Paris (ECE)

2 Speedup factors QUESTION: What is the speedup factor by which the processing speed of a single processor would need to be increased, so that any taskset that was previously schedulable according to some optimal scheduling algorithm, can be scheduled using fixed priority scheduling, assuming optimal priority assignment?

3 Problem scope Single processor systems Non-pre-emptive scheduling Execution time of all tasks scales linearly with processor speed Sporadic task model Static set of n tasks  i with priorities 1..n Bounded worst-case execution time C i Sporadic/periodic arrivals: minimum inter-arrival time T i Relative deadline D i Utilisation U i =C i /T i Independent execution Arrivals are independent and unknown a priori (non- concrete)

4 Background Feasibility and Optimality A taskset is said to be feasible if there exists some scheduling algorithm that can schedule the taskset without missing as deadline A scheduling algorithm is said to be optimal if it can schedule all feasible tasksets EDF-P is optimal Dertouzos (1974), proved that EDF-P is an optimal uniprocessor pre-emptive scheduling algorithm for arbitrary-deadline tasksets that comply with the sporadic task model EDF-P can schedule all feasible tasksets that comply with our model We have previously used a comparison with EDF-P to determine speedup factors for FP-P scheduling

5 Background Non-pre-emptive No work-conserving non-pre-emptive algorithm is optimal. Inserted idle time is necessary for optimality amongst non-pre-emptive algorithms. No optimal on-line inserted idle time algorithm can exist (Howell and Venkatra, 1995). Clairvoyance is also necessary for optimality. EDF-NP EDF-NP is optimal in the weak sense that it can schedule any taskset for which a feasible work-conserving non- pre-emptive schedule exists (George et al. 1995) We can use a comparison with EDF-NP to determine the speedup factor for FP-NP scheduling

6 Background FP scheduling: Optimal Priority Assignment A priority assignment policy Q is said to be optimal if there are no tasksets that are schedulable using some other priority assignment policy P which are not also schedulable using policy Q. FP-P Optimal priority assignment Implicit-deadline tasksets – Rate-Monotonic (Liu & Layland, 1973) Constrained-deadline tasksets – Deadline Monotonic (Leung & Whitehead, 1982) Arbitrary-deadline tasksets – Optimal Priority Assignment algorithm, (Audsley, 1993) FP-NP Optimal priority assignment All 3 cases – OPA algorithm, i.e. Audsley’s algorithm, (George et al., 1995)

7 Previous results for FP-P Taskset Constraints [Priority ordering] Speedup factor Lower bound Upper bound References Implicit-deadline [Rate Monotonic] 1/ln(2) ≈ 1.44269 (Dertouzos, 1974) / (Liu & Layland, 1973) Constrained-deadline [Deadline Monotonic] 1/Ω ≈ 1.76322 (Davis et al., 2009a) Arbitrary-deadline [OPA] 1/Ω ≈ 1.76322 2 (Davis et al., 2009b) Speedup factor: increase in processing speed required so that any feasible taskset (schedulable by an optimal scheduling algorithm) can be scheduled using FP-P scheduling

8 Speedup factor Definition #1 Let be the lowest processor speed such that a taskset is schedulable according to an optimal algorithm Similarly is the lowest speed assuming algorithm A Speedup factor is given by: Speedup factor is the maximum factor by which it is necessary to increase the processor speed so that any taskset that was schedulable under EDF-NP becomes schedulable under FP-NP.

9 Speedup factor Definition #2 Let S be some arbitrary taskset, and is the maximum factor by which the execution times of the tasks in S can be scaled and remain schedulable under FP-NP. Similarly, let be the maximum scaling factor under EDF-NP then the speedup factor for taskset S is The speedup factor for FP-NP is the maximum such factor for any taskset A taskset is said to be speedup-optimal if it requires the (maximum) speedup factor.

10 Example Taskset parameters DADA FP-NP schedule τDτDτDτD TATA 1 Task CiCi D i = T i τAτA 16 τBτB 17 τCτC 18 τDτD 3+∆∞ 23TBTB TCTC DBDB DCDCD τCτC τDτD τBτB τAτA τCτC τBτB τAτA τCτC τDτD τBτB τBτB τAτA τCτC τAτA Scaling factors Speedup factor for this taskset = EDF-NP schedule τCτC τDτD τBτB τBτB τAτA τCτC τAτA

11 Speedup factor: Lower bound Taskset parameters D1D1 FP-NP schedule T1T1 Task CiCi D i = T i τiτi τnτn X+∆X+∆∞ T2T2 T3T3 D2D2 D3D3 DnDn Scaling factor X ε ε εε εεεεε εεε X ε ε εε εεεεε εεε

12 Speedup factor: Lower bound Taskset is a modified version of the speedup optimal taskset for the pre-emptive case Tasks 1 to n-1 same as the pre-emptive case (Davis et al, 2009a) Lowest priority task now has an infinite deadline (as well as an infinite period), so the taskset has implicit deadlines Lowest priority task causes blocking Task at priority n-1 constrains the scaling factors Priority assignment Need to show that no priority ordering can lead to schedulability with a larger scaling factor – argument based on the operation of Audsley’s OPA algorithm is given in the paper.

13 Scaling factor for EDF-NP Two key conditions limit the scaling factor: 1. The first job of every task must complete by the deadline of task n-1: 2. Utilisation of the scaled taskset must not exceed 100% Utilisation given by: This is a left Riemann sum of y=1/z over [(1+X), (2+X)] Limit as n→∞ is given by the integral: Hence:

14 Scaling factor for EDF-NP Intersection of the lines as ε →0 similar to the transcendental equation: ln(1/Ω) = Ω defining the mathematical constant Ω ≈ 0.567143 Proof of schedulability with this scaling factor is required - given in the paper Maximum value where a1(X) = a2(X)

15 Speedup factor: Lower bound Scaling factor for EDF-NP Scaling factor for FP-NP Lower bound on the Speedup factor for FP-NP scheduling: Note the taskset has implicit deadlines, so this lower bound applies to implicit, constrained and arbitrary deadline tasksets

16 Speedup factor: Upper bound Let S be any taskset that is schedulable under EDF-NP on a processor of speed 1 As the taskset is schedulable, then at time t=2D k : Now consider taskset S scheduled on a processor of speed 2 using FP-NP scheduling, and that the tasks are indexed in Deadline Monotonic priority order From above:

17 Speedup factor: Upper bound 1 st two terms, blocking factor for FP-NP scheduling (detail given in the paper) Sum term can also be substituted, noting that and Formed a sufficient schedulability test for task k under FP-NP (repeating for each k shows the taskset is schedulable) Upper Bound on Speedup factor for FP-NP is therefore 2 Holds for tasks with arbitrary deadlines and hence also for implicit and constrained deadline tasksets

18 Empirical verification Verified using integer values for task parameters Using exact analysis for FP-NP and EDF- NP scheduling Saw-tooth is an artefact due to quantisation of speedup factors due to use of integers

19 Speedup factor: Summary Speedup factor: increase in processing speed required so that any feasible taskset (schedulable by an optimal algorithm) can be scheduled using Fixed Priority scheduling Taskset Constraints [Priority ordering] FP-P Speedup factor Lower bound Upper bound Implicit-deadline [RM] [OPA] 1/ln(2) ≈ 1.44269 Constrained-deadline [DM] [OPA] 1/Ω ≈ 1.76322 Arbitrary-deadline [OPA] 1/Ω ≈ 1.76322 2 FP-NP Speedup factor Lower bound Upper bound 1/Ω ≈ 1.76322 2 2 2

20 Future work / open questions Determining exact speedup factors for FP-NP, and for FP-P with arbitrary deadline tasksets These are where optimal priority assignment requires Audsley’s OPA algorithm – complicates proof of speedup optimal taskset attributes Determining the exact speedup factor as a function of the number of tasks Empirical investigation Try to find tasksets that require a speedup factor > 1/Ω Is 1/Ω ultimately the limit ???

21 Questions [1] R.I. Davis, T. Rothvoß, S.K. Baruah, A. Burns “Exact Quantification of the Sub-optimality of Uniprocessor Fixed Priority Pre-emptive Scheduling”. Real- Time Systems, Volume 43, Number 3, pages 211-258, November 2009. (Published online 17th July 2009). Gives the Exact speedup factor for implicit- and constrained-deadline tasksets (pre-emptive scheduling) [2] R.I. Davis, T. Rothvoß, S.K. Baruah, A. Burns “Quantifying the Sub- optimality of Uniprocessor Fixed Priority Pre-emptive Scheduling for Sporadic Tasksets with Arbitrary Deadlines”. RTNS’09, October 26-27th, 2009. Gives upper and lower bounds for arbitrary-deadline tasksets (pre-emptive scheduling) [3] R.I. Davis, L. George, P. Courbin “Quantifying the Sub-optimality of Uniprocessor Fixed Priority Non-pre-emptive Scheduling”. RTNS’10, November 4-5th, 2010. Gives upper and lower bounds for implicit, constrained, and arbitrary- deadline tasksets (non-pre-emptive scheduling)


Download ppt "Quantifying the sub-optimality of uniprocessor fixed priority non-pre-emptive scheduling Robert Davis 1, Laurent George 2, Pierre Courbin 3 1 Real-Time."

Similar presentations


Ads by Google