class-constrained resource allocation problems tami tamir thesis advisor: hadas shachnai

32
Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Upload: garrett-pebworth

Post on 29-Mar-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Class-constrained Resource Allocation Problems

Tami Tamir

Thesis advisor: Hadas Shachnai

Page 2: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

A Resource Allocation Problem:

Devices: Each device has a limited amount of some resource.

- A disk with a limited broadcast capacity.- A processor with specific rate.- A machine with a limited amount of material.

Clients: that present requests for resources.- Transmission of some video-program file.- Processing of a job that needs s processing units.

- Production of a product that needs s units of the material.

Page 3: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

• A set of N knapsacks, K1,...,KN.

Each knapsack, Kj, has limited volume, vj.

• A set, I, of n items, u1,...,un. Each item, uI, has a size, s(u), and a value, p(u).

• The objective: A legal placement of some U Iwith maximal value.

• Legal = For all j, the total size of items placed inKj is at most vj.

The Multiple Knapsack Problem (MK)

devices

clients

Page 4: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

An Example (MK)

For all u, p(u) = s(u).

4

32

1

3 3

v=8

4

3

1

3

3

2

Optimal value = 16

n=6

4

32

1

3 3

Page 5: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

A Resource Allocation Problem:

Devices: Each device has a limited amount of some resource,

- A disk with a limited broadcast capacity,

- A processor with a specific rate,

Clients: that present requests for resources,

- Transmission of a video-program file.

- Processing of a job that needs u processing units.

A Class-constrained

and a limited number of ‘settings’.

and a limited storage capacity.

and a limited number of configurations.

and need specific

‘settings’.the video program file “Tom & Jerry”

of type ‘red’ that needs s processing units.

Page 6: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

• A set of N knapsacks, K1,...,KN. Each knapsack, Kj, has

limited volume, vj,

• A set, I, of n items, u1,...,un. Each item, u I, has a size,

s(u), and a value, p(u).

• The objective: A legal placement of some U I with

maximal value.

• Legal = For all j, the total size of items placed in Kj is at

most vj,

The Multiple Knapsack Problem (MK)

The Class-constrained Multiple Knapsack Problem (CCMK)

and a limited number, cj, of compartments.

a value, p(u), and a type (color), c(u) {1,…,M}.

and the number of different colors included

in Kj is at most cj.

Page 7: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

An Example (CCMK)

For all u, p(u) = s(u).

4

32

1

3 3

v=8, c=2

4

33

3

2

Optimal value = 15

n=6, M=3

4

2

1

3 3

3

Page 8: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Related Work

• IP formulation of CCMK (Dawande and Kalagnanam,

1998) • A PTAS for MK (Chekuri and Khanna, 2000) • A dual PTAS for BP (Hochbaum and Shmoys, 1987,

Epstein and Sgall, 1999) • Cardinality-constrained packing problems - when the

number of items is limited (no types) (Kellerer and Pferschy, 1999; Caprara, Kellerer, Pferschy, and Pisinger,

2000)• Data placement (Golubchik, Khanna, Khuller, Thurimella,

and Zhu, 2000).

Page 9: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Related Work (Cont’)

• Multi-dimensional packing problems:

May seem related, but there is a crucial

difference: In class-constrained packing - Each bin has the 2-dim size vj cj

- Each item has the 2-dim size s(u):

s(u) 1 if u is the first item of its color in Kj

s(u) 0 otherwise

s(u) =

Page 10: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

A Special Case: Unit-sized Items

• When each client’s request is for one unit of some resource, then in the resulting packing problem each item, u I, has size s(u)=1.

6 + 7 + 2 + 6 + 3 = 24

v = 8c = 2

• An important application: Data Placement for Multimedia-on-demand

Systems.

Page 11: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Multimedia-on-Demand Systems

A centralized server. A large database of video programs transmitted to clients. Storage devices (disks). The system has to “play” multiple streams of many different videos simultaneously, based on customer demand. Read only, basically predictable requests. Rigid real-time scheduling requirements. Fixed transfer rate.

The Challenge: Balance the load on the disks.

Page 12: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The I/O Subsystem

• A database of M video-program files {f1, f2, …, fM}

• N storage devices (shared disks) {d1, d2, ..., dN}

• Each disk, dj, has:

 cj = Storage Capacity: the number of program files

that can be stored on dj.

vj = Load Capacity:the maximum number of

concurrent multimedia streams that can be

transmitted by dj .

Page 13: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The I/O Subsystem (Cont’)

The number of broadcasts allocated to each file must be determined by its popularity

pi = the popularity of the file fi

11

M

iip

Page 14: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Maximizing the Throughput

How many broadcasts should be allocated to each of these copies?

Given the file popularities, how many copies of each file should

be kept? Where should we store each copy?

Page 15: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Static Assignment

A Static Assignment Algorithm allocates the resources to the files. The output of a static assignment consists of two M N matrices:

• The Assignment matrix, A a {0, 1} – matrix,

Aij = 1 iff a copy of fi is stored on dj.

• The Broadcast matrix, B

Bij {0, 1, ..., vj}. Bij is the number of

broadcasts allocated to fi on dj.

Page 16: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Static Assignment (Cont’)

A legal static assignment must satisfy the following conditions:

1. Aij = 0 Bij = 0 [A disk can broadcast a video program only if it holds the video program file].

2. j, i Bij < vj [the sum of allocated

broadcasts does not exceed the broadcast capacity of the disk].

3. j, i Aij < cj [the number of copies stored on a disk does not exceed its storage capacity].

Page 17: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Definitions

• The broadcast potential of the system is V =

• The broadcast potential of fi is Bi =

• The broadcast request of fi, denoted by Wi , is

the desired number of broadcasts of fi .

i , pi V < Wi < pi V and

N

jjv

1

N

jijB

1

M

ii VW

1

Page 18: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Goals1. Fairness: An assignment is -fair if for every file fi, Bi > Wi

allocated required

• [0, 1]

2. Utilization: The utilization of an assignment is

U =i min(Wi , Bi)

required allocated

U is the total number of broadcasts that may be required and provided.

A Perfect Assignment is both 1-fair and with utilization V (i , Wi =Bi).

Page 19: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

f1: Pokemon p1 = 0.8

f2: Telletubies p2=

0.1f3: The Flinstones p3=

0.1

Maximizing Fairness and Utilization

B1= 60, B2= 20, B3= 20 

3/4fair (60/80 for f1) ;  U = 60 + 10 + 10 =

80

Most Fair!

V=100 W1 = 80, W2 = W3 =

10

d1: c1= 1 v1=60

d2: c2= 2 v2=40

B11= 60 B22=B23=20

Page 20: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

f1: Pokemon p1 = 0.8

f2: Telletubies p2=

0.1f3: The Flinstones p3=

0.1

Maximizing Fairness and Utilization

Most Utilized!

V=100 W1 = 80, W2 = W3 =

10

d1: c1= 1 v1=60

d2: c2= 2 v2=40

B11= 60 B12=B22=20

B1= 80, B2= 20, B3= 0 

0fair,  U = 80 + 10 + 0 = 90

Page 21: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Our Results

The fair-allocation problem and the utilization problem are strongly NP-hard.

For some instances a perfect assignment always exists and can be found in polynomial time.

How a perfect assignment can be approximated (the approximation ratio depends on the uniformity of the disks).

The utilization problem can be solved optimally in polynomial time by adding a single storage unit to each disk (a dual approximation algorithm).

Page 22: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Moving Window Algorithm

To fill the knapsack Kj, scan the list of items with a

moving window that covers items of cj colors, until

for the first time the window contains at least vj

items.

The knapsacks are sorted such that v1/c1 v2/c2

vN/cN.

The sets of items are sorted such that |I1| |I2| |

IM|.

3 , 4 , 6 , 6 , 8 , 8 vj=17

cj=3

13 16 20

Page 23: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Moving Window Algorithm

We use the moving window algorithm to show:

1. When the knapsacks are homogenous (with

identical v/c ratio) and cj N+M-1, a perfect

assignment always exists, and can be found efficiently.

2. If we are allowed to add a single compartment to each knapsack, then we can achieve the optimal utilization.

Page 24: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Back to General Instances….

where items may have arbitrary sizes and arbitrary profits

v=8, c=2

4

33

3

2

n=6, M=3

4

2

1

3 3

3

Page 25: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

The Class-constrained Bin- Packing Problem (CCBP)

• A set of Identical bins, each having volume v and c compartments.

• A set, I, of items. Each item, u, has a size, s(u) < v,

and a color, c(u) 1,...,M.

• The goal: A legal placement of all the items in I in a

minimal number of bins.

In resource allocation terms, CCBP = complete all

the requests using as few (identical) devices as

possible.

Page 26: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

In resource allocation (examples):

1. A request to print a file of 600 pages, both

yellow and pink papers are fine.

2. A request to watch a video-program-file,

any episode from Seinfeld will do.

Generalized Class-constrained Packing (GCCP)

• Each item, u I, has a size, s(u), a value, p(u), and a set, c(u) {1,...,M}, of colors.

• It is legal to place u in any knapsack that allocates a compartment to some color in c(u).

Page 27: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Our Results for General Instances

• A dual PTAS for CCBP, (packs any instance, I, into m OPT(I) bins of size (1+ )v ).

• A PTAS for CCMK, (packs a set U I such that P(U) (1-)OPT(I)).

• An FPTAS for the 0-1 class-constrained knapsack. - optimal when all the items have the same value.

• APX-hardness proofs for GCCP (already for the case where all items have the same size and the same value).

- For the PTASs we assume that M is a constant.- The FPTAS is suitable for M=(n).- In the APX-hardness proof M= (n).

Page 28: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Scheduling With Machine Allotment and Parallelism Constraints

• Each job, Jj, has :

– a processing requirement, tj,

– an allotment parameter, aj,

– a parallelism parameter, pj.

The execution of Jj can be shared by aj machines.

At most pj machines can process it simultaneously.

• Traditional scheduling problems:

– No parallelism (pj=1),

– Non-preemptive (aj = 1) or preemptive (aj=m).

j , a

j pj

Page 29: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Our Results for the Scheduling Problem

• Strongly NP-hard even for ‘easy’ instances:

– identical machines, and j, aj= pj= c

– identical jobs, and j aj 3m/2

(reductions from 3-partition)

• A maxj(1+1/pj)- approximation algorithm.

(based on the moving window algorithm)

• A PTAS for the case j, aj pj is a fixed

constant.

Page 30: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Results Relevant to Classic Scheduling Problems (pj=1).

Known Results:

• An optimal algorithm for j, aj = m.

• Hardness proof for j, aj = 1.

Our Results:

• An optimal algorithm for identical machines and j, aj 3.

• Hardness proof for uniform machines and j, aj =3.

• An optimal algorithm for uniform machines and j, aj 5.

Page 31: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

On-line Class-constrained Packing

• The input is given as a sequence, , of items each having size 1 and color in {1,…,M}.

• We need to pack the items upon arrival, without any knowledge on the subsequent items.

• On-line CCBP: use as few bins to pack all the items in .

• On-line CCMK: pack as many items from

(arriving items may be rejected).

Page 32: Class-constrained Resource Allocation Problems Tami Tamir Thesis advisor: Hadas Shachnai

Deterministic Algorithm for CCBP.

• For a sequence, , of length n, let k = M/c -1 and h = n/v -1.

• Sc,v(k,h) = the set of input sequences with k,h.

• Lower Bound: For any deterministic algorithm,

rd(Sc,v(k,h)) 1+ (k+1- kc+1/v)/(h=1).

(asymptotically, rd2)

• This bound is achieved by first-fit.

• Conclusion: An a-priori knowledge of n, M does not help.