Download presentation

Presentation is loading. Please wait.

Published byNorman Corsey Modified over 2 years ago

1
Class-constrained Packing Problems with Application to Storage Management in Multimedia Systems Tami Tamir Department of Computer Science The Technion (Based on Joint papers with Hadas Shachnai)

2
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.

3
A set of N knapsacks, K 1,...,K N. Each knapsack, K j, has limited volume, v j. A set, I, of n items, u 1,...,u n. 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 K j is at most v j. The Multiple Knapsack Problem (MK) devices clients

4
An Example (MK) For all u, p(u) = s(u). 4 32 1 33 v=8 4 3 1 3 3 2 Optimal value = 16 n=6 4 32 1 33

5
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.

6
A set of N knapsacks, K 1,...,K N. Each knapsack, K j, has limited volume, v j, A set, I, of n items, u 1,...,u n. 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 K j is at most v j, The Multiple Knapsack Problem (MK) The Class-constrained Multiple Knapsack Problem (CCMK) and a limited number, c j, of compartments. a value, p(u), and a type (color), c(u) {1,…,M}. and the number of different colors included in K j is at most c j.

7
An Example (CCMK) For all u, p(u) = s(u). 4 32 1 33 v=8, c=2 4 3 3 3 2 Optimal value = 15 n=6, M=3 4 2 1 3 3 3

8
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 = 8 c = 2 An important application: Data Placement for Multimedia-on-demand Systems.

9
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. The Challenge: Balance the load on the storage devices.

10
Multimedia on Demand - Some Special Properties Good Properties: A stream is a logically defined unit of load. Basically predictable, both in forecast and real-time. Most of the time: read only. Flexibility: can make multiple copies of popular files, can choose (and change on-line) the source. Bad Properties: Rigid real-time scheduling requirement. Sustained broadcasts with fixed transfer rates.

11
The I/O Subsystem A database of M video-program files {f 1, f 2, …, f M }. N storage devices (shared disks) {d 1, d 2,..., d N }. Each disk, d j, has: c j = Storage Capacity: the number of program files that can be stored on d j. v j = Load Capacity: the maximal number of concurrent multimedia streams that can be transmitted by d j.

12
The I/O Subsystem (Cont’) The number of broadcasts allocated to each file must be determined by its popularity p i = the popularity of the file f i

13
Given the file popularities, how many copies of each file should be kept? Where should we store each copy? How many broadcasts should be allocated to each of these copies? Given the allocation of file copies to the disks, and a request to “play” a video, from which copy do we allocate a data stream? How do we dynamically balance the load on the disks? Maximizing the Throughput

14
A Load Balancing Scheme Static Phase (run periodically): Input: Forecast of movie play demand. Output: Good quality assignment of storage and load capacity to the video files. Modes: From scratch / incremental. Dynamic Phase (run online): Input: Assignment of files to disks; current movie play demands. Output: Good load balancing decisions. Modes: incremental.

15
Related Work Data sharing techniques: 1.Batching – delaying requests with the hope that more requests for the same data will arrive during the batching interval. 2.Buffering - closing the temporal `gaps' between successive requests through the use of buffer space. 3.Adaptive piggybacking - adjusting broadcast rates of requests in progress for the same data until their corresponding data streams can be merged into one. These techniques can be applied independently of the load balancing scheme

16
The Static Phase 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, A ij = 1 iff a copy of f i is stored on d j. The Broadcast matrix, B B ij {0, 1,..., v j }. B ij is the number of broadcasts allocated to f i on d j.

17
The Static Assignment (Cont’) A legal static assignment must satisfy the following conditions: 1. A ij = 0 B ij = 0 [A disk can broadcast a video program only if it holds the video program file]. 2. j, i B ij < v j [the sum of allocated broadcasts does not exceed the broadcast capacity of the disk]. 3. j, i A ij < c j [the number of copies stored on a disk does not exceed its storage capacity].

18
Definitions The broadcast potential of the system is V = The broadcast potential of f i is B i = The broadcast request of f i, denoted by W i, is the desired number of broadcasts of f i. i, p i V < W i < p i V and

19
The Goals 1. Fairness: An assignment is -fair if for every file f i, B i > W i allocated required [0, 1] 2. Utilization: The utilization of an assignment is U = i min(W i, B i ) 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, W i =B i ).

20
f 1 : Pokemon p 1 = 0.8 f 2 : Telletubies p 2 = 0.1 f 3 : The Flinstones p 3 = 0.1 Maximizing Fairness and Utilization B 1 = 60, B 2 = 20, B 3 = 20 3/4 fair (60/80 for f 1 ) ; U = 60 + 10 + 10 = 80 Most Fair! V=100 W 1 = 80, W 2 = W 3 = 10 d 1 : c 1 = 1 v 1 =60 d 2 : c 2 = 2 v 2 =40 B 11 = 60 B 22 =B 23 =20

21
f 1 : Pokemon p 1 = 0.8 f 2 : Telletubies p 2 = 0.1 f 3 : The Flinstones p 3 = 0.1 Maximizing Fairness and Utilization Most Utilized! V=100 W 1 = 80, W 2 = W 3 = 10 d 1 : c 1 = 1 v 1 =60 d 2 : c 2 = 2 v 2 =40 B 11 = 60 B 12 =B 22 =20 B 1 = 80, B 2 = 20, B 3 = 0 0 fair, U = 80 + 10 + 0 = 90

22
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).

23
The Moving Window Algorithm To fill the knapsack K j, scan the list of items with a moving window that covers items of c j colors, until for the first time the window contains at least v j items. The knapsacks are sorted such that v 1 /c 1 v 2 /c 2 v N /c N. The sets of items are sorted such that |I 1 | |I 2 | |I M |. 3, 4, 6, 6, 8, 8 v j =17 c j =3 13 16 20

24
The Moving Window Algorithm We use the moving window algorithm to show: 1.When the knapsacks are homogenous (with identical v/c ratio) and c j 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.

25
The Dynamic Phase File popularities typically change periodically. The MOD system may support the following operations: Reallocate storage capacities (by deletion of file copies, replications...). Reallocate load capacities (internal balance on each disk). Based on the work of J.L. Wolf, P.S. Yu, and H. Shachnai, 1997: The current assignment is represented in two graphs: the file graph and the disk graph.

26
V D : {d 1, d 2, …, d N } E D : A directed edge (d 1, d 2 ) if there exists a file f i such that: 1. A i1 = A i2 =1 2. There is a stream allocated to f i on d 1. 3. Total load on d 2 is at most v 2 -1. A directed edge (d 1, d 2 ) signifies the potential of transferring a single stream from d 1 to d 2. The Disk Graph, G D =(V D, E D )

27
An Example of Dynamic Balancing A system with four movies: 1. The lady in red (f 1 ) 2. Blue velvet (f 2 ) 3. Pink panther (f 3 ) 4. The green mile (f 4 ) f1,f2f1,f2 f 3, f 2 f 3, f 4 f4f4 More broadcasts of f 1 are available d1d1 d2d2 d4d4 d3d3

28
Back to General Instances…. where items may have arbitrary sizes and arbitrary profits v=8, c=2 4 3 3 3 2 n=6, M=3 4 2 1 3 3 3

29
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.

30
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).

31
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).

Similar presentations

OK

CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.

CS 414 - Spring 2012 CS 414 – Multimedia Systems Design Lecture 34 – Media Server (Part 3) Klara Nahrstedt Spring 2012.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on generalized anxiety disorder Share ppt online Ppt on fdi in retail sector in india 2012 Ppt on shell structures pdf Ppt on event management company Free ppt on employee motivation Ppt on disk formatting programs Ppt on instrument landing system for sale Ppt on business cycle Ppt on commercial use of microorganisms in the field