quantifying the sub optimality of uniprocessor fixed
play

Quantifying the sub-optimality of uniprocessor fixed priority - PowerPoint PPT Presentation

Quantifying the sub-optimality of uniprocessor fixed priority pre-emptive scheduling Robert Davis 1 , Thomas Rothvo 2 , Sanjoy Baruah 3 , Alan Burns 4 1 Real-Time Systems Research Group, University of York 2 Institute of Mathematics, Ecole


  1. Quantifying the sub-optimality of uniprocessor fixed priority pre-emptive scheduling Robert Davis 1 , Thomas Rothvoß 2 , Sanjoy Baruah 3 , Alan Burns 4 1 Real-Time Systems Research Group, University of York 2 Institute of Mathematics, Ecole Polytechnique Federale de Lausanne 3 Dept. of Computer Science, University of North Carolina 4 Real-Time Systems Research Group, University of York

  2. Speedup factor 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 an optimal scheduling algorithm (i.e. any feasible taskset), can be scheduled using fixed priority pre-emptive scheduling, assuming optimal priority assignment?

  3. Problem scope Single processor systems � � 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

  4. Outline of presentation Different speedup factors for different classes of � taskset � Implicit-deadline tasksets ( D i = T i ) [1] � Constrained-deadline tasksets ( D i ≤ T i ) [1] � Arbitrary-deadline tasksets ( D i ≤ T i , D i > T i ) [2] [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). [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.

  5. Background Feasibility and Optimality � � A taskset is said to be feasible if there exists some scheduling algorithm that can schedule the taskset without missing a deadline � A scheduling algorithm is said to be optimal if it can schedule all feasible tasksets EDF is optimal � � Dertouzos (1974), proved that EDF is an optimal uniprocessor pre-emptive scheduling algorithm for arbitrary-deadline tasksets that comply with the sporadic task model � EDF can schedule all feasible tasksets that comply with our model � So we can use a comparison with EDF to determine the speedup factor for fixed priority pre-emptive 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. Optimal priority assignment policies � � 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)

  7. Speedup factor Two perspectives and definitions � #1 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 becomes schedule under FP. #2 Speedup factor is the maximum factor by which the � execution times of a set of tasks, that are only just schedulable under FP can be increased and the taskset remain schedulable under EDF. A taskset is said to be speedup-optimal if it exhibits the � (maximum) speedup factor.

  8. Speedup-optimal tasksets Speedup optimal tasksets are key to finding speedup � factors Properties of speedup-optimal tasksets for implicit- � deadline and constrained-deadline cases [1] [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). � Lemma 1: τ n must be a constraining task, with the longest deadline and the lowest priority. � Lemma 2: τ n must have the longest possible period (infinite in the constrained-deadline case). � Lemma 3: D n must be the start of an idle period. � Lemma 4: All tasks τ i ≠ τ n must have D i < T n � Lemma 5: All tasks τ i ≠ τ n must have D i = T i

  9. Speedup-optimal tasksets Properties of speedup-optimal tasksets for implicit- � deadline and constrained-deadline cases � Lemma 6: All tasks τ i ≠ τ n must have T i > D n /2 � Lemma 7: Following a critical instant, τ n executes continuously from when it first starts execution until it completes. � Lemma 8: The task parameters must comply with the following equation ∑ ∑ ∀ ≠ = = + i n D T C C i i j j ∀ ∀ ∈ j j hp ( i ) � Lemma 9: High priority task execution time is divided into an infinite number of tasks each with an infinitesimal execution time.

  10. Normalised speedup-optimal taskset FP schedule (only just schedulable) D 1 D 2 D 3 D 4 D n ε ε ε ε ε ε ε ε ε ε ε X ε ε 1 T 1 T 2 T 3 T 4 Speedup-optimal taskset V � � Limit as n →∞ of: ∀ ≠ = = + + − − i n D T 1 X ( i 1 ) /( n 1 ) i i = − C i 1 /( n 1 ) C n = = 2 + X D n X � X is as yet an unknown value T = � Implicit-deadline case: D n n � Constrained-deadline case: = ∞ T n

  11. Normalised speedup-optimal taskset Utilisation of high priority tasks: � ⎛ ⎞ − n 1 1 1 ∑ = ⎜ ⎟ V U lim ⎜ ⎟ − + + − − ( n 1 ) ( 1 X ( i 1 ) /( n 1 )) − → ∞ ⎝ ⎠ n 1 = i 1 � Substituting k=n-1 ⎛ ⎞ 1 k 1 ∑ ⎜ ⎟ V = U lim ⎜ ⎟ + + − k ( 1 X ( i 1 ) / k ) → ∞ ⎝ ⎠ k = i 1 � This is a left Riemann sum of y=1/z over the partition [(1+ X ), (2+ X )] � Limit as k →∞ is given by the integral: + 2 X + ⎛ ⎞ 1 2 X ∫ V = = ⎜ ⎟ U dz ln + z ⎝ 1 X ⎠ + 1 X Utilisation of lowest priority task: � � Constrained-deadline case: U n =0 X � Implicit-deadline case: = 2 U n + X

  12. Speedup factor: Implicit-deadline tasksets Total utilisation of speedup-optimal taskset � ⎛ ⎞ + ⎛ ⎞ 2 X X ⎜ ⎟ = + ⎜ ⎟ U ln ⎜ ⎟ + + 1 X 2 X ⎝ ⎠ ⎝ ⎠ Exact EDF schedulability test for implicit-deadline � tasksets: U ≤ 1 (Maximum) speedup factor as a function of X � 1 = f ( X ) ⎛ ⎞ + ⎛ ⎞ 2 X X ⎜ ⎟ + ⎜ ⎟ ln ⎜ ⎟ + + ⎝ 1 X ⎠ 2 X ⎝ ⎠ � f ( X ) is a monotonic non-increasing function of X

  13. Speedup factor: Implicit-deadline tasksets Exact speedup factor � f(X) f(X) for FP scheduling of implicit deadline 1.5 1.5 Maximum value at X =0, tasksets is 1/ln(2) ≈ 1.45 1.45 1.44270 f (0) = 1/ln(2) 1.4 1.4 f(X) As EDF can schedule any Speedup factor f Speedup factor f 1.35 1.35 � taskset with U ≤ 1 1.3 1.3 Speedup factor implies FP 1.25 1.25 can schedule any taskset 1.2 1.2 with U ≤ 1/ln(2) 1.15 1.15 In agreement with and 1.1 1.1 � diverse proof of Liu & 1.05 1.05 Layland’s seminal result 1 1 from 1973 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 X X

  14. Speedup factor: Constrained-deadline tasksets EDF schedule (only just schedulable) FP schedule (only just schedulable) D 1 D 1 D 2 D 2 D 3 D 3 D 4 D 4 D n ε ε ε ε ε ε ε ε ε ε ε ε X ε ε X ε ε ε ε ε 2 +X 2 +X 1 1 T 1 T 1 T 2 T 2 T 3 T 3 T 4 T 4 Constraints on EDF schedulability when scaled by a � factor of f Lowest priority task τ n (i) and one invocation of each higher priority task i.e. f (1+ X ) must complete by 2+ X : + 2 X Monotonically non- f 1( X ) ≤ 1 f 1 ( X ) + X increasing with f 1(0) = 2 (ii) The total utilisation must not exceed 1: 1 Monotonically non- f 2( X ) ≤ f 2 ( X ) + ⎛ ⎞ 2 X decreasing with f 1(0) = √ 2 ≈ 1.4142 ln ⎜ ⎟ + 1 X ⎝ ⎠

  15. Speedup factor: Constrained-deadline tasksets Intersection of the lines � 2.5 2.5 2.5 + ⎛ ⎞ 2 X 1 2.4 2.4 2.4 = ⎜ ⎟ 2.3 2.3 2.3 + + ⎛ ⎞ 1 X 2 X ⎝ ⎠ f1(X) ⎜ ⎟ ln 2.2 2.2 2.2 f2(X) + 1 X ⎝ ⎠ 2.1 2.1 2.1 Speedup factor f Speedup factor f Speedup factor f 2 2 2 1.9 1.9 1.9 1.8 1.8 1.8 1.7 1.7 1.7 1.6 1.6 1.6 1.5 1.5 1.5 1.4 1.4 1.4 1.3 1.3 1.3 Maximum value where 1.2 1.2 1.2 f 1( X ) = f 2( X ) 1.1 1.1 1.1 1 1 1 0 0 0 0.1 0.1 0.1 0.2 0.2 0.2 0.3 0.3 0.3 0.4 0.4 0.4 0.5 0.5 0.5 0.6 0.6 0.6 0.7 0.7 0.7 0.8 0.8 0.8 0.9 0.9 0.9 X X X

  16. Speedup factor: Constrained-deadline tasksets + ⎛ ⎞ 2 X 1 = = ⎜ ⎟ Maximum speedup factor f � + + ⎛ ⎞ 1 X 2 X ⎝ ⎠ ⎜ ⎟ ln + ⎝ 1 X ⎠ ⎛ ⎞ ⎜ ⎟ + ⎛ ⎞ 1 1 1 X ⎜ ⎟ Can be written as: = = ⎜ ⎟ ln � ⎜ ⎟ + + ⎛ ⎞ f 1 X 2 X ⎝ ⎠ ⎜ ⎜ ⎟ ⎟ + 2 X ⎝ ⎠ ⎝ ⎠ Similar to the transcendental equation: ln(1/ Ω ) = Ω � defining the mathematical constant Ω ≈ 0.567143 Upper bound on speedup factor is 1/ Ω ≈ 1.76322 � � Note upper bound as constraints used are necessary for EDF schedulability, but not sufficient

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend