Dual Priority Scheduling is Not Optimal Pontus Ekberg Uppsala University ECRTS 2019 Stuttgart, Germany
Dual priority scheduling? (Euromicro Workshop on Real-Time Systems, 1993) 2
Dual priority scheduling? (Euromicro Workshop on Real-Time Systems, 1993) 2
e i p i , assign i and How does it work? i i p i i i i i i i i i Confjgurations two priority levels: p i i a phase change point i For each task Assumptions 3 • Implicit deadline periodic tasks • Single preemptive processor
How does it work? i i p i i i i i i i i Confjgurations i Assumptions 3 • Implicit deadline periodic tasks • Single preemptive processor For each task τ i = ( e i , p i ) , assign • a phase change point δ i ∈ { 0 , . . . , p i } • two priority levels: π 1 i and π 2
How does it work? i i p i i i i i i i i Confjgurations i Assumptions 3 • Implicit deadline periodic tasks • Single preemptive processor For each task τ i = ( e i , p i ) , assign • a phase change point δ i ∈ { 0 , . . . , p i } • two priority levels: π 1 i and π 2
How does it work? i p i i i i i i i i Confjgurations i Assumptions 3 • Implicit deadline periodic tasks • Single preemptive processor For each task τ i = ( e i , p i ) , assign • a phase change point δ i ∈ { 0 , . . . , p i } • two priority levels: π 1 i and π 2 δ i
How does it work? i p i i i i i i i i 3 Confjgurations i Assumptions • Implicit deadline periodic tasks • Single preemptive processor For each task τ i = ( e i , p i ) , assign • a phase change point δ i ∈ { 0 , . . . , p i } • two priority levels: π 1 i and π 2 π 1 π 2 π 1 π 2 π 1 π 2 π 1 π 2 δ i
Comparing with FP and EDF FP: optimal EDF: i i i 4 i ? Dual prio: suboptimal π i π i π 1 π 2 π 1 π 2 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
Comparing with FP and EDF FP: optimal EDF: i i i 4 i ? Dual prio: suboptimal π i π i π 1 π 2 π 1 π 2 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
Comparing with FP and EDF FP: optimal EDF: i i i 4 i ? Dual prio: suboptimal π i π i π 1 π 2 π 1 π 2 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7
Is dual priority scheduling optimal? Dual priority scheduling is optimal for implicit deadline periodic tasks. Conjecture 1 (Burns and Wellings, 1993) (Sadly not) 5
i , i , Why was this a difficult conjecture? But in practice… Schedulability test hyper-period until a deadline miss. i ), simulate the For every confjguration (setuing of Evaluating the schedulability can be very costly Find a task set that is Almost all task sets are schedulable Easy! Disproving the conjecture not dual priority schedulable. ), and feasible (U 6
i , i , Why was this a difficult conjecture? Find a task set that is Disproving the conjecture Easy! Almost all task sets are schedulable Evaluating the schedulability can be very costly But in practice… For every confjguration (setuing of i ), simulate the hyper-period until a deadline miss. Schedulability test 6 • feasible (U ⩽ 1 ), and • not dual priority schedulable.
i , i , Why was this a difficult conjecture? Find a task set that is Disproving the conjecture Easy! Almost all task sets are schedulable Evaluating the schedulability can be very costly But in practice… For every confjguration (setuing of i ), simulate the hyper-period until a deadline miss. Schedulability test 6 • feasible (U ⩽ 1 ), and • not dual priority schedulable.
i , i , Why was this a difficult conjecture? Find a task set that is Disproving the conjecture Easy! But in practice… For every confjguration (setuing of i ), simulate the hyper-period until a deadline miss. Schedulability test 6 • feasible (U ⩽ 1 ), and • not dual priority schedulable. • Almost all task sets are schedulable • Evaluating the schedulability can be very costly
Why was this a difficult conjecture? Find a task set that is Disproving the conjecture Easy! But in practice… hyper-period until a deadline miss. Schedulability test 6 • feasible (U ⩽ 1 ), and • not dual priority schedulable. • Almost all task sets are schedulable • Evaluating the schedulability can be very costly For every confjguration (setuing of π 1 i , π 2 i , δ i ), simulate the
n has Assumptions How many configurations are there? A task set n n i p i distinct confjgurations. 7 • All priority levels are unique ⇒ A total of (2 n )! permutations • Phase change points ( δ i ) are integer ⇒ A total of ∏ n i =1 ( p i + 1) combinations
Assumptions How many configurations are there? n distinct confjgurations. 7 • All priority levels are unique ⇒ A total of (2 n )! permutations • Phase change points ( δ i ) are integer ⇒ A total of ∏ n i =1 ( p i + 1) combinations A task set T = { τ 1 , . . . , τ n } has ∏ (2 n )! × ( p i + 1) i =1
A counterexample hyper-period: would take hundreds of years on my computer. Simulating the full hyper-period for all confjgurations 728 082 432 000 p i i n n #configurations Not dual priority schedulable utilization: 16 390 597 8 e i p i 8 19 τ 1 13 29 τ 2 ∼ 0 . 9999971 9 151 τ 3 14 197 τ 4
A counterexample e i would take hundreds of years on my computer. Simulating the full hyper-period for all confjgurations n Not dual priority schedulable utilization: 16 390 597 hyper-period: 8 p i 8 19 τ 1 13 29 τ 2 ∼ 0 . 9999971 9 151 τ 3 14 197 τ 4 ∏ #configurations = (2 n )! × ( p i + 1) = 728 082 432 000 i =1
A counterexample e i would take hundreds of years on my computer. Simulating the full hyper-period for all confjgurations n Not dual priority schedulable utilization: 16 390 597 hyper-period: 8 p i 8 19 τ 1 13 29 τ 2 ∼ 0 . 9999971 9 151 τ 3 14 197 τ 4 ∏ #configurations = (2 n )! × ( p i + 1) = 728 082 432 000 i =1
The saving grace Most confjgurations lead to a deadline miss very early. For the previous counterexample, less than % of the hyper-period is simulated on average. Simulation time is days on an offjce computer. 9
The saving grace Most confjgurations lead to a deadline miss very early. For the previous counterexample, less than of the hyper-period is simulated on average. Simulation time is days on an offjce computer. 9 0 . 00019 %
The saving grace Most confjgurations lead to a deadline miss very early. For the previous counterexample, less than of the hyper-period is simulated on average. 9 0 . 00019 % Simulation time is ∼ 2 . 5 days on an offjce computer.
1 phase 1 priorities ( i ) are RM 2 phase 2 priorities ( i ) are RM Recognizing the needle: RM+RM A dual priority confjguration is called RM+RM if 3 max i i min i i Defjnition: RM+RM RM+RM is an optimal choice of priorities. Conjecture 2 (George et al., 2014) (Sadly not, even considering only point 1 above) 10 #configurations = (2 n )! × ∏ n i =1 ( p i + 1)
1 phase 1 priorities ( i ) are RM 2 phase 2 priorities ( i ) are RM Recognizing the needle: RM+RM A dual priority confjguration is called RM+RM if 3 max i i min i i Defjnition: RM+RM RM+RM is an optimal choice of priorities. Conjecture 2 (George et al., 2014) (Sadly not, even considering only point 1 above) 10 #configurations = (2 n )! × ∏ n i =1 ( p i + 1)
Recognizing the needle: RM+RM Defjnition: RM+RM 1 above) (Sadly not, even considering only point Conjecture 2 (George et al., 2014) RM+RM is an optimal choice of priorities. 10 A dual priority confjguration is called RM+RM if #configurations = (2 n )! × ∏ n i =1 ( p i + 1) 1 phase 1 priorities ( π 1 i ) are RM 2 phase 2 priorities ( π 2 i ) are RM 3 max i { π 2 i } ⩽ min i { π 1 i }
Recognizing the needle: RM+RM Defjnition: RM+RM 1 above) (Sadly not, even considering only point Conjecture 2 (George et al., 2014) RM+RM is an optimal choice of priorities. 10 A dual priority confjguration is called RM+RM if #configurations = (2 n )! × ∏ n i =1 ( p i + 1) 1 phase 1 priorities ( π 1 i ) are RM 2 phase 2 priorities ( π 2 i ) are RM 3 max i { π 2 i } ⩽ min i { π 1 i }
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1)
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1)
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1)
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1) ✗
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1) ✗
Recognizing the needle: FDMS (Fautrel et al., 2018) FDMS always fjnds optimal phase change points. Conjecture 3 (Fautrel et al., 2018) (Sadly not) 11 #configurations = (2 n )! × ∏ n i =1 ( p i + 1) ✗
Recommend
More recommend