22
Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1 , Carter Bass 1 , Eli Lasker 1 , Micah Wylde 2 , Christopher Gill 1 & William D. Smart 1 1 CSE Department, Washington University, St. Louis, MO, USA 2 Wesleyan University, Middletown, CT, USA 23 rd Euromicro Conference on Real-Time Systems Porto, Portugal, July 6-8, 2011 *Research supported in part by NSF grants CNS-0716764 (Cybertrust) and CCF-0448562 (CAREER)

Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

Embed Size (px)

Citation preview

Page 1: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive

Execution Intervals*

Terry Tidwell1, Carter Bass1, Eli Lasker1, Micah Wylde2, Christopher Gill1

& William D. Smart1

1CSE Department, Washington University, St. Louis, MO, USA

2Wesleyan University, Middletown, CT, USA23rd Euromicro Conference on Real-Time

SystemsPorto, Portugal, July 6-8, 2011

*Research supported in part by NSF grants CNS-0716764 (Cybertrust) and CCF-0448562 (CAREER)

Page 2: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

2 - Tidwell et al. – 04/21/23

Motivating Example: Control Tasks Designed to execute at a specific frequency

»Inter-job jitter may impact control stability»Task execution times may have stochastic distributions»Preemption may not be feasible (episodic binding of devices/processing to tasks)

Time

controller

actuator

sensor

CAN

Early completion may be as problematic as late»Sensor data may be fresher later»Very early actuation may disrupt physical control»Job’s value increases the nearer to a target it completes

Page 3: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

3 - Tidwell et al. – 04/21/23

Time Utility Functions (TUFs) A TUF encodes the utility gained from completing a job, as a function of time»Can describe a rich variety of timing constraints

Time

Uti

lity

Based on Figure 1 in Ravindran, et. al. “On Recent Advances in Time/Utility Function Real-Time Scheduling and Resource Management”, 2005. Previous goal (RTSS 2010) and results»Maximize stochastic non-preemptive tasks’ utility accrual»MDP-based approach gives value-optimal scheduling policy

Goal and results of this work»Make scalable in # of tasks, still with high utility accrual»Heuristics are scalable, can perform well (selectively)

Page 4: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

4 - Tidwell et al. – 04/21/23

System Model Tasks

»Periodic, non-preemptive, with stochastic durations»A job’s value: its TUF at completion time (soft real-time)»Also may add a deadline miss penalty (hard real-time)

System states»Finite duration distributions and hyper-period guarantee a finite number of states can model tasks’ resource use

»A scheduling policy decides action to take in each state»I.e., which task to schedule (or to idle the resource)

action 2action 1idle action

Page 5: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

5 - Tidwell et al. – 04/21/23

Scheduling Policy Design/Evaluation

x0 x1 x2 x3

γ0 r0

t0 – t1

γ1 r1

t1 – t2

γ2 r2

t2 – t3

= + + +V(π)

V(π): the value of a scheduling policy π»Long term future expectation of utility accrual

»Discount factor (γ=0.99) makes sum of rewards converge

»MDP uses V(π) to find value-optimal scheduling policy

»Here we use V(π) to evaluate several scalable heuristics

Page 6: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

6 - Tidwell et al. – 04/21/23

Scalable Utility-Aware Heuristics Pseudo α and UPA α (our contributions)

»Extend UPA algorithm (Wang, Ravindran 2004) to handle both stochastic task durations & arbitrary TUF shapesn α is a threshold on minimum probability of on-time completionn 0 considers any job, 1 only those guaranteed timely completion

»Pseudo α orders jobs by pseudoslope -Ui(t)/(τi - t)

»UPA α then permutes jobs locally (possibly improves) Other heuristics (for comparison)

»Sequencing: finds work-conserving order of currently available jobs that gives maximum utility

»Greedy: dispatches job with maximum immediate utility»Deadline: orders jobs by TUFs’ “deadlines” (Locke 1986)

n Assigned to earliest discontinuity in TUF or its first derivative

Page 7: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

7 - Tidwell et al. – 04/21/23

Evaluation

(target sensitive)

(linear drop)

(downward step)

utilitybounds

criticalpoints

terminationtimes

Different TUF shapes»Useful to characterize tasks’ different utilities

3 representative ones »Randomly generated based on utility bounds, termination times, and critical points

Task periods»Randomly selected from divisors >= 100 of 2400

Task duration distributions»Also randomly generated, within bounds on 80% of the probability mass

Page 8: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

8 - Tidwell et al. – 04/21/23

Effect of α Parameter

We found that it is important to consider all jobs»E.g., soft real-time linear drop TUF results shown above

Therefore we always use Pseudo 0 and UPA 0

ideal

Page 9: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

9 - Tidwell et al. – 04/21/23

UPA 0 vs. Pseudo 0 for Soft Real-Time

For SRT UPA 0 improved on Pseudo 0, but not a lot»Soft real-time (no deadline miss penalty), linear drop TUF»Similar results were seen for target sensitive TUFs

Therefore, Pseudo 0 may be preferable (less costly)

Page 10: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

10 - Tidwell et al. – 04/21/23

Effects of SRT Load on Pseudo 0

high load medium load

low load

Greater load: Pseudo 0 is closer to value-optimal »Fewer ways to go wrong

Target sensitive is worst»More opportunities for a work-conserving decision to be worse than idling

Page 11: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

11 - Tidwell et al. – 04/21/23

Effects of Other TUF Shape Features

(upward step function)(downward step function)

(rise linear)

(linear drop with different y-intercepts)

τi

nn

Page 12: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

12 - Tidwell et al. – 04/21/23

Effects of TUF Class on Pseudo 0

Soft real-time high load scenario for Pseudo 0»100 randomly generated 5-task problem instances

Pseudo 0 performed well except on target sensitive»Consistent with previous observations

Pseudo 0 performed worse as the y-intercept decreased (became more like target sensitive TUF)

Page 13: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

13 - Tidwell et al. – 04/21/23

Deadline Heuristic: SRT Downward Step

Deadline heuristic outperformed both UPA 0 and Pseudo 0 for soft real-time downward step TUFs»Deadline captures most important feature of TUF (tmi)

»No penalty for early completion so simple ordering works

Page 14: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

14 - Tidwell et al. – 04/21/23

Hard Real-Time Scenarios

Hard real-time cases add a deadline miss penalty Pseudo 0 did badly on HRT target sensitive TUFs

»Tuning the α parameter to find a better one didn’t help»Pseudo 0 performed close to UPA 0 on the other TUFs

Deadline heuristic again performed much better with downward step TUFs than with the others

Page 15: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

15 - Tidwell et al. – 04/21/23

Conclusions Observations and Lessons Learned

»UPA and Pseudo do their best with α=0 (consider all jobs)

»Pseudo 0 (less expensive) performed close to UPA 0 for SRT and (except for target sensitive TUFs) HRT cases

»Deadline heuristic performed very well for linear drop TUFs but performed poorly for the other TUF classes

»Greedy & sequencing heuristics underperformed overall Future Work

»Relatively poor performance of sequencing heuristic is a bit surprising (UPA improves slightly on Pseudo that way)n Further consideration of non-work-conserving vs. work-conserving variations, and comparing those orderings to UPA, is needed

»Ongoing inquiry into (e.g., geometric) approximations of value-optimal TUF scheduling policies appears worthwhile

Page 16: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

16 - Tidwell et al. – 04/21/23

Backup Slides

Page 17: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

17 - Tidwell et al. – 04/21/23

Soft RT Scenario: Target Sensitive TUF

Page 18: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

18 - Tidwell et al. – 04/21/23

Hard RT Scenario: Downward Step

Page 19: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

19 - Tidwell et al. – 04/21/23

Hard RT Scenario: Linear Drop

Page 20: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

20 - Tidwell et al. – 04/21/23

Greedy HRT Scenarios: High Load

Page 21: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

21 - Tidwell et al. – 04/21/23

Greedy HRT Scenarios: Medium Load

Page 22: Scalable Utility Aware Scheduling Heuristics for Real-time Tasks with Stochastic Non-preemptive Execution Intervals* Terry Tidwell 1, Carter Bass 1, Eli

22 - Tidwell et al. – 04/21/23

Greedy HRT Scenarios: Low Load