Risat Pathan Chalmers University of Technology, Sweden Improving the Schedulability and Quality of Service for Federated Scheduling of Parallel Mixed-Criticality Tasks on Multiprocessors Risat Pathan Chalmers University of Technology, Sweden
Outline Background State-of-the-art and its limitations Improving Schedulability Improving QoS Results and Conclusion J. Li, D. Ferry, S. Ahuja, K. Agrawal, C. Gill, and C. Lu. Mixed-criticality federated scheduling for parallel real-time tasks. In Proc. of RTAS, April 2016. J. Li, J. J. Chen, K. Agrawal, C. Lu, C. Gill, and A. Saifullah. Mixed-criticality federated scheduling for parallel real-time tasks. Real-Time Systems, Sep 2017.
Background: Parallel non-MC Tasks (DAG) 𝐶 𝐴 =3 𝐶 𝐵 =4 𝐶 𝐷 =3 𝐶 𝑐 =2 𝐶=10 A sequential task with WCET C = 10 Period T = 20 A parallel task with Total work C=12 Length of longest path L=10 Period T=20
Background: Federated Scheduling of non-MC parallel tasks Phase 1: Assigning processors to the tasks Phase 2: Scheduling Algorithm Each task is either a heavy task or a light task Each heavy task is assigned a number of dedicated processors Nodes of each heavy task are scheduled using some greedy scheduler only on its dedicated processors All the light tasks are assigned to the remaining (shared) processors Light tasks are executed sequentially Partitioned scheduling of sequential tasks A heavy task Total work C=24 Period T=20 Utilization U=1.2 𝐶 𝐴 =3 𝐶 𝐵 =8 𝐶 𝐷 =3 𝐶 𝑐 =10 𝐶 𝐵 =4 𝐶 𝑐 =2 A light task Total work C=12 Utilization U=0.6
Example: Federated Scheduling of non-MC parallel tasks 5 10 20 30 5 10 3 14 1 7 3 2 1 C=25 T =100 U=0.25 C=50 T =40 U=1.25 Light Task Heavy Task C=8 T=16 U=0.5 C=60 T =30 U=2.0 Light Task Heavy Task M1 = 3 Analysis M2 = 4 Analysis M3 = 1 Analysis Sched Test: If M1+M2+M3 <=P, then all deadlines are met. where P=# of processors
Parallel Mixed-Critical (MC) Tasks Dual-Criticality System Each task is either a high (HI) or a low (LO) critical task 𝐶 𝐴 =3 𝐶 𝐵 =4 𝐶 𝐷 =3 𝐶 𝑐 =2 𝐶𝑂 𝐵 =8 𝐶𝑂 𝑐 =6 A parallel MC task with Total work CN=12 Length (longest path) LN=10 Period T=15 𝐶 𝑁 =10 , 𝐶 𝑂 =12 CO=20 LO=14 A sequential MC task with WCET CN = 10 CO=12 Period T = 20 Nominal WCET Overloaded WCET Overloaded Work and critical path length Nominal work and critical path length
MC Parallel Task Model We consider n implicit-deadline parallel MC sporadic tasks Task i (Zi, Ti, Ci, Li) where Zi {LO, HI} and Ti= period (also deadline) If Zi =HI, then Ci = <CN , CO> where CN ≤ CO Li = <LN , LO> where LN ≤ LO If Zi =LO, then Ci = CN and Li=LN Each task is also assigned a virtual deadline Vi
Federated Scheduling of MC tasks Phase 1: Assigning processors to MC tasks Phase 2: Runtime MC scheduling
States/Criticality Behaviors Typical State Critical State Both LO and HI-crit tasks execute No task overrun its virtual deadline Only HI-crit tasks execute Task do not overrun LiHI and CiHI starts at time t t+s Some task does not signal completion by its virtual deadline STATE SWITCHES AT (t+s) LO-crit tasks are dropped at time (t+s) to provide more processors to high critical tasks
Example: Processors Assignment to Tasks (Federated Scheduling of MC tasks) 5 10 20 3 14 1 7 30 5 10 3 2 1 UN=0.25 Light, Low Crit UN=0.25 UO=0.5 UN=1.25 Light, High Crit Heavy, Low Crit UN=1.0 UO=2.0 Heavy, High Crit MN =2 MO =0 Analysis MN =3 MO =8 Analysis MN =1 MO =1 Analysis Each task i is also assigned its virtual deadline Vi
Federated MC Scheduling (Runtime) The system starts in typical state All the light MC tasks execute on Mlight processors Partitioned MC scheduling of sequential tasks Each heavy task i executes on MiN dedicated processors based on greedy scheduling If some task does not complete by its virtual deadline, then state switches to critical state The heavy task i now executes on MiO dedicated processors The additional (MiO-MiN) processors are taken by dropping some LO-criticality tasks
Schedulability Test Consider P=8 Processors State-of-the-art Test: Federated Scheduling of MC tasks Consider P=8 Processors Σ MN=2+3+1=6 (Success in Typical State) Σ MO=0+8+1=9 (Failure in Critical State) 5 10 20 3 14 1 7 30 5 10 3 2 1 Light Low Crit Light High Crit Heavy Low Crit Heavy High Crit MN =2 MO =0 Analysis MN =3 MO =8 Analysis MN =1 MO =1 Analysis Schedulability Test If Σ MN <= P, then all the deadlines are met in typical state If Σ MO <= P, then all the deadlines are met in critical state
State-of-the-art Test: Federated Scheduling of MC tasks Consider P=8 processors Σ MN=2+3+1=6 (Success in Typical State) Σ MO=0+8+1=9 (Failure in Critical State) 5 10 20 3 14 1 7 30 5 10 3 2 1 Light Low Crit Light High Crit Heavy Low Crit Heavy High Crit MN =2 MO =0 Analysis MN =3 MO =8 Analysis MN =1 MO =1 Analysis Do we have some other assignment of processors such that the task set is schedulable? Schedulability Test If Σ MN <= P, then all the deadlines are met in typical state If Σ MO <= P, then all the deadlines are met in critical state
Improving the Schedulability and Quality of Service for Federated Scheduling of Parallel Mixed-Criticality Tasks on Multiprocessors
The main contribution A new schedulability test for each heavy MC task i is proposed TEST(MN, MO, i) = True and False For MN=1 to P For MO=1 to P if TEST(MN, MO, i)==TRUE “Valid alternative (MN, MO) for i” We select one (MN, MO) form all the alternatives such that the overall task set is schedulable
Schedulability Test Consider P=8 processors Σ MN=2+4+1=7 (Success) Improving Schedulability: Federated Scheduling of MC tasks Consider P=8 processors Σ MN=2+4+1=7 (Success) Σ MO=0+6+1=7 (Success) Consider P=8 processors Σ MN=2+3+1=6 (Success) Σ MO=0+8+1=9 (Failure) Consider P=8 processors Σ MN=2+3+1=6 (Success) Σ MO=0+8+1=9 (Failure) 5 10 20 3 14 1 7 30 5 10 3 2 1 Light Low Crit Light High Crit Heavy Low Crit Heavy High Crit MN =2 MO =0 Analysis MN =3 MO =8 Analysis MN =1 MO =1 Analysis MN =4 MO =6 Schedulability Test If Σ MN <= P, then typical ok If Σ MO <= P, then critical ok
Schedulability Test Consider P=8 processors Consider P=8 processors Improving QoS: Federated Scheduling of MC tasks Although schedulable, the low-crit heavy task is dropped. Do we have some other assignment of processors to the heavy tasks such that the LO-crit task is not dropped? Consider P=8 processors Σ MN=2+4+1=7 (Success) Σ MO=0+6+1=7 (Success) Consider P=8 processors Σ MN=2+5+1=8 (Success) Σ MO=2+5+1=8 (Success) 5 10 20 3 14 1 7 30 5 10 3 2 1 Light Low Crit Light High Crit Heavy Low Crit Heavy High Crit LO Critical (Heavy) High Critical (Heavy) LO and HI critical (Light) MN =2 MO =0 Analysis MN =3 MO =8 Analysis MN =1 MO =1 Analysis MN =4 MO =6 Schedulability Test If Σ MN <= P, then typical ok If Σ MO <= P, then critical ok MN =2 MO =2 MN =5 MO =5
Other Contributions Each task may have O(P) possible ways of assigning processors (MN, MO) N tasks may have O(PN) possible ways of selecting the alternative A dynamic programming algorithm is proposed to find the allocation of the processors to the tasks in polynomial time There may be multiple valid ways to allocate the processors to the tasks By selecting the allocation that requires the minimum number of processors during the critical state, we see that some LO crit tasks are not dropped. An ILP is formulated to maximize the number of LO-crit taskshat are never dropped Simulation shows better QoS w.r.t. the state of the art
Simulation Randomly generated task sets are evaluated Our-MCF test are compared with MCFS-Improve [RTAS16, RTJ17] test
Acceptance Ratio, M=16
Acceptance Ratio, M=16, 32, 64, 128
QoS metric: Average fraction of LO-crit tasks that are never dropped For each schedulable task set, The fraction of LO-crit tasks that are never dropped is computed For example, if 2 out of 10 LO-crit tasks are never dropped, then this fraction is 20% Metric: Average fraction of LO-crit tasks that are never dropped
QoS
Conclusion A new way to assign the processors to MC parallel tasks for federated scheduling Improves the schedulability and the QoS of the system Future work: Greedy vs. other scheduler
Thank You risat@chalmers.se
Weighted Schedulability