220 likes | 298 Views
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
E N D
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, USA 23rd 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)
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) • 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 sensor actuator CAN controller Time
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 • 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) Utility Time Based on Figure 1 in Ravindran, et. al. “On Recent Advances in Time/Utility Function Real-Time Scheduling and Resource Management”, 2005.
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) idle action action 1 action 2
Scheduling Policy Design/Evaluation • 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 x0 x1 x2 x3 + V(π) = γ0 r0 t0 – t1 + γ1 r1 t1 – t2 + γ2 r2 t2 – t3
Scalable Utility-Aware Heuristics • Pseudo α and UPA α (our contributions) • Extend UPA algorithm (Wang, Ravindran 2004) to handle both stochastic task durations & arbitrary TUF shapes • α is a threshold on minimum probability of on-time completion • 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) • Assigned to earliest discontinuity in TUF or its first derivative
Evaluation • 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 (downward step) (linear drop) termination times utility bounds critical points (target sensitive)
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
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)
Effects of SRT Load on Pseudo 0 • 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 high load medium load low load
Effects of Other TUF Shape Features (linear drop with different y-intercepts) (rise linear) τi (upward step function) (downward step function) n n
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)
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
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
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) • 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