Title: Scheduling Contract Algorithms on Multiple Processors
1Scheduling Contract Algorithms on Multiple
Processors
- Daniel S. Bernstein, Theodore J. Perkins,
- Shlomo Zilberstein
- University of Massachusetts Amherst
- Lev Finkelstein
- Technion Israel Institute of Technology
- November 3, 2001
2Overview
- Anytime algorithms
- Two types of anytime algorithms
- Interruptible (flexible)
- Contract (easier to design, simpler)
- Scheduling a contract algorithm to yield an
interruptible algorithm - Optimal schedule for one processor
- Optimal schedule for m processors
3Anytime Algorithms
Horvitz (1987), Dean and Boddy (1988), Russell
and Wefald (1991)
- An anytime algorithm is an algorithm whose
quality of results improves gradually as
computation time increases.
result quality
time
4Two Types of Anytime Algorithms
- Interruptible algorithms
- Anytime algorithms whose run time need not be
determined in advance - They can be interrupted at any time during
execution and return a result.
- Contract algorithms
- Anytime algorithms that take the deadline t as
input - No assumption is made about the results produced
before or after time t.
5Deadline Information Is Useful
- Algorithms that take the deadline as input can be
simpler - Depth-bounded or cost-bounded tree search
- Given a deadline, set the depth limit so that all
the information is processed by the deadline. - Discretizing a continuous MDP
- Given a deadline, partition the state set so that
dynamic programming will finish by the deadline.
6Performance Profiles
- Both interruptible and contract algorithms have
performance profiles, Q(t), which return result
quality as a function of time for a problem
instance. - Note that for contract algorithms the horizontal
axis is the time that was given in advance.
time
7Contract ? Interruptible
- What if we want to use a contract algorithm in a
setting where we do not know the deadline? - We can repeatedly activate the contract algorithm
with increasing run times. - When the deadline occurs, we can return the
result produced by the last contract to finish
8The Resulting Performance Profile
- We want to minimize the inefficiency due to
scheduling the contract algorithm.
9More Formally
- We use X to denote a schedule.
- X(i) is the length of the ith contract algorithm
run (we assume w.l.o.g. X(1) ? 1). - G(i) ? X(1) ? X(2) ? ??? ? X(i) is the total time
taken by the first i contracts. - We define L(t) to be the length of the last
contract algorithm to finish before time t.
10Inefficiency of Scheduling
- If the interruption occurs at time t, the loss
from scheduling is t / L(t). - We are interested in minimizing the time wasted
in the worst case.
11Acceleration Ratio
Russell, Subramanian, and Parr (1993)
- A worst-case measure of the inefficiency of the
resulting interruptible algorithm - Note that the worst time for a contract algorithm
to be interrupted is just before it returns a
result. - So,
12An Exponential Schedule
Russell and Zilberstein (1991)
- This schedule achieves an acceleration ratio of
4 - Is this schedule optimal?
13Proof of Optimality
Zilberstein, Charpillet, and Chassaing (1999)
- Let X be an arbitrary schedule.
- Let H(k) be defined as G(k?1) ? G(k).
14Proof of Optimality (cont.)
- Case 1 The H(k) increase at some point.
- In this case there exists a k' such that
- Then we have
- So,
15Proof of Optimality (cont.)
- Case 2 The H(k) are nonincreasing.
- Let
- And we have R(X) ? D2 / (D?1) ? 4.
16Multiple Processor Case
Q(t)
time
17Formal Details
- X(i, j) is the length of the ith contract run on
the jth processor (we assume X(1,1) ? 1). - G(i, j) ? X(1, j) ? X(2, j) ? ??? ? X(i, j) is
the total time taken by the first i contracts run
on processor j. - We redefine L(t) to be the length of the last
contract algorithm to finish on any processor
before time t.
18Acceleration Ratio
- The acceleration ratio for schedule X is
- Again, the worst interruption time is just before
the contract algorithm finishes. - So,
19A Generalized Exponential Schedule
- For m processors, the ith contract algorithm run
on any processor has length (m1)1/mi-1. - Formally, X(i, j) ? (m1)i-1 m(j-1)/m.
- In the two processor case
20Acceleration Ratio for the Schedule
- We can show that the acceleration ratio is
21This Schedule Is Optimal
- It is possible to show that for all schedules X,
- The proof is similar to the one-processor proof,
but slightly more complicated.
22Some Optimal Acceleration Ratios
- At m ? ?, there is no distinction between
contract and interruptible algorithms
23Other Scheduling Work
Zilberstein, Charpillet, and Chassaing (1999)
- There has also been work on incorporating
probabilistic information about the performance
profile and deadline. - A stochastic deadline, PD(t), is a probability
distribution of the deadline over time. - A stochastic performance profile, PA(qt), is a
distribution of the output quality conditioned on
the run time of the contract algorithm.
24Using Probabilistic Information
- With probabilistic information the problem is to
find a scheduling strategy that maximizes the
expected result quality at the deadline. - Under certain assumptions, the one-processor
version of the problem can be formalized as an
MDP. - For future work, we would like to extend this to
m processors.
25Other Extensions
- Even with probabilistic information, the contract
algorithm model still has a worst-case aspect. - We assume that when the contract algorithm
finishes, the next instantiation must start from
scratch. - It may be useful to explicitly model the
information carry-over from one computation to
another.
26Conclusions
- We presented a multi-processor exponential
schedule for constructing an interruptible
algorithm from a contract algorithm. - We proved that no other schedule can achieve a
lower acceleration ratio (although others can
equal it). - The problem can be extended in a number of
directions.