online algorithms to minimize resource reallocation and network communication

29
APPROX and RANDOM 2006 Online Algorithms to Minimize Resource Reallocation and Network Communication Sashka Davis, UCSD Jeff Edmonds, York University, Canada Russell Impagliazzo, UCSD

Upload: soo

Post on 06-Jan-2016

22 views

Category:

Documents


2 download

DESCRIPTION

Online Algorithms to Minimize Resource Reallocation and Network Communication. Sashka Davis, UCSD Jeff Edmonds, York University, Canada Russell Impagliazzo, UCSD. Resource Allocation Problems [KKD02, PL95, IRSD99, Edm00]. Given: Multi-processor machine with T identical processors. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Online Algorithms to Minimize Resource Reallocation and Network Communication

Sashka Davis, UCSDJeff Edmonds, York University, Canada

Russell Impagliazzo, UCSD

Page 2: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Resource Allocation Problems[KKD02, PL95, IRSD99, Edm00]

• Given: Multi-processor machine with T identical processors.

• Problem: assign processors to parallel jobs whose requirements are evolving and malleable.

• Goal: schedule jobs, satisfy processor requirements of each job, minimize preemption.

Page 3: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

The Weak Department Chair Problem

I want 12!

10 5 415

19

3 412 17

Page 4: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

RAP: Resource Allocation Problem

RAP Instance• T identical processors.• n users.

Input: (i,rt,i ) - at time t user i requests ri,t processors.

Output: (lt,i ) - the algorithm must allocate lt,i processors to i, lt,i ≥ rt,i .

Constraints: ∑ rt,i ≤ T and ∑ lt,i ≤ T, for all t.Objective: Minimize changes to the global state.

Cost = |{(lt,i ,lt+1,i), where lt,i ≠ lt+1,i}|.

The algorithm is not notified when users current demands fall bellow their current allocations.

Page 5: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

The Strong Department Chair Problem

I want 30,If not – penalty!

10 5 415

19

3 4

You can’t have 30! I take the penalty!

Page 6: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

RAPP: Resource Allocation Problem with Penalties

RAPP Instance• T identical processors.• n users.

Input: (i,rt,i, pt,i) - at time t user i requests rt,i processors and penalty pt,i.

Output: (lt,i) - allocation of lt,i, processors to i s.t., lt,i ≥ rt,i or do nothing.

Constraints: ∑ rt,i ≤ T and ∑ lt,i ≤ T, for all t.Objective: Minimize changes to the global state, i.e., reallocations.

Cost: |{(lt,i ,lt+1,i), where lt,i ≠ lt+1,i}| + ∑ pt,i, when the scheduler fails to satisfy the t’th request.

The algorithm is not notified when its current demand falls bellow its current allocation.

Page 7: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

The Humble Chair Problem

I want MORE

!

10 5 415

19

3 413 16

?

Page 8: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

RRAP: Restricted Resource Allocation Problem

RRAP Instance • T identical processors• n usersInput: (i) - at time t user i complains.Output: (lt,i), such that lt,i ≥ lt-1,i.

Constraints: ∑ lj,t ≤ T, for all t.Objective: Minimize changes to the global state, i.e., reallocations.Cost: |{(lt,i ,lt+1,i)}|, such that lt,i ≠ lt+1,i.

The algorithm never learns the precise demands exactly, only an upper bound for each.

?

Page 9: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Network Communication Problem

[OLW01, CKA02, CYV06 ]• Central cache and a network of low-power

sensors.• Sensors read values.1. Cache must know the values read exactly –

#sensor reads = #network transmissions.2. Sensors are low-power devices and we want to

minimize network communication.– Solution: Settle for approximation.

Page 10: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

TMAV: Transmission Minimizing Approximate Value Problem

n sensors reading values

Sensor 1[L1,,H1]

Sensor 1[L1,,H1]

Sensor n[Ln,Hn]

Sensor n[Ln,Hn]

vn[Ln,Hn]

v1

v1[L′1, H′1,]

Precision T ≥ ∑(Hi-Li)

],[ 111 HLv

Constraints: T ≥ ∑(Hi-Li); vi[Li,Hi], for all t, iObjective: Minimize network communication.Cost: The number of transmissions between sensors and cache.

Central

Cache

Page 11: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Two Online Problems

Minimize Resource Reallocation Minimize Network Communication

Central Control Maintains State.

Must satisfy the demands of many users.

Objective: Minimize changes to the state.

A property: online algorithms do NOT know the precise requirements of users.

TMAV

?

RRAPRAPPRAP

Page 12: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Bi-criteria Online Algorithms

• Adversary uses T resources/precision.• Algorithm:

– use sT resources/precision.– the precise requirements of users are unknown to the algorithm.

Goal: Find randomized, competitive online algorithms for RAP, RRAP, RAPP, and TMAV problems using the smallest possible s.

When s=1 then the competitive ratio is infinity.

Page 13: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Results: Upper Bounds

1. O(logsn)-competitive algorithm for RRAP, where s is a constant, s≥3.

2. Modified the solution for RRAP and obtained algorithms with similar competitive ratios O(logsn) for RAP, RAPP, and TMAV.

?

Page 14: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Results: Lower Bounds

1. For s = 1 no competitive algorithm for RAP and TMAV exists.

2. Defined the notion of competitive ratio preserving online reduction with respect to adaptive online adversary “≤ AD_ON’’.

1. RAP ≤AD_ONTMAV

1. RAP ≤AD_ONRAPP

Page 15: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Results: Lower Bounds Using Reductions

(h,k)-paging ≤ AD_ON RAP

1. No online algorithm, using (1+ε) resources can achieve competitive ratio better than Ω(1/ ε) against an adaptive online adversary, using resource of size 1.

2. No online algorithm using (1+ ε) resources can achieve competitive ratio better than Ω(log(1/ ε)) against an oblivious adversary using resource of size 1.

Page 16: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

The Remainder of the Talk

1. Steal From the Rich – a randomized O(logsn)-competitive algorithm for RRAP.

2. For s=1 no competitive algorithm for RAP and TMAV exists.

Page 17: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

RRAP: Restricted Resource Allocation Problem

RRAP Instance :• T identical processors,• n users.Input: (i) - at time t user i complains.

Output: (li,t) , such that lt,i≥ lt-1,i.

Constraints: ∑ lt,i ≤ T, for all t.

Cost: Number of pairs (lt,i ,lt+1,i), such that lt,i ≠ lt+1,i.

The algorithm never learns the precise demands exactly, only an upper bound for each.

?

Page 18: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Steal From the Rich Algorithm

sT/n

user 1

sT/n

user 2

sT/n

user n

Initially partition sT resources evenly among the n users.

Let s be a constant, and r=Θ(√s), μ be a constants, which dependon s, but not the instance.

Page 19: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Steal From the Rich Algorithm

lt,1

user 1 lt,2

user 2

lt,k

user k

At time t+1 user j complains.

lt,j

user j

SFR picks a user k from [n]-{j} with probability lt,k/(sT-lt,j).

lt,n

user n

δ

lt+1,k ← lt,k-δ; lt+1,,j+1←lt,j+δ;

δ

lt,j

user j

user k

μT/n

SFR OPT

Page 20: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

How Much to Steal from the Rich?

SFR maintains the following invariants:1. All users have at least μT/n

• lt+1,k ≥ μT/n, hence δ ≤ lt,k - μT/n;

2. lt+1,k does not shrink by a factor more than 1/r• lt+1,k ≥ lk,t /r, hence δ ≤ lk,t (r-1)/r;

3. lt+1,j does not grow by a factor more than r • lt+1,j ≤ rlt,j,, hence δ ≤ lj,t (r-1);

δ = min {lt,k-μT/n; lt,k (r-1)/r; lt,j(r-1)}.

Page 21: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

SFR Analysis

Want to show that for any req. sequence σE(SFRs(σ)) ≤ O(logsn)OPT(σ)+d.

Φ: Rn Rn → R+; at=SFRt+(Φt-Φt-1)E(SFRs(σ)) = E(∑SFRt)=E(∑at)-Φend+Φ0

Want to prove that for all t:• Φt ≤ O(n logsn), for all t,• E(at) ≤ O(logsn)OPTt.

Then Φ0 ≤ O(n logsn), and we use d = O(n logsn).

Page 22: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

SFR Potential Function

)(log);(log

.,,/

loglog

14

1,,1,,

,

,,

nnOnO

jtnTrl

l

r

s

n

jjttsjtjtjt

OPTjt

SFRjt

jt

• ΔΦ is small when SFR and OPT have proportional allocations.• When SFR has cost and OPT does not, then ΔΦ is negative and compensates for the actual cost of SFR.

Page 23: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Amortized Update Cost

E(at) = E(SFRt+ ΔΦt) ≤ O(logsn)OPTt

Case 1: OPTt ≠ 0, SFR = 0.E(at) = E(0 + #changed intervals O(logs n)) ≤ O(logsn)OPTt

Case 2: OPTt= 0, SFR = 2. E(at) = E(2+ΔΦt) E(ΔΦt) ≤ -2.

In Case 2, SFR does:– lt,j grows by a factor of r then ΔΦt )≤-14;– lt,k shrinks by a factor of 1/r then ΔΦt ≤-14;– Neither: (δ = lt,k-μT/n) then ΔΦt ≥ 0 (unfortunate but rare event).

Concluding: E(SFRs(σ)) ≤ O(logsn)OPT(σ)+d.

Page 24: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

The Additional Resource is Vital

Theorem: There is no online algorithm using T resources that is f(n) competitive against and adversary using T resources, for any function f.

Consider RAP with 2 users and T=1.

Page 25: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

If s=1 then competitive ratio is ∞

0 1user1 user2

1. Adversary cost is 2.2. Probability of incurring cost during t’th request is 1/8t.3. The expected cost of the algorithm diverges as t goes to infinity.

S4,1<r S2,1<rS1,1< r

r[0,1]

S4,1<r S≥r

S3,2=1-S

Page 26: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Relating the Hardness of the Problems

TMAV

RAP

RAPP

SFRRRAP

≤AD_ON≤AD_ON

?

SFR

SFRSFR

Page 27: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Conclusions

1. We obtained O(logs n)-competitive algorithms for four different problems.

2. Justified the need for sT resource.

• Defined a notion of online reduction with respect to adaptive online adversary.

• Related the hardness of the problems using online reductions.

• Reduced (h-k)-Paging to RAP and transferred the standard paging lower bounds to the four problems.

Page 28: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

New Issues

• We studied memoryless online algorithms that do not know the current demands exactly.

• Online reductions to leverage existing lower bounds and relate hardness of online problems.

Page 29: Online Algorithms to Minimize Resource Reallocation and Network Communication

APPROX and RANDOM 2006

Open problems

• Close the gap between the upper and lower bounds.

• Can competitive ratio preserving reductions with respect to adaptive online adversary deliver other lower bounds for other problems?

• Do other problems have similar memoryless online solutions, where the algorithm does not know the demands exactly, but only an upper bound approximation of it.