Applica'ons of scheduling theory to real-'me compu'ng Sanjoy - - PowerPoint PPT Presentation
Applica'ons of scheduling theory to real-'me compu'ng Sanjoy - - PowerPoint PPT Presentation
Applica'ons of scheduling theory to real-'me compu'ng Sanjoy Baruah The University of North Carolina Applica'ons of scheduling theory to real-'me compu'ng Scheduling theory is widely applicable to real->me compu>ng But real->me
Applica'ons of scheduling theory to real-'me compu'ng
Scheduling theory is widely applicable to real->me compu>ng But real->me systems are represented using different models Solu>on objec'ves may also be different This talk: some interes>ng models and associated scheduling problems
- Precedence-constrained scheduling
- Mixed cri>cality
- “SoG” real->me systems
#pragma omp parallel num threads(N){ #pragma omp master { #pragma omp task{ if (condition) #pragma omp task{//T1} else { #pragma omp task {//T2 } #pragma omp task {//T3 } #pragma omp task {//T4 } } }}}
T2 T4 T3 T1
Condi'onal DAGs Condi'onal code
Precedence constrained scheduling
Condi'onal DAGs
Precedence constrained scheduling Volume = 24 Length = 8 Volume = 20 Length = 10 Volume = 24 Length = 10 Does not preserve feasibility or infeasibility
Condi'onal DAGs
…
Exponen>ally many paths to consider… Precedence constrained scheduling
Condi'onal DAGs
Precedence constrained scheduling Collec'ons of sporadic DAG tasks – recur with specified min. inter-arrival dura>on Qn: What is the computa>onal complexity of compu>ng the makespan? Qn: Determine a suitable scheduling strategy (e.g., List Scheduling) with good predictable makespan bound
Mixed cri'cality – makespan minimiza'on
Blue (non-cri>cal) and red (cri>cal) jobs Job j has two execu>on->me es>mates: Cj(lo) and Cj(hi). [Cj(lo) ≤ Cj(hi)] Seman>cs:
- If each job j signals comple>on upon execu>ng for ≤ Cj(lo) >me,
then all jobs should complete execu>on
- If each job j signals comple>on upon execu>ng for ≤ Cj(hi) >me,
then all red jobs should complete execu>on Schedule a given collec>on of mixed-cri>cality jobs to minimize makespan
- Upon a single machine – cri>cality monotonic scheduling
- Non-preemp>ve, on mul>ple machines – Vector Scheduling
- Preemp>ve?
Less conserva>ve More conserva>ve Extensions: Release dates; deadlines; recurrent tasks
Mixed cri'cality – makespan minimiza'on
Blue (non-cri>cal) and red (cri>cal) jobs Job j has two execu>on->me es>mates: Cj(lo) and Cj(hi). [Cj(lo) ≤ Cj(hi)] Seman>cs:
- If each job j signals comple>on upon execu>ng for ≤ Cj(lo) >me,
then all jobs should complete execu>on
- If each job j signals comple>on upon execu>ng for ≤ Cj(hi) >me,
then all red jobs should complete execu>on Schedule a given collec>on of mixed-cri>cality jobs to minimize makespan
- Upon a single machine – cri>cality monotonic scheduling
- Non-preemp>ve, on mul>ple machines – Vector Scheduling
- Preemp>ve?
Qn: Determine prac>cal solu>ons to the non-preemp>ve problem [Prac>cally useful algorithms for vector scheduling]
I’m looking for more focus on algorithms that work fast with respect to problems whose size, n, is feasible. Most of today’s literature is devoted to algorithms that are asympto>cally great, but they are helpful only when n exceeds the size of the universe.
- Donald Knuth , 2014. In Twenty Ques+ons for Donald Knuth
Weakening the HARD-REAL-TIME requirement –all deadlines must be met Bounded tardiness Skip-over tasks (m,k)-firm tasks
Tardiness bounds
Given a workload specified in some model and a scheduling algorithm/ environment Determine the maximum tardiness experienced by en>>es in the workload Collec>on of sporadic tasks. τi = (Ci, Ti)
Ci – worst-case execu>on >me (WCET) Ti – minimum inter-arrival dura>on (“period”) Generates jobs ≥ Ti >me apart, each with exec. requirement ≤ Ci and deadline Ti >me later
Ti
Tardiness bounds
Given a workload specified in some model and a scheduling algorithm/ environment Determine the maximum tardiness experienced by en>>es in the workload preemp've EDF, on iden'cal machines Collec>on of sporadic tasks Example: τ1 = (2, 3), τ2 = (2, 3), τ3 = (8, 12) upon 2 machines
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Tardiness bounds
Given a workload specified in some model and a scheduling algorithm/ environment Determine the maximum tardiness experienced by en>>es in the workload preemp've EDF, on iden'cal machines Collec>on of sporadic tasks Qn: Determine the maximum tardiness that may be experienced by each task’s jobs Qn: Analogous ques>ons for uniform machines Qn: Propose “appropriate” scheduling algorithms that minimize tardiness Qn: Repeat, for when tasks may have deadline parameters different from periods
Tardiness bounds
Given a workload specified in some model and a scheduling algorithm/ environment Determine the maximum tardiness experienced by en>>es in the workload preemp've EDF, on iden'cal machines Collec>on of sporadic tasks Qn: Determine the maximum tardiness that may be experienced by each task’s jobs Qn: Analogous ques>ons for uniform machines Qn: Propose “appropriate” scheduling algorithms that minimize tardiness Qn: Repeat, for when tasks may have deadline parameters different from periods
Priority-based scheduling algorithms for recurrent tasks
- Fixed-Task Priori>es (e.g., Rate-Monotonic)
- Fixed-Job Priori>es (e.g., EDF)
- Dynamic Priority (e.g., Least Laxity)
Other relaxa'ons of hard-real-'me
The skip-over model – each sporadic task has a skip parameter s. At least s completed jobs between successive skipped jobs The (m,k)-firm model. At least m of every k consecu>ve jobs must execute correctly Feasibility analysis known to be NP-hard (even on uniprocessors) Good approximate scheduling algorithms?
Condi>onal precedence-constrained jobs Mixed-cri>cality systems Not all deadlines need be met
The computa>onal complexity of makespan minimiza>on The behavior of list-scheduling Makespan minimiza>on for preemp>ve scheduling More “prac>cal” algorithms for non-preemp>ve scheduling Tardiness bounds for EDF on iden>cal/ uniform machines Scheduling algorithms with bener (smaller) tardiness bounds Approxima>on algorithms for other models – skip-over, (m,k), etc.