Adaptive Resource Management in Asynchronous Real

On the Joint Utility Accrual Model
Haisang Wu†, Binoy Ravindran†, and E. Douglas Jensen‡
†Real-Time
Systems Laboratory
ECE Dept., Virginia Tech
Blacksburg, VA, USA
E-mail: {hswu02, binoy}@vt.edu
‡The
MITRE Corporation
Bedford, MA 01730, USA
E-mail: [email protected]
April 26, 2004, Santa Fe, NM
Research Objective: extend TUFs with
JUFs, and maximize system utilities
Background and
Introduction
Motivations and
Models
The Algorithm and
Evaluation
11/04/2001

Multi-dimensional QoS

The Joint Utility Functions
Other timing constraints and
optimality


The CUA algorithm
Experimental results

Conclusions, future work

2
QoS of next-generation dynamic RT
systems is often multi-dimensional

QoS often depends on




When the service is performed
The accuracy of the computational results
When other services are completed and the accuracy
of the services’ computational results
Service requests often cause resource
contentions

Mission-oriented, and dynamic and adaptive resolution polices
11/04/2001
3
Jensen’s time/utility functions specify
soft time constraints
(MITRE/TOG
AWACS
Tracker)
U1
U2
U3


tc
action completion time
A TUF specifies the utility
resulting from the completion
of an activity as a function of
its completion time, i.e., Uc
Examples


TUFs of GD/CMU
Coastal Air Defense
Correlate Mid-course
Maintain
Intercept
Launch

AWACS Tracker
Coastal Air Defense
Utility Accrual (UA)
scheduling typically seeks to
schedule activities according
to optimality criteria based on
accruing utility
action completion time
11/04/2001
4
Joint utility describes utility depending
on Uc and progress of other activities



The sensor platform of an
air target engagement
system
Tracker activities: track
hostile targets and
launched interceptors
Guidance activity: monitors
interceptors and provide
course updates to it
Source: DARPA
11/04/2001
5
Joint utility describes utility depending
on Uc and progress of other activities

Tracker activities



Produce location estimates used by
guidance for course update
The accuracy of location estimates
is a function of their execution times
Guidance activity


Utility is a function of when course
updates are provided
Low utility from tracker activities’
 Highly accurate, but late location estimates
 Low accuracy, but early location estimates
11/04/2001
6
Definition of PUFs and JUFs

U p (e j )
thread
execution
time
e0 e1


em-1 em


U Gj
Progressive utility functions
(or PUFs)
Joint utility of an activity


u1
u3
u2
c
p

U


U
iT c i p i
T2
-ve
x-axis: the thread's cumulative
execution time,
y-axis: progressive utility
ej: changing points
A function (JUF) of the Uc and
Up of a set of activities,
excluding those of itself
Example shows guidance G’s
joint utility w.r.t. two tracker
activities T1 and T2
1
11/04/2001
7
Two methods describe precedence
dependency between T1/T2 and G

A




B



TUFs-Only
Scale up G’s TUF if T1 and/or T2 execute too late
The scheduler may spend more cycles on G to compensate
TUF of G not available to the scheduler until T1 and T2 complete
their preceding repetitions
TUFs with JUFs
Joint dependency characterized using JUF
JUF embodies time dimension---when to start producer
TUF/JUF of G available before T complete each repetition
Will B increase the likelihood for G to complete
at acceptable times, increasing the chances for
successful interception?

11/04/2001
8
Task Model and
Time Constraints Model

Scheduling
segment 1
Time constraints of a thread

R1

R2



Scheduling
segment 2
R5
TUF (arbitrary shape)
PUF (non-deceasing)
JUF (non-deceasing, if possible)
Associated with scopes, called
“scheduling segments”
Scheduling segments can be
disjoined or nested
U ic
R3
11/04/2001
Ii
Xi
9
Resource Model and
Optimization Criterion



A thread can request
access to shared
resources
Single-unit resource
model
Resources can be
shared and can be
subject to mutual
exclusion constraints.
11/04/2001



Objective: maximize
the weighted sum of
Uc , Up , and Uj.
Scheduling dependent
threads with stepshaped TUFs is NPhard (Clark’s Ph.D.
Dissertation)
Problem subsumes
this
10
Key Heuristics of CUA:
Combined Utility Density (CUD)



Return on investment of executing a thread
CUD measures the utility that can be accrued per unit time by
executing the thread and the thread(s) that it depends upon
T .ExecTime : the minimal value yielding the highest U Tp ( ExecTime)
tc 

T j T . Dep
T .CUD 
T1
R1
T j .ExecTime
c
p
j
[
U
(
t

t
)

U
(
ExecTime
)

U

c
T]
tc
T2
T1
T3
T2
T3
R2
Dependency chain
Resource
11/04/2001 graph
11
High Level Description of CUA
WHILE (task ready queue is not empty)



Calculate CUD for each task at the current position
APPEND the highest CUD task Tk and its dependent tasks into
the tentative schedule
APPEND: optimize the tentative schedule




From Tk ’s farthest predecessor to Tk itself
Reduce the ExecTime of Tk and its dependents
One time unit reduction each time
Until no increase in the total utility
t
PUFA
PUFB
A
B
11/04/2001
ExeTA = 6, ExeTB = 5
Utotal

ExeTA = 4, ExeTB = 5
12
Implementation Platform: Meta
Scheduler on top of COTS RTOSes




Scheduling algorithm can be
thread
thread
RTSL
RTSL
plugged into the framework
code
code
without modifying the OS kernel
link
link
Only requires four distinct
app. prog.
priorities that can be satisfied by app. prog.
all POSIX RTOS
Reasonably low overhead and
Meta Scheduler
small footprint
“A Formally Verified Application-Level
Framework for Utility Accrual Real-Time
Scheduling On POSIX Real-Time Operating
Systems”, P. Li et al., TSE (2004, 2nd revision)

POSIX OS
Experiments conducted on a Pentium platform (with a CPU of 450
MHz) running QNX Neutrino 6.2 RTOS
11/04/2001
13
Experimental studies verify the
effectiveness of JUF model
90
90
XMR of T1 , T2 and G (%)
100
AUR of T1 , T2 and G (%)
100
80
70
60
JUFs and TUFs
50
TUFs only
80
70
60
JUFs and TUFs
50
TUFs only
40
40
0.2
0.4
0.6
0.9
1.2
1.5
0.2
Average Load
XMR =
AUR =
11/04/2001
0.4
0.6
0.9
1.2
1.5
Average Load
# satisfied term. times
# total_triggers
Accrued utility
Total utility of triggers
X100%
X100%
14
Experimental studies confirm CUA’s
effectiveness of utility accrual
100
100
80
80
60
CUA
AUR %
60
LBESA
40
XMR %
UPA
40
LBESA
UPA
Dover
20
CUA
Dover
FP
20
FP
EDF
EDF
0
0.2
0.4
0.6
0.9
Average Load
1.2
1.5
0
0.2
0.4
0.6
0.9
Average Load
1.2
1.5
Step TUFs, no PUFs and JUFs
FP: the higher utility, the higher priority
DASA, GUS and CUA perform close; they out-perform others during overloads.
EDF suffers domino effect during overloads.
11/04/2001
15
The major contribution is the notion of
JUFs, and the CUA Algorithm
Notion of JUFs
The CUA algorithm
Schedules the joint-dependent threads early
Increases their aggregate completion time utility
Future work
Consider multi-unit resource models
Consider energy constraints
Consider stochastic UA criteria
11/04/2001
16