scispace - formally typeset
Open AccessProceedings ArticleDOI

A scheduling model for reduced CPU energy

TLDR
This paper proposes a simple model of job scheduling aimed at capturing some key aspects of energy minimization, and gives an off-line algorithm that computes, for any set of jobs, a minimum-energy schedule.
Abstract
The energy usage of computer systems is becoming an important consideration, especially for battery-operated systems. Various methods for reducing energy consumption have been investigated, both at the circuit level and at the operating systems level. In this paper, we propose a simple model of job scheduling aimed at capturing some key aspects of energy minimization. In this model, each job is to be executed between its arrival time and deadline by a single processor with variable speed, under the assumption that energy usage per unit time, P, is a convex function, of the processor speed s. We give an off-line algorithm that computes, for any set of jobs, a minimum-energy schedule. We then consider some on-line algorithms and their competitive performance for the power function P(s)=s/sup p/ where p/spl ges/2. It is shown that one natural heuristic, called the Average Rate heuristic, uses at most a constant times the minimum energy required. The analysis involves bounding the largest eigenvalue in matrices of a special type.

read more

Content maybe subject to copyright    Report

A
Scheduling Model
for
Reduced CPU Energy
Frances Yao Alan Demers Scott Shenker
Xerox
Palo
Alto Research Center
3333
Coyote Hill Road
Palo
Alto, CA
94304
{yao,
demers, shenker}@parc.xerox.com
(extended abstract)
Abstract
The energy usage of computer systems is becom-
ing an important consideration, especially for battery-
operated systems. Various methods for reducing en-
ergy consumption have been investigated, both at the
circuit level and at the operating systems level. In this
paper, we propose a simple model of job scheduling
aimed at capturing some key aspects of energy min-
imization. In this model, each job is to be executed
between its arrival time and deadline by a single pro-
cessor with variable speed, under the assumption that
energy usage per unit time,
P,
is
a convex function of
the processor speed
s. We give an off-line algorithm
that computes, for any set of jobs,
a
minimum-energy
schedule. We then consider some on-line algorithms
and their competitive performance for the power func-
tion
P(s)
=
sp
where
p
3
2. It is shown that one
natural heuristic, called the Average Rate heuristic,
uses at most a constant times the minimum energy
required. The analysis involves bounding the largest
eigenvalue in matrices of a special type.
1
Introduction
Computers are rapidly becoming more widespread
and more portable. For portable computers running
on batteries, energy conservation is critically impor-
tant. In a typical laptop computer, energy use is domi-
nated by the backlit display and the disk. It is difficult
to modulate the power consumption of these devices
while they are operating,
so
energy saving techniques
primarily involve turning them off after a period of no
use.
The new generation of very small portable comput-
ers (PDAs) often have no disk
at
all, and lack the
backlight that consumes much of the display-related
power. For such devices, the power consumption of the
CPU itself becomes significant. This fact is important
because there are energy conservation techniques for
CPUs that do considerably better than simply turn-
ing
off
the device during its “idle loop”. In particular,
CPU circuitry can be designed
so
that slower clock
speeds use lower supply voltage, thus resulting in lower
energy consumption per instruction (see [1,2,4,7] for
various approaches). Such variable speed processors
can operate reliably over a range
of clock speeds. The
power (i.e., energy per unit time) consumed
by
such a
processor is a convex function of its execution speed,
with the exact form dependent on the details of the
technology.
On a computer with a variable speed processor, the
operating system can reduce the energy consumption
by scheduling jobs appropriately. Scheduling to reduce
power consumption was first discussed in
[7],
which
described several scheduling heuristics and measured
the energy savings on typical work loads. This work
was later extended in
[3].
In this paper, we provide a more formal analysis
of the minimum-energy scheduling problem. We pro-
pose
a
simple model in which each job is to be exe-
cuted between its arrival time and deadline by a single
variable-speed processor as described above. A precise
definition of the model is given in Section 2. In Sec-
tion
3,
we give an off-line algorithm that computes
a minimum-energy schedule for any set of jobs, with
no restriction on the power consumption function ex-
cept convexity. We then consider on-line heuristics in
Section 4, with special
focus
on
what
we
call the Aver-
age Rate heuristic (AVR). In Section
5,
we prove that
AVR has
a
constant competitive ratio, i.e., it uses at
most a constant times the minimum energy required,
374
0272-5428/95
$04.00
0
1995
IEEE
Authorized licensed use limited to: University of Pittsburgh. Downloaded on January 3, 2010 at 10:42 from IEEE Xplore. Restrictions apply.

assuming
a
quadratic power function P(s)
=
s2.
Our
analysis shows that the ratio lies between
4
and
8.
In
Section
6,
we sketch a constant-ratio proof for the gen-
eral case
P(s)
=
sp
where
p
2
2. There, the ratio is
shown to be between
pP
and 2P-lpP. Finally, we close
with a discussion of some simulation results and open
problems.
2
The
Model
Let
[to,tl]
be
a
fixed time interval. An instance of
the scheduling problem is
a
set
J
of
jobs
to be executed
during
[to,tl].
Associated with each job
j
E
J
are the
following parameters:
0
aj
its
arrival time,
0
bj
its
deadline
(bj
>
aj),
and
0
Rj
its required number of
CPU
cycles.
We refer to
[ai,
bj]
as the
interval
of job
j.
A
sched-
ule
is a pair
S
=
(s,job)
of functions defined over
[to,t11:
0
s(t)
2
0
is the processor speed
at
time t;
0
job(t)
defines the job being executed
at
time
t
(or
idle
if
s(t)
=
0).
We require that
s(t)
and
job(t)
be piecewise constant
with finitely many discontinuities. A
feasible
schedule
for an instance
J
is a schedule
S
that satisfies
for all
j
E
J
(where
S(z,y)
is
1
if
x
=
y
and
0
oth-
erwise). In other words,
S
must give each job
j
the
required number of cyles between its arrival time and
deadline (with perhaps intermittent execution). We
assume that the power
P,
or
energy consumed per
unit time, is a convex function
of
the processor speed.
The total energy consumed by a schedule
S
is’
E(S)
=
P(s(t))dt.
The goal of the scheduling problem is to find, for any
given problem instance, a feasible schedule that mini-
mizes
E(S).
‘In
the remainder
of
this
paper, unless otherwise specified,
all
integrals
are
taken
with
respect
to
t,
with
to
and
tl
as
lower
and upper limits. We will use abbreviated notations whenever
possible.
3
The
Minimum Energy Scheduler
In this section, we consider the off-line version of the
scheduling problem. We first give a charaterization
of
an energy-optimal schedule for any set of
n
jobs, which
then leads naturally to an
O(nlog2
n)
time algorithm
for computing such schedules.
The characterization will be based on the notion of
a
critical interval
for
J,
which is an interval in which
a
group
of
jobs must be scheduled at maximum, con-
stant speed in any optimal schedule for
J.
The algo-
rithm proceeds by identifying such a critical interval
for
J,
scheduling those ‘critical’ jobs, then construct-
ing a subproblem for the remaining jobs and solving it
recursively. The optimal
s(t)
is in fact unique, whereas
job(t)
is not always
so.
The details are given below.
Definition.
Define the
intensity
of an interval
I
=
where the sum is taken over all jobs j with
[uj,
bj]
2
Clearly, g(I) is a lower bound on the average
processing speed,
S,”’
s(t)dt/(z’
-
t.),
that must be
achieved by any feasible schedule over the interval
[z,z’].
Thus, by convexity of the power function, a
schedule using constant speed g(I) on
[z,
z’]
is neces-
sarily optimal on that interval (in the sense that no
other feasible schedule can use less power on that in-
terval).
Definition.
Let
I*
=
[z,
z‘]
be an interval that max-
imizes g(I). We call
I*
a
critical interval
for
J,
and
the set of jobs
Jp
=
{
j
1
[ai,
bj]
[z,
2’1)
the
critical
group
for
J.
Note that we can assume
I*
=
[ai,
bj]
for
some
i,
j.
The following theorem shows that a critical interval
will determine a segment of the optimal schedule. We
omit the proof here.
Theorem
1.
Let
I*
be a
critical interval
for
J.
If
S
is an optimal schedule
for
J,
then the maximum speed
of
S
is
g(I*),
and
S
runs
at
that speed
for
the entire
interval
I*.
(Moreover,
S
must execute every job of
Jp
completely
within
I*,
and execute no other jobs during
I*
.)
The-
orem
1
immediately leads to the following algorithm,
which finds an optimal schedule for
J
by computing a
sequence of critical intervals iteratively.
[z
,%‘I.
375
Authorized licensed use limited to: University of Pittsburgh. Downloaded on January 3, 2010 at 10:42 from IEEE Xplore. Restrictions apply.

Algorithm [Optimal- Schedule]
Repeat the following steps until
J
is empty:
1.
Identify a critical interval
I*
=
[z, z’]
by computing
s
=
maxg(I), and schedule the jobs of
JI*
at
speed s over interval
I*
by the
earlaest deadline
policy (which is always feasible, see
[6]);
2.
Modify the problem to reflect the deletion of jobs
Jp
and interval
I*.
This involves:
let
J
+
J
-
Jr=
;
reset any deadline
bj
t
t
if
bj
E
[z,
t’],
and
bj
t
bj
-
(z’
-
z)
if
bj
2
z’;
reset the arrival times similarly.
Note that, after each iteration, the intensity g(I) of
some intervals
I
may increase (because
I
has been
(compressed’), which affects the evaluation of maxg(I)
in the next round.
A
straightward implementation of
the above algorithm requires
O(n2)
time for
IJI
=
n.
By using a suitable data structure, such
as
the
segment
tree,
one can reduce the running time to
O(n
log2
n).
We will skip the implementation details here.
A
job instance
J
and its corresponding optimal
schedule
S
are shown in Figure
1.
To keep the di-
agram simple, there is only one job in each critical
group. Job
j
is executed at speed
sj
over interval
I;,
which we represent by a shaded rectangle with base
I;
and height
s3
. The original job
j
is shown
as
a rectan-
gle with base
Ij
and height
dj.
(These two rectangles
coincide when
sj
is a local maximum, such
as
the case
for
j
=
1,3
in the example.) Note that, by the way
S
is
constructed, the interval
I
of any job belonging to
the j-th critical group must satisfy
i<j
4
On-line Scheduling Heuristics
Obviously there is a large space of possible heuris-
tics for the online version of the minimum-energy
scheduling problem. We will mention two simple
heuristics that appear natural:
0
Average Rate:
Associated with each job
j
is its
average-rate requirement
or
density
We define a corresponding step function
dj(t)
=
dj
for
t
E
[aj,
bj],
and
dj(t)
=
0
elsewhere. At any time
t,
the
Average Rate Heuristic
(AVR) sets the processor
speed
at
and use the earliest-deadline policy to choose among
available jobs. It is easy to see that the strategy yields
a
feasible schedule.
0
Optimal Available:
After each arrival, recompute
an optimal schedule
for
the problem instance consist-
ing of the newly arrived job and the remaining por-
tions of all other available jobs. (Thus, the recompu-
tation is done for a set of jobs all having the same
arrival time.)
In the remainder of this paper, we will focus on the
AVR
heuristic and analyze its competitive ratio. Since
the competitive ratio depends on the precise form of
P(s),
and because the competitive analysis is fairly
complex, we first focus our attention on the case where
P(s)
=
s2.
This represents the simplest nontrivial
version of the energy minimization problem.
energy cost
of
an optimal schedule, and let
Given a problem instance
J,
let OPT(J) denote the
AVR(J)
=
J
(E
dj(t))2dt
(2)
3
denote the cost of the heuristic schedule. The compet-
itive ratio
of
the heuristic is defined to be, as usual,
the least upper bound of AVR(J)/OPT(J) over all
J.
We first look
at
how AVR performs in some specific
cases. Let
[to,tl]
=
[0,1],
and
(JI
=
n
in the following
examples.
Example
1.
The ith job has interval
[O,
l/ai-’].
All
jobs have density
di
=
1/2,
except
d,
=
1.
(See Figure
The optimal schedule for this example has constant
speed
s(t)
=
1,
and executes the jobs in the order
Jn,
.
. . ,
J1,
with total energy cost
1.
By evaluating
Eq.
2,
one finds that the energy used by AVR approaches
2
as
n
-+
CO,
resulting in AVR(J)/OPT(J)
=
2.
Example
2.
The ith job has interval
[O,i/n],
and
density
di
=
(r~/i)~
where
e
2
1.
(See Figure
3.)
2-1
It can be verified that the jobs will form criti-
cal groups in the order
J1,.
.
.,
J,.
When
e
=
1,
the optimal schedule has constant speed
1
and AVR
has cost
2
as
n
+
03,
giving a ratio of
2
again.
With a careful analysis, one can prove that the ratio
AVR(J)/OPT(J) is maximized at
4
when
e
is
chosen
to be
312.
376
Authorized licensed use limited to: University of Pittsburgh. Downloaded on January 3, 2010 at 10:42 from IEEE Xplore. Restrictions apply.

n
Figure
1:
A
job instance and its optimal schedule.
I
0
U4
112
1
Figure
2:
A
set of jobs for which AVR has ratio
2.
Example
2,
with
e
=
312,
is the worst example we
have for the AVR heuristic: we also conjecture that
4
is the exact value
of
its competitive ratio. In the
next section, we prove a constant competitive ratio
for the AVR heuristic. The constant we obtain is
4
for a restricted class
of
instances (which includes the
preceding examples), and
8
for the general case.
5
Analysis
of
AVR
Throughout the analysis, we will assume that some
speed function
s*(t)
is given, and consider only those
job instances
J
which can be optimally scheduled by
some
S
=
(s*(t),
job(t))
running at speed
s*(t).
We
call
(J,
S)
a
candidate
instance
for
s*
(or
simply an
instance
for
s*).
We also refer to
J
as a candidate in-
stance, if
S
is either unimportant or understood from
the
context.
We will carry out the analysis of AVR in two
In Section
5.1, we reduce the candidate in- parts.
Ji
I
I
I
I
0
l/n
2n
i
In
1
Figure
3:
A
set of jobs for which AVR has ratio
4.
stances
to
certain canonical forms. That is, we show
that, for the purpose of obtaining an upper bound to
AVR(
J)/OPT(J),
it suffices to consider candidate in-
stances
(J,
S)
that satisfy certain special constraints.
We then analyze the worst case ratio that is achievable
under these constraints.
5.1
Canonical
Forms
We first show that one can assume
(J,S)
to be
a
“bitonic” instance; that is, the execution of each job
j
E
J
by
S
is either consistently “ahead
of0
the av-
erage rate,
or
consistently “behind” the average rate.
Recall that, the function
s*(t)S(
job(t),
j)
specifies the
execution speed of job
j,
which we will denote by
sJ(t).
Thus,
b,
s3
(t)dt
=
l,
dj
(t)dt
=
Rj
.
377
Authorized licensed use limited to: University of Pittsburgh. Downloaded on January 3, 2010 at 10:42 from IEEE Xplore. Restrictions apply.

Let
(J,
S)
be a candidate instance for
s*(t).
We say
(J,
S)
is
a
bitonic instance,
if every job
j
E
J
satisfies
one of the following two inequalities:
l:
sj*(t)dt
2
1:
dj(t)dt
for
a,
5
t
5
bj,
(3)
or
t
1:
sj*(t)dt
5
1,
dj(t)dt
for
aj
5
t
5
bj.
(4)
We refer to
j
that satisfies
Eq.
3
or
Eq.
4
as
a
type-A
or
type-B
job, respectively. (If
j
satisfies both inequal-
ities, we assign its type arbitrarily.)
If
all jobs in J are
of the same type, we call
(J,S)
a
monotonic instance
for
s*.
We will show that, for the competitive analysis of
AVR, the following restrictions may be placed on a
candidate instance
(J,
S)
:
[bitonicity]
each job of
J
is either of type
A
or of
type
B;
tion interval;
[non-preemption]
each job of
J
has a single execu-
[alignment]
each
Ij
is aligned with execution-
interval boundaries;
[nesting]
the
Ij’s
are properly nested.
A candidate instance
(J,S)
satisfying the above re-
strictions is called a
canonical instance.
Lemma
5.1
(Bitonicity)
Given an instance
(J,
S)
fors*,
there exists
a
bitonic candidate instance (J’,S’)
fors*
such that AVR(J)
=AVR(J’).
Proof.
For
a job
j
E
J,
let
{ti)
be the points where
the function
A(t)
=
Jt,(sT(t)
-
dj(t))
changes from
nonzero to zero
or
vice versa. Split
j
into several new
jobs (all having the same density
as
j)
by dividing
[aj,
bj]
into subintervals at these points
ti.
Modify
S
accordingly
so
that the resulting
(7,s‘)
is still
a
can-
didate instance
for
s*.
Clearly,
(J’,
s‘)
is bitonic and
AVR(J) =AVR(
J’).
0
For the job instance shown in Figure
1,
a single
cut on
Jg
transforms it into a bitonic instance.
How-
ever, bitonicity does not preclude
preemptive exeuc-
tion;
that is, some job may have more than one execu-
tion intervals. This situation can make the analysis of
AVR complicated. Therefore, we would like to further
reduce the problem to non-preemptive cases only.
For
this purpose and, indeed, for the derivation of proper-
ties
3)
and
4)
below, we shall refer to a function
F(J)
that closely approximates AVR(
J)
than to AVR(J)
itself. We first motivate the definition of
F(J)
with
some preliminary discussions.
Write
a
bitonic instance as
J
=
JA
U
JB,
where
JA
(respectively,
JB)
consists of all the type-A (type-B)
jobs. Our analysis will deal with the two subsets
JA
and
JB
separately and then combine the results. De-
fine
SA(t)
=
CiEJA
di(t),
and
si(t)
=
CiEJa
sr(t).
Furthermore, let AVRA(J) and OPTA(J) denote the
costs of AVR and OPT respectively that are at-
tributable to
JA.
That is,
and OPTA(J)
=
(~1)~.
AVRA(J)
=
/(sal2
s
Define
SB,
s;3,
AVRB and OPTB similarly. Then,
OPT(J)
=
OPTA(J)
+
OPTB(J),
AVR(J)
5
~(AVRA(J)
+
AVRB(J))
(5)
because
of
the inequality
(h
+
g)2
5
2(h2
+
g2).
We will focus on the ratio of AVRA(J)/OPTA(J)
in the remainder of this section. Hence all jobs con-
sidered are assumed to be in
JA
even without explicit
mentioning. We first define
a
linear order for the jobs
in
JA
and relabel them as
J1,
J2,
. . . accordingly . The
linear order is consisitent with execution speed (i.e.,
the ordering
of
critical groups); hence
i
<
j
if
si*
>
s5.
Among jobs in the same critical group, we order them
by their arrival times
aj
(which is equal to U;):
i
<
j
iff
ai
>
aj
. (For jobs in
JB,
a linear order will be
defined similarly, except that within the same critical
group, we define
i
<
j
iff
b,
<
bj.)
A useful property
of such an ordering for
JA
is the followling:
Lemma
5.2
Let
i,
j
be
two jobs in JA with
i
<
j.
Then
JIj
di
5
JIj
sf.
Proof.
The lemma is trivially true if
Ii
n
Ij
=
0,
hence
we assume
Ii
n
Ij
#
0.
We claim that we must have
a;
>
aj.
If
this
were
not
true,
then
by
the
way
the
linear order is defined,
i
must belong to a higher-speed
critical group than
j.
However, by
Eq.
1,
the entire
interval
of
Ii
would have been scheduled, making it
impossible to execute job
j
right on arrival. Thus we
have
ai
>
aj.
Now, the lemma follows from the type-
A property
of
job
i,
in view of the fact that integration
over
Ij
covers an initial portion
of
i’s
interval.
0
378
Authorized licensed use limited to: University of Pittsburgh. Downloaded on January 3, 2010 at 10:42 from IEEE Xplore. Restrictions apply.

Citations
More filters
Book ChapterDOI

A model for minimizing active processor time

TL;DR: A linear time algorithm for the case where jobs are unit length and each Ti is a single interval is presented, and it is shown that for B=2 and unit length jobs, the optimal non-preemptive schedule has at most 4/3 times the active time of the optimal preemptive schedule.
Book ChapterDOI

A 5/3-Approximation Algorithm for Joint Replenishment with Deadlines

TL;DR: This work investigates the natural special case that each demand has a deadline until when it needs to be satisfied, and presents a randomized 5/3 -approximation algorithm, which significantly improves the best known approximation ratio.
Journal ArticleDOI

Energy efficient scheduling of real-time tasks on multi-core processors with voltage islands

TL;DR: The experimental results show that VILCF significantly outperforms the existing algorithms when there are multiple cores in a voltage island, and the approximation ratio is bounded by a value depending on the number of islands.
Proceedings ArticleDOI

Energy management of DVS-DPM enabled embedded systems powered by fuel cell-battery hybrid source

TL;DR: A policy to maximize the operational lifetime of a DVS-DPM enabled embedded system powered by a fuel cell-battery (FC-B) hybrid source is proposed and it is shown that the lifetime of the system is determined by the fuel consumption of the fuel cell, and that thefuel consumption can be minimized by a combination of a load energy minimization policy and an optimal fuel flow control policy.
Journal ArticleDOI

Energy-Efficient Query Processing in Web Search Engines

TL;DR: The Predictive Energy Saving Online Scheduling Algorithm aims at process queries by their deadlines, and leverage high-level scheduling information to reduce the CPU energy consumption of a query processing node.
References
More filters
Journal ArticleDOI

Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment

TL;DR: The problem of multiprogram scheduling on a single processor is studied from the viewpoint of the characteristics peculiar to the program functions that need guaranteed service and it is shown that an optimum fixed priority scheduler possesses an upper bound to processor utilization.
Journal ArticleDOI

Low-power CMOS digital design

TL;DR: In this paper, techniques for low power operation are presented which use the lowest possible supply voltage coupled with architectural, logic style, circuit, and technology optimizations to reduce power consumption in CMOS digital circuits while maintaining computational throughput.
Journal Article

Low-Power CMOS Digital Design

TL;DR: An architecturally based scaling strategy is presented which indicates that the optimum voltage is much lower than that determined by other scaling considerations, and is achieved by trading increased silicon area for reduced power consumption.
Proceedings ArticleDOI

Scheduling for reduced CPU energy

TL;DR: A new metric for cpu energy performance, millions-of-instructions-per-joule (MIPJ), and several methods for varying the clock speed dynamically under control of the operating system, and examine the performance of these methods against workstation traces.
Proceedings ArticleDOI

Comparing algorithm for dynamic speed-setting of a low-power CPU

TL;DR: This work clarifies a fundamental power vs. delay tradeoff, as well as the role of prediction and of smoothing in dynamic speed-setting policies, and concludes that success seemingly depends more on simple smoothing algorithms than on sophisticated prediction techniques.