Task Reweighting under Global Scheduling on Multiprocessors

Similar documents
Real-Time Systems. Multiprocessor scheduling. Multiprocessor scheduling. Multiprocessor scheduling

Embedded Systems. 4. Aperiodic and Periodic Tasks

Module 9. Lecture 6. Duality in Assignment Problems

An Adaptive Framework for Multiprocessor Real-Time Systems

Kernel Methods and SVMs Extension

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

Simultaneous Optimization of Berth Allocation, Quay Crane Assignment and Quay Crane Scheduling Problems in Container Terminals

ECE559VV Project Report

Tracking with Kalman Filter

NP-Completeness : Proofs

x = , so that calculated

CHAPTER 17 Amortized Analysis

Two Methods to Release a New Real-time Task

Chapter - 2. Distribution System Power Flow Analysis

Problem Set 9 Solutions

CONTRAST ENHANCEMENT FOR MIMIMUM MEAN BRIGHTNESS ERROR FROM HISTOGRAM PARTITIONING INTRODUCTION

Appendix B: Resampling Algorithms

VQ widely used in coding speech, image, and video

Physics 5153 Classical Mechanics. Principle of Virtual Work-1

NUMERICAL DIFFERENTIATION

Resource Allocation with a Budget Constraint for Computing Independent Tasks in the Cloud

Lecture 4: November 17, Part 1 Single Buffer Management

LINEAR REGRESSION ANALYSIS. MODULE IX Lecture Multicollinearity

Resource Sharing. CSCE 990: Real-Time Systems. Steve Goddard. Resources & Resource Access Control (Chapter 8 of Liu)

find (x): given element x, return the canonical element of the set containing x;

Foundations of Arithmetic

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

Last Time. Priority-based scheduling. Schedulable utilization Rate monotonic rule: Keep utilization below 69% Static priorities Dynamic priorities

Supplementary Notes for Chapter 9 Mixture Thermodynamics

Global Sensitivity. Tuesday 20 th February, 2018

Partitioned Mixed-Criticality Scheduling on Multiprocessor Platforms

AP Physics 1 & 2 Summer Assignment

Week3, Chapter 4. Position and Displacement. Motion in Two Dimensions. Instantaneous Velocity. Average Velocity

A Robust Method for Calculating the Correlation Coefficient

COMPARISON OF SOME RELIABILITY CHARACTERISTICS BETWEEN REDUNDANT SYSTEMS REQUIRING SUPPORTING UNITS FOR THEIR OPERATIONS

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Lecture 4. Instructor: Haipeng Luo

CSci 6974 and ECSE 6966 Math. Tech. for Vision, Graphics and Robotics Lecture 21, April 17, 2006 Estimating A Plane Homography

Global EDF Scheduling for Parallel Real-Time Tasks

Single-Facility Scheduling over Long Time Horizons by Logic-based Benders Decomposition

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

Lecture 3: Probability Distributions

Grover s Algorithm + Quantum Zeno Effect + Vaidman

Section 8.3 Polar Form of Complex Numbers

Errors for Linear Systems

Chapter Newton s Method

The Order Relation and Trace Inequalities for. Hermitian Operators

1 GSW Iterative Techniques for y = Ax

4 Analysis of Variance (ANOVA) 5 ANOVA. 5.1 Introduction. 5.2 Fixed Effects ANOVA

Assortment Optimization under MNL

Task Scheduling with Self-Suspensions in Soft Real-Time Multiprocessor Systems

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Edge Isoperimetric Inequalities

Report on Image warping

SIMPLE REACTION TIME AS A FUNCTION OF TIME UNCERTAINTY 1

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Clock-Driven Scheduling (in-depth) Cyclic Schedules: General Structure

ISSN: ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 3, Issue 1, July 2013

Supporting Information

Notes on Frequency Estimation in Data Streams

ANSWERS. Problem 1. and the moment generating function (mgf) by. defined for any real t. Use this to show that E( U) var( U)

One-sided finite-difference approximations suitable for use with Richardson extrapolation

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

CHAPTER III Neural Networks as Associative Memory

Chapter 3 Describing Data Using Numerical Measures

More metrics on cartesian products

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

Fixed-Priority Multiprocessor Scheduling with Liu & Layland s Utilization Bound

Negative Binomial Regression

FREQUENCY DISTRIBUTIONS Page 1 of The idea of a frequency distribution for sets of observations will be introduced,

Pop-Click Noise Detection Using Inter-Frame Correlation for Improved Portable Auditory Sensing

An Upper Bound on SINR Threshold for Call Admission Control in Multiple-Class CDMA Systems with Imperfect Power-Control

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

Psychology 282 Lecture #24 Outline Regression Diagnostics: Outliers

For now, let us focus on a specific model of neurons. These are simplified from reality but can achieve remarkable results.

Solution Thermodynamics

arxiv:cs.cv/ Jun 2000

Hopfield Training Rules 1 N

Outline. Communication. Bellman Ford Algorithm. Bellman Ford Example. Bellman Ford Shortest Path [1]

Common loop optimizations. Example to improve locality. Why Dependence Analysis. Data Dependence in Loops. Goal is to find best schedule:

On the Multicriteria Integer Network Flow Problem

Online Classification: Perceptron and Winnow

Affine transformations and convexity

Lecture Notes on Linear Regression

Task Reweighting under Global Scheduling on Multiprocessors

Chapter 13: Multiple Regression

MODELING TRAFFIC LIGHTS IN INTERSECTION USING PETRI NETS

Department of Electrical & Electronic Engineeing Imperial College London. E4.20 Digital IC Design. Median Filter Project Specification

Energy-Efficient Primary/Backup Scheduling Techniques for Heterogeneous Multicore Systems

MA 323 Geometric Modelling Course Notes: Day 13 Bezier Curves & Bernstein Polynomials

Comparison of the Population Variance Estimators. of 2-Parameter Exponential Distribution Based on. Multiple Criteria Decision Making Method

EEE 241: Linear Systems

Gravitational Acceleration: A case of constant acceleration (approx. 2 hr.) (6/7/11)

THE SUMMATION NOTATION Ʃ

On the correction of the h-index for career length

Polynomial Regression Models

Homework Assignment 3 Due in class, Thursday October 15

AN EXTENDIBLE APPROACH FOR ANALYSING FIXED PRIORITY HARD REAL-TIME TASKS

Topic- 11 The Analysis of Variance

Transcription:

Task Reweghtng under Global Schedulng on Multprocessors Aaron Block, James H. Anderson, and UmaMaheswar C. Dev Department of Computer Scence, Unversty of North Carolna at Chapel Hll Abstract We consder schemes for enactng task share changes a process called reweghtng on real-tme multprocessor platforms. Our partcular focus s reweghtng schemes that are deployed n envronments n whch tasks may frequently request sgnfcant share changes. Pror work has shown that far schedulng algorthms are capable of reweghtng tasks wth mnmal allocaton error and that parttonng-based schedulng algorthms can reweght tasks wth better average-case performance, but greater error. However, preempton and mgraton overheads can be hgh n far schemes. In ths paper, we consder the queston of whether global schedulng technques can mprove the accuracy of reweghtng relatve to parttonng-based schemes and provde mproved average-case performance relatve to far scheduled systems. Our concluson s that, for soft real-tme systems, global schedulng technques provde a good mx of accuracy and average-case performance. Introducton Real-tme systems that are adaptve n nature have receved consderable recent attenton [3, 9,, 4]. In addton, multprocessor platforms are of growng mportance, due to both hardware trends such as the emergence of multcore technologes and the prevalence of computatonally-ntensve applcatons for whch sngleprocessor desgns are not suffcent. In pror work [3, 4], we consdered the use of both far and parttonng-based algorthms to schedule hghly-adaptve workloads on (tghtly-coupled multprocessor platforms, where the processor shares of tasks change frequently and to a sgnfcant extent. Far schedulng technques acheve hgh accuracy n enactng share changes, but do so at the expense of potentally frequent task preemptons and mgratons among processors. Parttonng algorthms, n contrast, ental less overhead, but provde poorer (but sometmes acceptable accuracy. The focus of ths paper s adaptve global schedulng algorthms that avod the hgh preempton and mgraton costs of far schedulng technques, yet have superor accuracy relatve to parttonng-based schemes. The prmary drawback of global schedulng algorthms s that, n order to fully utlze a multprocessor system, bounded deadlne msses must be acceptable. The key ssue we address s whether the lower mgraton/preempton overheads and mproved accuracy of such algorthms are suffcent to compensate for ther nablty to meet all deadlnes. Whsper. To motvate the need for ths work, we consder two example applcatons under development at the Unversty of North Carolna. The frst of these s the Whsper trackng system, whch performs full-body trackng n vrtual envronments []. Whsper tracks users va an array of wall- and celng-mounted mcrophones that detect whte nose emtted from speakers attached to each user s hands, feet, and head. Lke many trackng systems, Whsper uses predctve technques to track obects. The workload on Whsper s ntensve enough to necesstate a multprocessor desgn. Furthermore, adaptaton s requred because the computatonal cost of makng the next predcton n trackng an obect depends on the accuracy of the prevous one. Thus, the processor shares of the tasks that are deployed to mplement these trackng functons wll vary wth tme. In fact, the varance can be as much as two orders of magntude. Moreover, adaptatons must be enacted wthn tme scales as short as ms. ASTA. The second applcaton s the ASTA vdeo-enhancement system [2]. ASTA s capable of mprovng the qualty of an underexposed vdeo feed so that obects that are ndstngushable from the background become clear and n full color. In ASTA, darker obects requre more computaton to correct. Thus, as dark obects move n the vdeo, the processor shares of the tasks assgned to process dfferent areas of the vdeo wll change. ASTA wll eventually be deployed n a mltary-grade full-color nght vson system, so tasks wll need to change shares as fast as a solder s head can turn. In the planned confguraton, a -processor multcore platform wll be used. Dynamc sporadc tasks. In ths paper, we are prmarly concerned wth dynamc sporadc tasks. Each such task T releases a sequence of obs, T, T 2, Each task s defned by the executon cost of each of ts obs, denoted e(t, and ts weght at any tme t, denoted wt(t, t, whch specfes the fracton of a sngle processor t requres. Ths dffers from the usual defnton of a sporadc task, wheren per-ob executon costs and weghts do not change. Whle the terms share, weght, and utlzaton are often used nterchangeably, we use weght to denote a task s desred utlzaton, and share to denote ts actual guaranteed utlzaton. In each schedulng scheme we consder, a task s share s determned by ts weght; n some of these schemes, the two are always equal, whle n others, they may dffer. We refer to the process of enactng task weght/share changes as reweghtng. Summary of results. In ths paper, we consder fve reweghtng-capable schedulng algorthms: a prevous far algorthm developed by us called called PD 2 -OF [3], whch s a dervatve of the PD 2 Pfar algorthm []; a prevous parttonngbased algorthm developed by us called the parttoned-adaptve schedulng (PAS algorthm [4]; the non-preemptve-parttonedadaptve-schedulng (NP-PAS algorthm, whch s a nonpreemptve varant of PAS; and two new algorthms proposed heren, the changeable-earlest-deadlne-frst (CNG-EDF algorthm, whch s a dervatve of the well known globalearlest-deadlne-frst (EDF algorthm, and the non-preemptve-

Scheme Tardness Drft Overload Mgratons Preemptons PD 2 -OF 2 every quantum every quantum PAS e max(t W weght-change events weght-change events & ob releases NP-PAS e(t +emax(t + emax(t W weght-change events weght-change events CNG-EDF κ(m e max(t ob releases ob releases NP-CNG-EDF κ(m e max(t only n-between obs never Table : Summary of worst-case results. changeable-earlest-deadlne-frst (NP-CNG-EDF algorthm, whch s a non-preemptve varant of CNG-EDF. Our results are summarzed n Table, whch lsts the accuracy, mgraton cost, and preempton cost of each of the above schemes. Accuracy s assessed n terms of three quanttes, drft, overload error, and tardness, whch are measured n terms of the system s schedulng quantum sze. Drft s the error, n comparson to an deal allocaton, that results due to a reweghtng event [3]. (Under an deal allocaton, tasks are reweghted nstantaneously, whch s not possble n practce. Overload error, whch arses under parttonng-based schemes (see [4], s the error that results from a scheduler s nablty to allocate a task a share equal to ts desred weght. Tardness s the maxmal amount by whch any ob can mss ts deadlne. Of these three types of error, overload error s potentally the most detrmental, snce drft s a one-tme error assessed per reweghtng event and tardness s bounded n the schemes we consder. Overload error, on the other hand, accumulates over tme. In Table, e max (T denotes the maxmum executon cost of any ob of the task T, wt max (T denotes the maxmal weght of task T at any tme, and W denotes the maxmal weght of the (m /X + st heavest task (by maxmal weght, where m s the number of processors and X s the maxmal weght of the heavest task. Furthermore, T κ(l = z E max (T, l e max(t z m T z X max (T, m wt max(t z + e(t, ( where E max (T, l s the set of l tasks n T wth the hghest maxmal executon cost and X max (T, m s the set of m tasks n T wth the heavest maxmal weght. (Ths bound s derved from pror work by Dev and Anderson on multprocessor EDF schedulng [6]. Table shows that algorthms that allow more frequent mgratons and preemptons, lke PD 2 -OF, produce lttle drft, no overload error, and no tardness; however, algorthms that restrct the frequency of mgratons and preemptons can produce greater drft, overload error, and/or tardness. Contrbutons. Our theoretcal contrbutons nclude devsng CNG-EDF and NP-CNG-EDF reweghtng rules, and establshng the error bounds for CNG-EDF and NP-CNG-EDF n Table. The queston that then remans s: for the fve aforementoned algorthms, how do drft, overload error, and tardness compare to any error due to mgraton and preempton costs? We attempt to answer ths queston va extensve smulaton studes of Whsper and ASTA. In these studes, real mgraton and preempton costs were assumed based on actual measured values. These studes confrm the expectaton that, whle CNG-EDF and NP-CNG-EDF provde a good compromse of accuracy and average case performance, there exsts no sngle best algorthm: for each algorthm, applcaton scenaros exst for whch that algorthm s the best choce. The rest of ths paper s organzed as follows. In Secs. 2 and 3, we dscuss the CNG-EDF and NP-CNG-EDF algorthms n greater detal. Then, n Sec. 4, we establsh the propertes mentoned above. Our expermental evaluaton s presented n Sec. 5. We conclude n Sec. 6. 2 System Model and Schedulng In ths secton, we defne our system model and the CNG-EDF and NP-CNG-EDF reweghtng algorthms. Sporadc task systems. We denote the th task of a task system T as T (where tasks are ordered by some arbtrary method, and denote the th ob of the task T as T (where obs are ordered by the sequence n whch they are nvoked. A sporadc task s defned by an executon cost, denoted e(t, and weght, denoted wt(t, whch specfes the fracton of a sngle processor t requres. (It s customary to defne a sporadc task by ts executon cost and the mnmum separaton tme between ts successve obs we defne the latter n terms of weght and executon cost below. Fg. depcts a one-processor system scheduled va EDF wth four tasks, as defned n the fgure s capton. (The other nsets n the fgure are consdered later. The frst ob of a task may be nvoked or released at any tme at or after tme zero. The release tme of ob T s denoted r(t. Successve ob releases of task T must be separated by at least e(t /wt(t tme. For example, n Fg., r(t = and r(t 2 = 3. The absolute deadlne (or ust deadlne of ob T, denoted d(t, equals r(t + e(t /wt(t. For example, n Fg., d(t = 3 and d(t 2 = 6. We consder a sporadc task T to be actve at tme t f there exsts a ob T (called T s actve ob such that t [r(t, d(t. Dynamc sporadc task systems. A dynamc sporadc task system s an extenson of a sporadc task system, where the weght of each task T s a functon of tme t and ts executon cost can vary wth each ob T. We use wt(t, t and e(t, respectvely, to denote these two quanttes. (For the remander of the paper, whenever we refer to a task we are referrng to a dynamc sporadc task. We use wt mn (T (wt max (T to denote the mnmum (maxmum allowed weght for T. As a shorthand, we use T :[a, b] to denote a task T such that wt mn (T = a and wt max (T = b, and T :a to denote T :[a, a]. Furthermore, we use e max (T to denote the maxmal executon cost of any ob of T. Fg. gves an example. For dynamc sporadc tasks, the absolute deadlne of a ob T equals r(t +e(t /wt(t, r(t. In the absence of reweghtng, consecutve ob releases (r(t + and r(t of a task T must be separated by at least e(t /wt(t, r(t. For example, 2

n Fg., r(t 2 r(t = 2/(/3 = 6, r(t 3 r(t 2 = 2/(/2 = 4, and d(t 3 = + /(/2 = 2. A task T changes weght or reweghts at tme t f wt(t, t ǫ wt(t, t where ǫ +. If a task T changes weght at a tme t c between the release and the deadlne of some ob T, then the followng three actons may occur: The executon cost of T may be reduced to the amount of tme for whch T has executed pror to t c. r(t + may be less than r(t + e(t /wt(t, r(t. If T + s released before r(t + e(t /wt(t, r(t, then snce d(t = r(t + e(t /wt(t, r(t, obs T + and T wll overlap. (In the varant of the sporadc model defned earler, every ob s deadlne s at or before ts successors s release. Hence, we say that a ob T s actve at tme t ff t [r(t +, mn(r(t, d(t. The reweghtng rules we present n Sec. 3 state under what condtons the above actons occur and by how much before r(t +e(t /wt(t, r(t + the ob T can be released. Snce a reweghtng event may cause a ob s executon cost to decrease, we ntroduce the noton of a ob T s actual executon cost, denoted ae(t, whch represents the total amount of executon tme that T wll receve. When a task reweghts, there can be a dfference between when t ntates the change and when the change s enacted. The tme at whch the change s ntated s a user-defned tme; the tme at whch the change s enacted s dctated by a set of condtons dscussed shortly. We use the schedulng weght of a task T at tme t, denoted swt(t, t, to represent the last enacted weght of T. Formally, swt(t, t equals wt(t, u, where u s the last tme at or before t that a weght change was enacted for T. It s mportant to note that, henceforth, we compute task deadlnes and releases usng schedulng weghts. Schedulng. Under both CNG-EDF and NP-CNG-EDF, ready obs are prortzed by deadlne, wth earler deadlnes havng hgher prorty. ( Ready wll be formally defned shortly. Deadlne tes are resolved arbtrarly, but consstently. Under CNG-EDF, an arrvng ob wth hgher prorty preempts the executng ob wth the lowest prorty f no processor s avalable. The preempted ob may later resume executon on a dfferent processor. Under NP-CNG-EDF, the arrvng ob wats untl some ob completes executon and a processor becomes avalable. Thus, under NP-CNG-EDF, once scheduled, a ob s guaranteed executon untl completon wthout nterrupton. Fg. depcts a CNG-EDF schedule of the task system T descrbed above, and Fg. (c depcts a NP-CNG-EDF schedule of the same system. For an arbtrary schedulng algorthm A and an arbtrary task system T, we let S denote an m-processor schedule A of T, and let A(S, T, t, t 2 denote the total tme allocated to T n S n [t, t 2. Smlarly, we use A(S, T, t, t 2 and A(S, T, t, t 2, respectvely, to denote the total tme allocated to all obs of T n S and all tasks of T n S, over the nterval [t, t 2. We say that the value of A(S, T,, t s the amount that T has executed by t. For example n Fg., A(S, T,, 6 = 2, A(S, T,, 2 = 2, and A(S, T, 3, 2 =. Defnton (Halted. As dscussed later, f a reweghtng event n schedule S occurs at tme t, then t s possble that some ob T s halted at t. In ths case, ae(t s set to A(S, T,, t. Defnton 2 (Completed. If S s an m-processor CNG-EDF or NP-CNG-EDF schedule of the task system T, then a ob T T s sad to have completed by tme t n S ff T has executed for e(t by t n S, or T has halted by tme t. A task T s sad to have completed at tme t n S f at tme t every ob of T that has been released by t has completed. A task T s sad to have entrely completed by tme t ff all obs of T n T have completed. For example, n Fg., T has completed by tme 3, T s complete (but not entrely complete at tme 3 but not complete at tme 6, and T 4 s entrely complete at tme 4. Defnton 3 (Pendng and Ready. For an arbtrary schedulng algorthm A, f S s an m-processor schedule of the task system T under A, then a ob T s sad to be pendng at tme t n S f r(t t and T s not complete by t n S. For example, n Fg., the ob T 2 s pendng over the range [, 9. Note that a ob can be pendng, but not actve, f t msses ts deadlne. A pendng ob T s sad to be ready at tme t n S f all pror obs of task T have completed by t. For example, n Fg., the ob T 2 s ready over the range [, 9. A ob T can be pendng but not ready f T has not completed by r(t. 3 Task Reweghtng We now ntroduce two new reweghtng rules that are CNG-EDF extensons of the PD 2 -OF reweghtng rules presented by us prevously [3]. As mentoned before, these rules work by modfyng future ob release tmes and deadlnes. At the end of ths secton, we dscuss how to adust these rules for NP-CNG-EDF. For smplcty, we assume that the actual executon cost for any ob s equal to ts specfed executon cost, unless a task reweghts whle a ob s actve. Then and only then can the actual executon cost of a ob be less than ts executon cost. (Ths assumpton can be removed at the expense of more complcated notaton. In ths scenaro, the actual executon cost of the ob s determned by the rules we present shortly. Let T be a task system n whch some task T ntates a weght change from weght w to weght v at tme t c. Let S be the m- processor CNG-EDF schedule of T. Let T be the actve ob of T at t c. If e(t A(S, T,, t >, then let rem(t, t c = e(t A(S, T,, t; otherwse, rem(t, t c = e(t +. Note that rem(t, t c denotes the actual remanng computaton n T s current ob or the sze of T s next ob f the current ob has completed. The devance of ob T of task T at tme t s defned as dev(t, t = t r(t swt(t, udu A(S, T,, t. The choce of whch rule to apply depends on whether devance s postve or negatve. If postve, then we say that T s postve-changeable at tme t c from weght w to v; otherwse T s negatve-changeable at tme t c from weght w to v. Because T ntates ts weght change at t c, wt(t, t c = v holds; however, T s schedulng weght does not change untl the weght change has been enacted, as specfed n the rules below. Note that f t c occurs between the ntaton and enacton of a prevous reweghtng event of T, 3

Scheduled Job Release Job Deadlne Job Release/Deadlne T :/3 T 2 :/4 T :/4 3 T 4 :/6 T :[/3,/2] T 2 :[/4] T :[/4] 3 T 4 :[,/6] T :[/3,/2] T 2 :[/4] T :[/4] 3 T 4 :[,/6] 2 3 4 5 6 7 8 9 2 Tme 2 3 4 5 6 7 8 9 2 Tme 2 3 4 5 6 7 8 9 2 Tme (c Fgure : A one-processor (sporadc or dynamc sporadc system T wth four tasks. Inset depcts an EDF schedule T where the tasks are defned as follows: T wth weght /3 and e(t =, T 2 wth weght /4 and e(t 2 = 3, T 3 wth weght /4 and e(t 3 =, and T 4 wth weght /6 and e(t 4 =. In nsets and (c, the tasks are defned as follows: T has an ntal weght of /3 and ncreases to /2 at tme 6, e(t = e(t 2 = 2, and e(t 3 = ; T 2 has a constant weght of /4 and e(t 2 = 3; T 3 has a constant weght of /4, e(t 3 =, and e(t 2 3 = 2; and T 4 has an ntal weght of /6 and decrease to at tme 6 (.e., T 4 leaves the system at 6 and e(t 4 =. Inset depcts a CNG-EDF schedule of T. Inset (c depcts a NP-CNG-EDF schedule of T. All tes are broken n favor of the task wth the lower ndex. then the prevous event s skpped,.e., treated as f t had not occurred. As dscussed later, any error assocated wth skppng a reweghtng event lke ths s accounted for when determnng drft. Rule P: If T s postve-changeable at tme t c from weght w to v, then one of two actons s taken: ( f d(t > rem(t, t c /v, then T s halted, ts weght change s enacted, and a new ob of sze rem(t, t c s ssued for t wth a release tme of t c ; ( otherwse, ts weght change s enacted at tme d(t,.e., the schedulng weght does not change untl the end of the current ob. Rule N: If T s negatve-changeable at tme t c from weght w to v, then one of two actons s taken: ( f v > w, then T s halted, ts weght change s enacted, and a new ob of sze rem(t, t c s ssued for t wth a release tme equal to the tme t at whch dev(t, t = holds; ( otherwse, the weght change s enacted at tme d(t. Intutvely, Rule P changes a task s weght by haltng ts current ob and ssung a new ob of sze rem(t, t c wth the new weght f dong so would mprove ts deadlne. A (one-processor example of a postve-changeable task s gven n Fg. 2. (We dscuss the terms drft, IDEAL allocatons, and SW allocatons n Sec. 4. The depcted example conssts of a task system T wth four tasks as defned n the fgure s capton. Note that, snce T 2, T 3, and T 4 have the same deadlne, we have arbtrarly chosen T 4 to have the lowest prorty. In nset, T 4 s postve-changeable snce at tme 2 t has not yet been scheduled. Note that haltng T 4 s current ob and ssung a new ob of sze one mproves T 4 s schedulng prorty,.e., d(t 4 = 6 > 7 2 = d(t 2 4. Notce that the second ob of T 4 s ssued 6/4 quanta after tme 2. Ths spacng s n keepng wth a new ob of weght 4/6 ssued at tme 2. Rule N changes the weght of a task by one of two approaches: ( f a task ncreases ts weght, then Rule N adusts the release tme of ts next ob so that t s commensurate wth the new weght; ( f a task decreases ts weght, then Rule N wats untl the end of the current ob and then ssues the next ob wth a deadlne that s commensurate wth the new weght. A (oneprocessor example of a negatve-changeable task that ncreases ts weght s gven n Fg. 2. The depcted example conssts of the same tasks as n, except that we have chosen T 4 to have the hghest prorty. Notce that the second ob of T 4 s ssued at tme 3, whch s the tme such that dev(t 4, 3 = 3 swt(t, udu A(S, T 4,, 3 = =. Recall that the deadlne (release tme of the th (( + th ob of a task T s gven by r(t + e(t /(swt(t, r(t. Hence, f a task T of weght v were to ssue a ob of sze y = A(S, T,, t c dev(t, t at tme t c, then the release tme of ts next ob would be t c + y/v. A (oneprocessor example of a negatve-changeable task that decreases ts weght s gven n Fg. 2(c. The depcted example conssts of the same four tasks except that T 4 has an ntal weght of 4/6 and decreases ts weght at tme, and T ons the system as soon as T 4 s weght change s enacted. Snce these rules change the orderng of a task n the prorty queues that determne schedulng, the tme complexty for reweghtng one task s O(logN, where N s the number of tasks n the system. Modfcatons for NP-CNG-EDF. In order to adapt the rules P and N to work for NP-CNG-EDF, the only modfcaton we need to make s when these rules are ntated. If a task reweghts before or after the actve ob has been scheduled, then the rules P and N are ntated as before. (Note that f the actve ob has not been scheduled, then ts devance s postve, and f the actve ob has been scheduled, ts devance s negatve. However, f a task changes ts weght whle the actve ob T s executng, then the ntaton of the weght change s delayed untl T has completed or T s no longer actve, whchever s frst. Note that when a task T changes ts weght from u to v at tme t c n NP-CNG-EDF, then wt(t, t c = v holds, regardless of whether the ntaton of rule P or N must be delayed. 4 Tardness and Drft Bounds In ths secton, we formally present and prove tardness and drft bounds for the CNG-EDF algorthm. Because any set of reweghtng rules wll cause the actual schedule to devate from the deal schedule, the tardness bounds reflect CNG-EDF s accuracy at schedulng the ob-set created by CNG-EDF. The drft bounds, on the other-hand, reflect CNG-EDF s accuracy at creatng a ob-set that mmcs the deal task system, where weght changes can always be ntated and enacted nstantaneously. To ths end, we ntroduce two new theoretcal schedulng algorthms: the schedulng-weght processor-sharng (SW schedulng algorthm and the deal processor-sharng (IDEAL schedulng algorthm. Both algorthms have the ablty to preempt and swap tasks at arbtrarly small ntervals. However, SW allocates each task a share equal to ts schedulng weght; moreover, SW wll not allocate capacty to a task f ts actve ob has receved an allocaton equal to ts actual executon cost. IDEAL, on the other hand, al- 4

Job Release Job Deadlne Job Release/Deadlne SW T SW T SW T 4/6 5/2 9/2 23/2 4 4/6 8/6 2/6 6/6 4 /6 2/6 6/6 /6 4/6 8/6 4 allocs. allocs. allocs. 3/2 7/2 2/2 25/2 IDEAL T IDEAL T IDEAL T 4/6 6/6 8/6 /6 4 /6 2/6 6/6 /6 4/6 8/6 4 /6 2/6 6/6 /6 4/6 8/6 4 allocs. allocs. allocs. 5/6 7/6 9/6 /6 drft( T, t 2/6 2/6 2/6 2/6 2/6 drft( T, t drft( T 3/2 3/2 3/2 4 4 4, t 3/2 3/2 3/2 3/2 T : [,/2] T : /6 2 T : /6 3 Reweghtng Event Enactment T : [/6,4/6] Scheduled 4 Job Layout wthout Reweghtng { 2 3 4 5 Real tme 6 T : [,/2] T : /6 2 T : /6 3 T 4 : [/6,4/6] { T : [,/2] T : /6 2 T : /6 3 T 4 : [/6,4/6] { 2 3 4 5 6 2 3 4 5 Real tme Real tme Fgure 2: A one-processor system consstng of four tasks, T :[, /2], T 2:/6, T 3:/6, and T 4:[/6, 4/6], where the executon cost of every ob s one. The dotted lnes represent the nterval up to T 4 s next deadlne, whch due to reweghtng has been changed (as ndcated by the sold arrow. The drft, allocatons n IDEAL, and allocatons n SW for T 4 are labeled as a functon of tme across the top. The CNG-EDF schedule for the scenaro where T s n the system ntally and leaves at tme 2, T 4 has an ntal weght of /6 that ncreases to 4/6 at tme 2, and T 4 has the lowest schedulng prorty. Snce T 4 s not scheduled by tme 2, t has postve devance and changes ts weght va Rule P, causng T 4 to be halted, T 2 4 to be released at 2 wth a deadlne of 9/2, and T 4 s drft to become 2/6. The same scenaro as n except that T 4 has hgher prorty than both T 2 and T 3. Snce T 4 has been scheduled by tme 2, t has negatve devance and changes ts weght va Rule N, causng ts next ob to have a release tme of 3 whle mantanng a drft of zero. (c T ons the system at tme 6/4 and T 4 has an ntal weght of 4/6 that decreases to /6 at tme. Snce T 4 has negatve devance at tme, t s changed va Rule N, causng T 4 s next ob to have a deadlne of 5/2 and T 4 to have a drft of 3/2. locates each task a share equal to ts weght at each nstant; and, unlke SW, IDEAL wll not stop allocatng capacty to a task unless that task has receved an allocaton equal to the total executon cost of all of ts obs. (For smplcty, we have assumed that every ob n T s released as early as possble. Ths assumpton can be removed at the cost of more complex notaton. If we dd not make ths assumpton, then the allocaton functon for IDEAL would equal zero between actve obs. We provde below a more n-depth explanaton of these two algorthms. 4. Tardness and Lag We begn by defnng the SW schedulng algorthm. The SW schedulng algorthm. In order to establsh tardness bounds for CNG-EDF, we compare allocatons produced by CNG-EDF to those produced by SW. Under SW, at each nstant t, each non-complete ob of each task T s allocated a fracton of a processor equal to swt(t, t. Furthermore, we consder SW to be clarvoyant n the sense that SW can use the value of ae(t to determne f T has completed before t has halted. More specfcally, for any schedule SW under SW of any task system T, we say that T has completed by tme t n SW ff T has executed for ae(t by t. For example, consder the one-processor task system T depcted n Fg. 3. Inset depcts a CNG-EDF schedule and nsets depcts T s SW schedule. Notce that n the SW schedule T does not receve any allocatons over the nterval [3, 6. Ths s because at tme 3 the total allocaton to T n the SW schedule equals ae(t =, hence, T s complete at tme 3. However, at tme 6, T 2 s released, and therefore T has an ncomplete ob wth a schedulng weght of /2. Hence, T begns to receve allocatons equal to ts schedulng weght, whch s now /2. Note that we assume that every ob release, deadlne, executon cost, and actual executon cost for a SW schedule to be the same as that n CNG-EDF. Lag. If S s an m-processor schedule under CNG-EDF of the task system T and SW s an m-processor schedule under SW of the same task system T, then the lags at tme t of a ob T, task T, and task system T, respectvely, are defned by Eqns. (2 (4. (c lag(t, t = A(SW, T,, t A(S, T,, t (2 lag(t, t = A(SW, T,, t A(S, T,, t (3 LAG(T, t = A(SW, T,, t A(S, T,, t (4 Note that LAG(T, t = T T lag(t, t. The lag of a ob (or task or system represents by how much a ob (or task or system s under/over-allocated compared to the SW schedule at tme t. For example, n Fg. 3, lag(t 3, = /4 = /4, lag(t 3, 2 = 2/4 = /2, lag(t, 2 = 2/3 = 2/3, lag(t, 3 = 3/3 =, and lag(t, 6 = 3/3 =. 4.2 Tardness Proof In pror work, Dev and Anderson [6] proved that n any m- processor EDF schedule of a sporadc task system T (where the total weght of all tasks s at most m the tardness of each ob of any task T s at most κ(m where, κ(m s as defned n (. Ther proof conssts prmarly of three lemmas/theorems: ( f the LAG of T s bounded n the m-processor EDF schedule S of T, then tardness s bounded; ( the LAG of T n S s bounded; ( by ( and (, the tardness of each ob of any task T n T s at most κ(m. Snce Dev and Anderson were provng tardness bounds for a sporadc task system, they were able to utlze the fact that a ob T + and ts successor T do not overlap,.e., d(t r(t + holds for any sporadc task T. However, ths property can be weakened wthout affectng ther proof (barrng some mnor notatonal changes, so that ther proof can be adapted to prove tardness bounds for a dynamc sporadc task system. Specfcally, the Dev and Anderson proof can be used to show that the tardness of CNG-EDF s bounded by κ(m. If the followng propertes hold. (W T T wt(t, t m for all t. (V For any ob T + and ts successor T, f d(t + > r(t, 6 7 8 5

r (T r( T 2 d (T 2 d(t Sched. Job T :[/3,/2] 2 2 2 2 T 2 :[/4] 2 3 4 Job Release T 3 :[/4] 2 3 4 Job Deadlne T 4 :[,/6] Job Release & Deadlne 2 3 4 5 6 7 8 9 2 3 4 5 6 Tme T T 2 T 3 T 4 Idle SW Allocatons r( T 2 d( T r( T d(t2 2/3 5/2 /6 2 3 4 5 6 7 8 9 2 3 4 5 6 Tme IDEAL Allocatons r( T 2 r( T d(t2 d( T 2/3 5/2 /6 2 3 4 5 6 7 8 9 2 3 4 5 6 Tme (c Fgure 3: A one-processor task system T wth four tasks: e(t = 5 and T has an ntal weght of /3 that ncreases to /2 va case ( of rule P at tme 6 and as a result, ae(t =, e(t 2 = 4, r(t 2 = 6 and d(t 2 = 4; T 2 has a constant weght of /4 and a constant executon cost of ; T 3 has a constant weght of /4 and a constant executon cost of ; and T 4 has an ntal weght of /6 that decreases to at tme 6 and e(t 4 =. Inset depcts the CNG-EDF schedule of T. The number n each box denotes whch ob s scheduled, e.g., over the range [,, T 2 s executng, and over the range [4, 5, T 2 2 s executng. Inset depcts the SW schedule of T. Note that snce ae(t = at tme 3, T s complete n SW,.e., T receves no allocatons under SW over the range [3, 6. Inset (c depcts the IDEAL schedule of T. Note that the IDEAL allocaton to any task T equals R t 2 t wt(t, udu f T s actve over the range [t, t 2. For nsets and (c, the releases and deadlnes of the obs T and T 2 are depcted. then T +, must have completed before r(t n both the CNG-EDF and SW schedules of T. Snce (W can be easly satsfed, for the remander of ths subsecton, we show that CNG-EDF satsfes property (V. (Unfortunately, due to space constrants, we are not able to present the Dev and Anderson proof wth the necessary (mnor adustments n the body of ths paper. Therefore, we have placed ths proof n an appendx to ths paper, whch can be found on the author s web-page at http:// www.cs.unc.edu/ anderson/papers.html. In order to show that property (V holds, we show that for any ob T n an arbtrary dynamc sporadc task system T, f d(t > r(t +, then T + must have completed before r(t n both the CNG-EDF and SW schedules of T. To ths end, let S be the m-processor CNG-EDF schedule of some dynamc task system T, where T T wt(t, t m for all t, and let SW be the m-processor SW schedule of the same task system. Lemma. For a task T, f r(t +k < d(t, where, k, then T +k wll have completed by r(t n S and SW. Proof. Suppose that r(t +k < d(t holds. By the defnton of d(t, the mnmum separaton between ob releases, and rules P and N, r(t +k < d(t holds only f T reweghted and halted whle T was actve. Wthout loss of generalty, let t c be the earlest such tme. Then, by the rules P and N, r(t +k t c. Hence, T +k wll have halted and thus completed by r(t n S. It remans to be shown that T +k wll have completed by r(t n SW. Snce T s halted at t c, t must be the case that T changed ts weght va case ( of rule P or N at t c. However, both cases follow easly by the clarvoyant nature of SW. Modfcatons for NP-CNG-EDF. In NP-CNG-EDF, f a ob s released and s ready at tme t, and the newly-released ob has a deadlne that s earler than some other ob executng at t, the newly released ob cannot preempt the lower-prorty ob. If no processor s avalable at t, then ths wll lead to a prorty nverson. In such a scenaro, the watng ready, hgher-prorty ob s referred to as a blocked ob, and the executng lower-prorty ob s referred to as a blockng ob. A task T s sad to be blocked at t f T s not executng at t and the earlest pendng ob (.e., the ready ob of T has a hgher prorty than at least one ob executng at t. For example, n Fg. (c, T 2 s the blockng ob over the nterval [6, 7, and T s the blocked ob over the same nterval. The maor dfference between Dev and Anderson s tardnessbound proof for EDF and NP-EDF for sporadc tasks s that n ther NP-EDF proof they calculate the upper bound on the length of tme for whch a task can be blocked. Because of the blockng factor, the bound they construct for NP-EDF s κ(m. As before, Dev and Anderson n ther proof for NP-EDF rely on the property of sporadc tasks that consecutve obs do not overlap. And, as before, ths requrement can be weakened wthout affectng ther proof, so that ther proof holds for a dynamc sporadc task set, so long as condtons (V and (W hold. Snce the reweghtng rules for NP-CNG-EDF are essentally the same as the reweghtng rules for CNG-EDF, by Lem., condtons (V and (W hold for any m-processor NP-CNG-EDF schedule, of any task set T so long as m T T wt(t, t holds for all t. (As before, due to space constrants we are forced to present the Dev and Anderson proof, wth ts modfcaton, n ts entrety n an appendx found on the author s web page. Hence, NP-CNG-EDF s tardness bound s κ(m. 4.3 Drft We now turn our attenton to the ssue of measurng drft under CNG-EDF. In order to measure the drft of a task system T, we compare the SW schedule of T to that of an deal reweghtng scheme that enacts reweghtng changes nstantaneously. Under the deal processor sharng (IDEAL schedulng algorthm, at each nstant t, each task T n T s allocated a share equal to ts weght wt(t, t. Hence, f I s the IDEAL schedule of T, then over the nterval [t, t 2, the task T s allocated A(I, T, t, t 2 = t 2 t wt(t, udu tme. As we mentoned earler, IDEAL s smlar to SW, wth two maor exceptons: ( under IDEAL, each task receves an allocaton equal to ts weght, whereas under SW, each task receves an allocaton equal to ts schedulng weght; and ( under IDEAL, a task does not stop recevng allocatons unless ts total allocaton equals the total executon cost of all of ts obs, whereas under SW, a task wll stop recevng allocatons f ts actve ob has receved an allocaton equal to ts actual executon cost. For example, consder the IDEAL schedule of the task system T depcted n Fg. 3(c. Notce that, over the range [3, 6, the task T receves allocatons equal to ts weght at every nstant. Compare ths to the SW schedule (nset, n whch T receves no allocatons over the range [3, 6. For most real-tme schedulng algorthms, the dfference between the deal and actual allocatons a task receves les wthn 6

some bounded range centered at zero. For example, under a unprocessor EDF (.e., CNG-EDF wthout weght changes schedule, the dfference between the deal and actual allocatons for a task les wthn ( e max (T, e max (T. When a weght change occurs, the same bounds are mantaned except that they may be centered at a dfferent value. For example, n Fg. 2, the range s orgnally (,, but after the reweghtng event, t s ( 4/6, 8/6. Ths lost allocaton s called drft. Gven ths loss (barrng further reweghtng events T s drft wll not change. In general, a task s drft per reweghtng event wll be non-negatve (non-postve f t ncreases (decreases ts weght. Under CNG-EDF, the drft of a task T at tme t s defned as drft(t, t = A(I, T,, u A(SW, T,, u, (5 where SW s the schedule of T under SW, I s the schedule of T under IDEAL, and u s the last tme a reweghtng event of T was enacted before t. Theorem. The absolute value of the per-event drft under CNG-EDF for each task T s less than e max (T. Proof Sketch. If a task T changes ts weght at tme t c va rule P, then when ths weght change s enacted at tme t e (.e., at t c under case ( or at d(t under case (, then t s as though allocaton equal to A(I, T, r(t, t e A(SW, T, r(t, t e s lost. For example n Fg. 2, the task T 4 loses an allocaton of 2/6. Snce ths value (per reweghtng event s always less than e max (T, the absolute value of drft s less than e max (T. If a task T changes ts weght at tme t c va rule N, and T decreases ts weght (case (, then the weght change wll be enacted at d(t. Snce the maxmum allocaton T can receve n SW durng T s e max(t, A(SW, T, t c, d(t A(I, T, t c, d(t e max(t. Thus, the absolute value of the drft ncurred s at most e max (T. For example, n Fg. 2(c, the drft ncurred by T 4 s 3/2,.e., drft(t 4, t = 3/2, where t 3/2. If T ncreases ts weght (case (, then t ncurs zero drft, snce t mmedately enacts the weght change (.e., the schedulng weght changes mmedately. Hence, the absolute value of the drft ncurred by ths reweghtng event s less than e max (T. For example, n Fg. 2, the drft ncurred by T 4 s,.e., drft(t 4, t =, where t 2. Modfcatons for NP-CNG-EDF. Note that delayng the ntaton of a reweghtng event does not substantally ncrease the drft ncurred per reweghtng event, snce the longest a reweghtng event can be delayed s the executon cost of the actve ob. If T s the actve ob of T at t c, and f T s reweghtng event s delayed untl some tme t, then at t ether ( T has a nonpostve devance (.e., T completes before ts deadlne, or ( T s not actve at t (.e., T does not complete before ts deadlne, and thus s not actve at t. In ether case, the actve ob (f t exsts s negatve-changeable. Hence, f the task ncreases ts weght, then the only drft the task wll ncur for ths reweghtng event results from delayng the ntaton of ts reweghtng event,.e., at most e max (T. If T decreases ts weght, then delayng the reweghtng event wll not affect drft, snce the enactment of the reweghtng event would occur at d(t regardless of whether the ntaton of the reweghtng event was delayed or not. 5 Expermental Results The results of ths paper are part of a longer-term proect on adaptve real-tme allocaton n whch both Whsper and ASTA descrbed earler, wll be used as test applcatons. In ths secton, we provde extensve smulatons of Whsper and ASTA as scheduled by PD 2 -OF, PAS, NP-PAS, CNG-EDF, and NP-CNG-EDF. Whsper. As noted earler, Whsper tracks users va speakers that emt whte nose attached to each user s hands, feet, and head. Mcrophones located on the wall or celng receve these sgnals and a trackng computer calculates each speaker s poston by measurng sgnal delays. Whsper s able to compute the tme-shft between the transmtted and receved versons of the sound by performng a correlaton calculaton on the most recent set of samples. By varyng the number of samples, Whsper can trade measurement accuracy for computaton wth more samples, the more accurate and more computatonally ntensve the calculaton. As a sgnal becomes weaker, the number of samples s ncreased to mantan the same level of accuracy. As the dstance between a speaker and mcrophone ncreases, the sgnal strength decreases. Ths behavor (along wth the use of predctve technques mentoned n the ntroducton can cause taskshare changes of up to two orders of magntude every ms. Snce Whsper contnuously performs calculatons on ncomng data, at any pont n tme, t does not have a sgnfcant amount of useful data stored n cache. As a result, mgraton/preempton costs n Whsper are farly small (at least, on a tghtly-coupled system, as assumed here, where the man cost of a mgraton s a loss of cache affnty. In addton, farness and real-tme guarantees are mportant due to the nherent tght couplng among tasks requred to accurately perform trangulaton calculatons. ASTA system. Before descrbng ASTA n detal, we revew some bascs of vdeography. All vdeo s a collecton of stll mages called frames. Assocated wth each frame s an exposure tme, whch denotes the amount of tme the camera s shutter was open whle takng that frame. Frames wth faster exposure tmes capture movng obects wth more detal, whle frames wth slower exposure tmes are brghter. If a frame s underexposed (.e., the exposure tme s too fast, then the mage can be too dark to dscern any obect. The ASTA system can correct underexposed vdeo whle mantanng the detal captured by faster exposure tmes by combnng the nformaton of multple frames. To ntutvely understand how ASTA acheves ths behavor, consder the followng example. If a camera, A, has an exposure tme of /3 th of a second, and a second camera, B, has an exposure tme of /5 th of a second, then for every two frames shot by camera A the shutter s open for the same tme as one frame shot by B. ASTA s capable of explotng ths observaton n order to allow camera A to shoot frames wth the detal of /3 th of a second exposure tme but the brghtness of /5 th of a second exposure tme. As noted earler, darker obects requre more computaton than lghter obects to correct. Thus, as dark obects move n the vdeo, the processor shares of tasks assgned to process dfferent areas of the vdeo wll change. As a result, tasks wll need to adust ther weghts as quckly as an obect can move 7

across the screen. Snce ASTA contnuously performs calculatons based on prevous frames, t performs best when a substantal amount of useful data s stored n the cache. As a result, mgraton/preempton costs n ASTA are farly hgh. In addton, whle strong real-tme and farness guarantees would be desrable n ASTA, they are not as mportant here as n Whsper, because tasks can functon more ndependently n ASTA. Expermental system set up. Unfortunately, at ths pont n tme, t s not feasble to produce experments nvolvng a real mplementaton of ether Whsper or ASTA, for several reasons. Frst, both the exstng Whsper and ASTA systems are snglethreaded (and non-adaptve and consst of several thousands of lnes of code. All of ths code has to be re-mplemented as a mult-threaded system, whch s a nontrval task. Indeed, because of ths, t s essental that we frst understand the schedulng and resource-allocaton trade-offs nvolved. The development of PD 2 -OF, PAS, NP-PAS, CNG-EDF, and NP-CNG-EDF can be seen as an attempt to artculate these tradeoffs. Addtonally, the focus of ths paper s on schedulng methods that facltate adaptaton we have not addressed the ssue of devsng mechansms for determnng how and when the system should adapt. Such mechansms wll be based on ssues nvolvng vrtual-realty and multmeda systems that are well beyond the scope of ths paper. For these reasons, we have chosen to evaluate the schemes dscussed n ths paper va smulatons of Whsper and ASTA. Whle ust smulatons, most of the parameters used here were obtaned by mplementng and tmng the schedulng algorthms dscussed n ths paper and some of the sgnal-processng and vdeo-enhancement code n Whsper and ASTA, respectvely, on a real multprocessor testbed. Thus, the behavors n these smulatons should farly accurately reflect what one would see n a real Whsper or ASTA mplementaton. For both Whsper and ASTA, the smulated platform was assumed to be a shared-memory multprocessor, wth four 2.7-GHz processors and a -ms quantum. All smulatons were run 6 tmes. Both systems were smulated for secs. (Note that longer smulatons return smlar results. We mplemented and tmed each schedulng scheme consdered n our smulatons on an actual testbed that s the same as that assumed n our smulatons, and found that all schedulng and reweghtng computatons could be completed wthn 5µs. We consdered ths value to be neglgble n comparson to a -ms quantum and thus dd not consder schedulng overheads n our smulatons. For both Whsper and ASTA, we conducted two types of experments: ( all preempton and mgraton costs were the same and corresponded to a loss of cache affnty; and ( the preempton cost was set to some value and the mgraton cost was vared. If a task was preempted and then mgrated, we assumed that t ncurred the maxmum of the two costs. We gnored the ssue of bus contenton, snce n pror work, Holman and Anderson have shown that bus contenton can be vrtually elmnated n Pfar-scheduled systems by staggerng quantum allocatons on dfferent processors [7]. Staggerng would be trval to apply n PAS and NP-PAS as well, snce n PAS, processors run nearly ndependently of each other. Furthermore, snce CNG-EDF and NP-CNG-EDF are event-based rather than quantum-based, obs are unlkely to begn executng smultaneously. Based on measurements taken on our testbed system, we estmated Whsper s mgraton cost as 2µs µs, and ASTA s as 5µs 6µs. Whle we beleve that these costs may be typcal for a wde range of systems, n our experments we vared the preempton/mgraton cost over a slghtly larger range. For all experments, the maxmum executon cost of PAS and NP-PAS was 7ms and 5ms for CNG-EDF and NP-CNG-EDF. These values were determned by proflng each system beforehand to determne the best compromse of accuracy and performance. Whle the ultmate metrc for determnng the effcacy of both systems would be user percepton, ths metrc s not currently avalable, for reasons dscussed earler. Therefore, we compared each of the tested schemes by comparng aganst allocatons n the IDEAL algorthm. In partcular, we measured both the average under-allocaton and farness factor for each task set at the end of each smulaton (.e., secs.. The average under-allocaton (UA s the average amount each task s behnd ts IDEAL allocaton (ths value s defned to be nonnegatve,.e., for a task that s not behnd ts IDEAL, ths value s zero. The farness factor (FF of a task set s the largest devance from the allocatons n IDEAL between any two tasks (e.g., f a system has three tasks, one that devates from ts IDEAL allocaton by, another by 2, and the thrd by 5, then the FF s 5 ( = 6. The FF s a good ndcaton of how farly a scheme allocates processng capacty. A lower FF means the system s more far. For applcatons lke Whsper, where the output generated by multple tasks s perodcally combned, a low FF s mportant, snce f any one task s behnd, then performance of the entre system s mpacted; however, for applcatons lke ASTA, where tasks are more ndependent, a hgh FF does not affect the system performance nearly as much. These metrcs should provde us wth a reasonable mpresson of how well the tested schemes wll perform when Whsper and ASTA are fully re-mplemented. Whsper experments. In our Whsper experments, we smulated three speakers (one per obect revolvng around pole n a m m room wth a mcrophone n each corner, as shown n Fg. 4. The pole creates potental occlusons. One task s requred for each speaker-mcrophone par, for a total of 2 tasks. In each smulaton, the speakers were evenly dstrbuted around the pole at an equal dstance from the pole, and rotated around the pole at the same speed. The startng poston for each speaker was set randomly. As mentoned above, as the dstance between a speaker and mcrophone changes, so does the amount of computaton necessary to correctly track the speaker. Ths dstance s (obvously mpacted by m a speaker s movement, but s also lengthened Mcrophone when an occluson s m Occludng Obect Speaker caused by the pole. The range of weghts of each task was determned (as a functon of Fgure 4: The smulated Whsper system. a tracked obect s poston by mplementng and tmng the basc computaton of the correlaton algorthm (an 8

Average under-allocaton n mllseconds 2 5 5 PD2-OF CNG-EDF NP-CNG-EDF PAS NP-PAS Average Under-Allocaton for Whsper 2 4 6 8 Preempton/mgraton cost n mcroseconds Whsper Farness factor n mllseconds 5 4 3 2 NP-PAS PAS PD2-OF CNG-EDF NP-CNG-EDF Farness Factor for Whsper 2 4 6 8 Preempton/mgraton cost n mcroseconds Whsper Average under-allocaton n mllseconds 25 2 5 5 PD2-OF CNG-EDF NP-CNG-EDF PAS NP-PAS Average Under-Allocaton for Whsper 2 4 6 8 Mgraton cost n mcroseconds Whsper Fgure 5: The average under-allocaton (UA and the farness factor (FF for Whsper as a functon of preempton/mgraton cost, and (c the average UA for Whsper as a functon of mgraton cost (preempton cost s fxed at µs, as scheduled by each tested algorthm. The key n each graph s n the order that the schemes appear n that graph at µs. 98% confdence ntervals are shown. Note that n, CNG-EDF and NP-CNG-EDF are ndstngushable from each-other. (c accumulate-and-multply operaton on our testbed system. In the Whsper smulatons, we made several smplfyng assumptons. Frst, all obects are movng n only two dmensons. Second, there s no ambent nose n the room. Thrd, no speaker can nterfere wth any other speaker. Fourth, all obects move at a constant rate. Ffth, the weght of each task changes only once for every 5cm of dstance between ts assocated speaker and mcrophone. Sxth, all speakers and mcrophones are omndrectonal. Fnally, all tasks have a mnmum weght based on measurements from our testbed system and a maxmum weght of.. A task s current weght at any tme les between these two extremes and depends on the correspondng speaker s current poston. Even wth theses assumptons, frequent share adaptatons are requred. We conducted Whsper experments n whch the tracked obects were sampled at a rate of, Hz, the dstance of each obect from the room s center was set at 5cm, the speed of each obect was set at 5 m/sec. (ths s wthn the speed of human moton, and the maxmum executon cost, mgraton, and preempton cost were vared. However, due to page lmtatons, the graphs below are a representatve samplng our collected data. The frst set of graphs n Fg. 5 show the result of the Whsper smulatons conducted to compare PD 2 -OF, PAS, NP-PAS, CNG-EDF, and NP-CNG-EDF. Insets and depct the average UA and FF, respectvely, for each scheme, where the preempton cost s vared from to µs and the mgraton cost equals the preempton cost. Inset (c depcts the average UA for each scheme, where the preempton cost s set at µs (the maxmum expected preempton cost for Whsper and the mgraton cost s vared from to µs. There are fve thngs worth notng here. Frst, when the preempton/mgraton cost s vared over the range 2 to µs, the UA s about the same for all schemes (nset ; however, PD 2 -OF has the best FF (nset. Second, whle CNG-EDF and NP-CNG-EDF do not have the best UA for the expected preempton/mgraton costs for Whsper, for hgher preempton/mgraton costs,.e., preempton/mgraton costs larger than µs, CNG-EDF and NP-CNG-EDF both have a substantally better UA than PD 2 -OF and better FF than ether PAS or NP-PAS. Thrd, as the mgraton cost (but not preempton cost of a task ncreases, the UA of PAS and NP-PAS ncreases slowly (nset (c. However the performance of the other three schemes decays quckly. Fourth, the confdence ntervals for the FF for CNG-EDF, NP-CNG-EDF, and PD 2 -OF are smaller than for PAS and NP-PAS, snce CNG-EDF, NP-CNG-EDF, and PD 2 -OF have better accuracy. Ffth, n nset (c, PD 2 -OF and CNG-EDF s UA do not apprecably ncrease untl the mgraton cost exceeds µs. Ths s because, untl the mgraton cost s µs, PD 2 -OF and CNG-EDF ncur the maxmum of the mgraton or preempton cost, whch s µs. ASTA experments. In our ASTA experments, we smulated a 64 64-pxel vdeo feed where a grey square that s 6 6 pxels moves around n a crcle wth a radus of 6 pxels on a whte background. Ths s llustrated n Fg. 6. The grey square makes one complete rotaton every ten seconds. The poston of the grey square on the crcle s random. Each frame s dvded nto sxteen 6 6-pxel regons; each of these regons s corrected by a dfferent task. A task s weght s determned by whether the grey square covers ts regon. By analyzng ASTA s code, we determned that 64 pxel the grey square takes three tmes more processng Grey Square tme to correct than the Square s Path whte background. Hence, f the grey square completely covers a task s regon, then ts weght s three tmes larger than that of a task wth an all-whte Fgure 6: The smulated ASTA system. regon. The vdeo s shot at a rate of 25 frames per second, and as a result, each frame has an exposure tme of 4ms. The second set of graphs, n Fg. 7, show the result of the ASTA smulatons conducted to compare the fve schedulng algorthms. Insets and depct the average UA and FF, for each scheme, where the preempton cost s vared from to µs and the mgraton cost equals the preempton cost. Inset (c depcts the average UA for each scheme, where the preempton cost s set at 6µs (the maxmum expected preempton cost for ASTA and the mgraton cost s vared from to µs. There are two thngs worth notng here. Frst, when the preempton/mgraton cost s vared over the range 5 to 6µs, NP-PAS and PAS have the smallest UA (nset ; however, CNG-EDF and NP-CNG-EDF both 64 pxel 9