ENERGY-EFFICIENT SCHEDULING FOR
APERIODIC REAL-TIME JOBS WITH
MAXIMUM POWER AWARENESS
Sirivat Poonvasin
OBJECTIVE
The goal is to construct an algorithm to
schedule jobs with deadline, aka real-time
jobs, so as to minimize the total energy
spent.
All of this with a constraint that the
processor has a maximum speed.
Note that “processor”, “jobs”, “energy” are
generic terms, depending on the context of
applications.
PROBLEM DESCRIPTION
At any time t 0,
J(t) = {1,2,…,n}
is the set of jobs in system at time t.
Job i, i=1,2,…,n, in the set J(t) has a
deadline bi before which its execution has to
complete.
PROBLEM DESCRIPTION (cont’d)
The amount of work that job I carries with it
upon arrival is Wi (in units of processing
cycles).
The processor has a maximum speed of Smax
cycles/second.
At any time t, the processor assigns the
execution speed si(t) to job i.
PROBLEM DESCRIPTION (cont’d)
Since system is uniprocessor, we have
0 < si (t) Smax
for at most one job i in J(t), while
sj = 0
for all j i.
PROBLEM DESCRIPTION (cont’d)
The energy that the processor spends during
[0,t0] is
E t0
t0
s (t)dt ,
0 iJ t0
n
i
n 1
Since n > 1, to minimize E(t0), for each j, we
set sj (t) to the lowest speed in such a way that
the deadline is not violated.
PROBLEM STATEMENT
At any time t 0, the algorithm we seek has
to do two things.
(1) choose the job j* in J(t) to assign an
execution speed 0 < sj* Smax, and
(2) determine the speed sj* to assign to j*,
so as to minimize E(t) and satisfy all the
deadline requirements.
KEY ASSUMPTIONS
Given the set J(t) = {1,2,…,n}, we assume
that all of the following are known upon the
arrival of each job j in J(t):
– Aj : the arrival time of j.
– Bj : the deadline of j.
– Wj : the amount of work that j carries with it.
In the on-line algorithm, we assume that jobs
are preemptible.
For notational convenience, we always assume
that the set J(t) is arranged, using any sorting
algorithm, so that bi < bj when i < j.
RESIDUAL WORK
The residual work Rj(t0) for job j at time t0
is the residual number of additional
processor cycles required after time t0 in
order to complete job j.
Immediately, we have
R j a j W j
t2
R j t2 R j t1 s j t dt
t1
RESIDUAL INTENSITY
The residual intensity SJ (t0) for J(t0) is defined
as
S J t0
max d J k , t0
1 k n
where
d J k , t0
1
bk t0
k
R t
j 1
j
0
EDF SCHEDULING ALGORITHM
The earliest deadline first (EDF) algorithm
is a scheduling algorithm that always
executes the job whose deadline is the
earliest.
RESULT#1
(Schedulability Condition)
The set J(t0) is EDF-schedulable (i.e. all
deadlines are satisfied with the EDF
algorithm) if and only if
SJ (t0) Smax
RESULT #2
Let cj be the completion time of job j. If
every job in J(t0) is executed at speed SJ(t0),
then there exists k* J(t0) with ck* = bk*
Furthermore, if job k* is the only job in J(t0) to
complete with ck* = bk*, then SJ (ck*) < SJ (t0).
RESULT #3
Suppose that job 1 is executed with speed SJ
(t0). If c1 < b1, then SJ (c1) = SJ (t0).
O (n2) SCHEDULING ALGORITHM
Let J(t0) ={1,2,…,n} be arranged so that
b1 < b2 < < bn.
1. Let t’ = t0.
2. Calculate SJ = SJ (t’). If SJ > Smax, then J(t0) is not
schedulable.
3. Execute the job in J(t’) with earliest deadline, say
job j* with speed SJ.
4. Set t’ = cj*. Remove j* from J(t’). If t’ = bj*, then
repeat Step 2 unless J(t’) is empty; otherwise,
repeat Step 3 unless J(t’) is empty.
EXAMPLE
J(0) = {1,2,3,4} with
– W1 = 4, W2 = 8, W3 = 4, W4 = 5.
– b1 = 3, b2 = 6, b3 = 12, b4 = 37.
Then SJ (0) = 2 is the execution speed for job 1,
which finishes at t=2 < b1. So, job 2 is executed
with same speed=2, and finishes at t=6=b2.
Since c2=b2=6, recalculate SJ(6)=0.67 and
run job 3 with this speed c3 = 12 = b3.
Since c2=b2=12, recalculate SJ(12)=0.2 and
run job 4 with this speed c3 = 37 = b3.
GRAPHICAL ILLUSTRATION
Residual work
This slope represents dJ(4,0), which is less than dJ(2,0). So, SJ(0) = dJ(2,0).
R3(0) R4(0)
This slope represents SJ(0) and SJ(2).
This slope represents SJ(6).
3
b1
6
b2
R4(0)
R4(0)
2
c1
R3(0)
R2(0)
R1(0)
R2(0)
This slope represents SJ(12).
12
b3
time
37
b4
ON-LINE SCHEDULING ALG
Do Steps 1-3 below at every time t’ at which there
is a job arrival or a job termination (say, job j*).
1. (a) [Job termination] Exclude j* from J(t’). If J(t’)
is empty, then return; else if t’ < bj* , goto Step 3.
(b) [Job arrival] Include j* in J(t’).
2. Calculate SJ (t’). If SJ(t’) < Smax , then reject j* and
exclude j* from SJ (t’) and return; else set SJ to SJ(t’).
3. Pick a new job from J(t’) with earliest deadline for
execution with speed SJ.
PERFORMANCE
The algorithm is compared against AVR (See
Yao 1995), which uses EDF and sets the
execution speed at any time t to be
s(t )
b
jJ t0
Wj
j
aj
where J(t) is the set of jobs for which t [aj, bj].
PERFORMANCE (cont’d)
The following quantities are used as metrics
- Probability of job rejection for a fixed Smax.
- Average energy used per job when Smax = .
PERFORMANCE (cont’d)
Simulation:
– Poisson job arrivals with rate .
– For each job j, Wj is Poisson with mean .
– For each job j, bj is exponentially distributed
with mean .
– All of the above are independent.
Average Energy vs.
Average Energy vs.
Rejection Probability vs. Smax
CONCLUSION
Schedulability for pre-emptible real-time jobs
with deadlines and maximum processor speed.
On-line algorithm to execute jobs in system so
as to satisfy all deadlines with lowest energy
possible.
Through simulation, the algorithm yields better
performance compared against AVR.
© Copyright 2025 Paperzz