420 likes | 543 Views
Scheduling Techniques for Broadcasting Popular Media. Tami Tamir University of Washington Joint work with Amotz Bar-Noy and Richard Ladner. Multimedia-on-Demand Systems. A database of media objects (movies). A limited number of channels. Movies are broadcast based on customer demand.
E N D
Scheduling Techniques for Broadcasting Popular Media. Tami Tamir University of Washington Joint work with Amotz Bar-Noy and Richard Ladner
Multimedia-on-Demand Systems • A database of media objects (movies). • A limited number of channels. • Movies are broadcast based on customer demand. • The goal: Minimizing clients’ maximal waiting time (delay). • Broadcasting schemes: For popular movies, the system does not wait for client requests, but broadcasts these movies continuously.
Minimizing Clients’ Maximal Delay. • We measure the quality of service by the maximal possible delay (different from ‘average delay’). • Our goal is to guarantee that no client will wait more than some ‘D’. Short delay = happy customers
Broadcasting Schemes for Media-on-Demand Systems. • A server broadcasting movies of unit-length on h channels. Each channel transmits data at the playback rate. • A client that wishes to watch a movie is ‘listening to all the channels’ and is waiting for his movie to start.
Broadcasting Schemes for Media-on-Demand Systems. This means that the client can read data at a rate which is h times the rate needed for playback. With new technologies, this is possible!
Example: One Movie, Two Channels Staggered broadcasting, [Dan, Sitaram, Shahabuddin, 96]: Transmit the movie repeatedly on each of the channels. C1: … 0 1/2 1 3/2 2 5/2 3 C2: … Guaranteed client delay: at most 1/2 (1/h in general). Can we do better? A clue: With today’s advanced technology, clients can buffer data to their local machine.
C1: 1 1 1 1 1 1 … 0 1/3 2/3 1 4/3 5/3 2 C2: 2 3 2 3 2 3 … arrive watch & buffer Using Client’s Buffer [Viswanathan, Imielinski, 96]: Partition the movie into segments. Early segments are transmitted more frequently. 1 2 3 (3 segments) Each time-slot has length 1/3. The client waits for the next slot start, and can then start watching the movie without interruptions. Maximal client delay: 1/3 (slot size).
C1: 1 1 1 1 1 1 … C2: 2 3 2 3 2 3 … Using Client’s Buffer Why does it work? The first segment is transmitted in any window of one slot. The second segment is transmitted in any window of two slots. The third segment is transmitted in any window of three slots.
… 4 4 4 Using Client’s Buffer, The General Case: • The movie is partitioned into s segments, 1,..,s. • We schedule these segments such that segment i is transmitted in any window of i slots (i-window). • The client has segment i available on time (from his buffer or from the channels). • The maximal delay: one slot = 1/s. • Therefore, the goal is to maximize s for given h.
Examples:h=1, s=1, D=1 1 1 1 C1 1 1 1 1 1 1 … h=2, s=3. D=1/3 C1 … C2 2 3 2 3 2 3 … 4 4 4 C1 … C2 … 5 5 5 … C3 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 3 6 7 3 8 3 6 7 3 8 9 9 Harmonic Window Scheduling • Given h, maximize s such that each i in 1,..,s is scheduled with window at most i. h=3, s=9. D=1/9 Can other techniques do better? Match a lower bound?
Example: Input: W={2,4,5} Output: one channel … 4 2 5 2 4 2 5 2 4 2 5 2 There is at least one transmission of in any window of 4 time-slots 4 The Windows Scheduling Problem • Input: A set W={w1,w2,…,wn} of requests for periodic broadcast. A request with window wi needs to be broadcasted at least once in any window of wi time-slots. • Output: A feasible windows scheduling of W. • Goal: minimize number of channels used.
The Windows Scheduling Problem • Windows Scheduling has applications in media delivery systems, and in machine maintenance. • Client-server-provider. • QoS in push system. • - MoD systems. • Periodic job-scheduling Transmit the weather at least once in any 3 minutes period Replace batteries at least once a week
Our Results - Better Techniques • Two new segment-scheduling techniques: • Shifting. • Channel sharing. • A lower bound for the minimum client’s delay (generalizes the lower bound of [Engebretsen, Sudan, 02] for a single movie). • Each of these techniques produces schedules that - Approach the lower bound for any number of channels. - Guarantee the minimal known delay for small number of segments. • The two techniques can be applied together.
delay The Shifting Technique: • The movie is partitioned into s segments, 1,..,s. • We find a schedule of these segments in h channels such that segment i is transmitted in any window of d+i slots (d is the shifting level). • The 1stsegment has window d+1. • The 2nd segment has window d+2, etc. • The client waits for the next slot start, buffers data during the next d slots, and then starts watching the movie (while continue buffering). The total delay is at most d+1 slots arrive buffer watch & buffer d slots s slots
… 1 1 1 1 1 1 … 2 3 2 3 2 3 3 3 3 4 4 4 1 1 1 1 1 1 2 5 6 2 7 2 5 6 2 7 8 8 Example I: One Movie, Two Channels Without shifting, the best schedule has delay 1/3 … C1: … C2: With shifting, we can schedule 8 segments 1..8, such that segment i is transmitted in any i+1 window (d=1). C1: C2: The resulting delay is (d+1)/s =2/8 = 1/4.
C1: 1 3 1 4 1 3 1 4 1 3 1 4 … C2: 2 5 6 2 7 8 2 5 6 2 7 8 … arrive buffer watch & buffer Example I: One Movie, Two Channels For a client arriving during the second slot: Client’s buffer Client watches
1 1 1 C1 … Example II: One Movie, One Channel Without shifting, even if the client can buffer data, a maximal 1-delay is inevitable. If you are taking a short nap, and you miss the beginning of the movie, you must wait for the next broadcast - even if you have your very own screen.
With shifting (d=3): We partition the movie into 5 segments. 1 2 3 4 5 We broadcast segment iin any i+3 (or smaller) window 1 1 1 1 arrive buffer watch & buffer 3 4 5 3 4 5 3 2 2 2 2 Example II: One Movie, One Channel … The resulting delay: at most 4 slots = 4/5.
Asymptotic Results • How far can we go with this technique? • What happens when d is very large? • Answer: Asymptotically, this is an optimal scheme. • Proof: Based on Recursive Round Robin (RRR) schedules.
RRk schedule: Iterate over the RRk-1 schedules, S1,S2,…, S, for some >1. A segment with window w in some Si has window w in the new schedule. S1 S2 S … … S1 S2 S … z1 z2 z RRk-1 RR1 RRk Recursive Round Robin (RRR) Schedules: RR1 schedule: For some , iterate over z1,z2,…,z. All the segments have window .
a a b b c c d d e e a b a b a b a b a b c d e c d e c d e a c b d a e b c a d b e a c b d a e b Tree Representation of RRR Schedules An RR2-schedule from S1 and S2: S1: RR1 S2: RR1
c d e Tree Representation of RRR Schedules An RR3 schedule: f a b RR2 a c b d a e b c a d b e a c b d a e b RR1 f f f f f f f f f f f f f f f f f f f RR3 … a f c f b f a f e f
8 16 17 An RRR Schedule of [1..25] Harmonic window scheduling of 1..25 on 4 channels. 1 2 3 4 6 7 9 5 18 19 22 23 10 11 12 13 14 15 24 25 20 21 The window of a leaf k is idegree(vi), for all vi on the path from the root to the leaf.
No shift 4 5 6 7 8 4 4 6 6 6 1 1 1 1 3 4 5 3 4 5 3 1 2 3 4 5 2 2 2 2 A Shifted RRR Schedule Back to our one-movie one-channel example: 4 d=3,s=5 In a schedule with shift level d each segment z 1..s is scheduled with window at most z+d.
Asymptotic Results (cont’) Lower bound [Engebretsen, Sudan, 02]: The delay for one movie and h channels is at least Theorem: For h 1, there is a constant ch, such that shifting produces a schedule with delay at most Proof : Given h,d, we find an RR2 schedule on h channels of segments 1,..,s with shift level d, such that s is large enough to satisfy the theorem. (DLB(1)= 0.58).
10 11 12 13 14 15 16 Asymptotic Results (cont’) For a given d we construct an RR2-tree. The root has subtrees for some >1. Starting from d+1, we assign in a greedy fashion as many segments as possible Scheduled range [8..16]. Resulting delay = 8/9 =3 d=7 8 9 Scheduled range [9..20]. Resulting delay = 9/12 =3/4 =3 d=8 12 9 10 11 13 14 15 16 17 18 19 20
Simulation Results for h=1 delay Lower bound=0.58 Number of segments • We simulate our RRR scheduling algorithm. • 30% different from the lower bound for s=8. • 13% different from the lower bound for s=120 (one-minute segments in an average movie).
The Channel Sharing Technique for Multiple Movies The idea: We can gain from transmitting segments of different movies on the same channel. Example: For three channels and one movie the best harmonic schedule guarantees max delay 1/9. 1 2 3 4 5 9 6 7 8 Bandwidth is lost since the actual windows of 5,7,8,9 are smaller than required. Can we do better with sixchannels and two movies?
3 3 6 6 2 2 4 4 7 7 5 5 8 8 9 9 Only these segments have an actual small window 10 10 Channel Sharing - continue For sixchannels and two movies, we have a double-harmonic schedule of ten segments (delay =1/10). Ch4 Ch3 1 1 Ch1 Ch2 Ch5 Ch6
Asymptotic Results • How far can we go with this technique? What happens when the number of movies, m, is very large? • Answer: Asymptotically, this is an optimal scheme. Lower bound: The guaranteed delay for m movies and h channels is at least Theorem: Forh,m 1, there is a constant ch,m, such that there exists a schedule with guaranteed delay at most Proof: An algorithm that produces an RRR schedule.
Combining Techniques • The shifting and the channel sharing techniques can be applied together. • For small values of h, s, and m, we present schedules that achieve the smallest known delay. • Asymptotically, we are getting closer to the lower bound much faster – to show this we analyze and simulate two simple RRR-schedules.
Combining Techniques - example m=2 and h=4 For this value of h/m (=2) the lower bound is D 0.158. The delay using an harmonic schedule is 1/3 The following is a double schedule of the range 3..17, (1..15 with shift d=2) which implies a delay of 3/15=1/5 C1: ((3), (3), (6,6)) C2: ((4), (4), (8,8), (12,12,13)) C3: ((7,7),(11)), (5), ((10),(7,7)), (5), ((7,7),(10)) C4: ((9,9,11), (15,15,16,16,17), (13,14,14,17))
Algorithm RR1 Algorithm RR2 Greedy Algorithm 0.55 0.55 0.55 0.5 0.5 0.5 0.45 0.45 0.45 m=1 0.4 0.4 0.4 m=2 m=3 0.35 0.35 0.35 m=5 delay m=10 0.3 0.3 0.3 m=20 0.25 0.25 0.25 m=50 m=80 0.2 0.2 0.2 0.15 0.15 0.15 0.1 0.1 0.1 1 5 15 25 40 1 5 15 25 40 1 5 15 25 40 # of segments # of segments # of segments Combining Techniques – Simulation Results Case study 1: h=2m D 0.158
m=1 1.05 m=2 m=3 1 m=5 0.95 m=10 m=20 0.9 m=50 0.85 m=80 0.8 0.75 0.7 0.65 0.6 1 5 15 25 40 0.55 Combining Techniques – Simulation Results Algorithm RR1 Algorithm RR2 Greedy Algorithm delay 1 5 15 25 40 1 5 15 25 40 # of segments # of segments # of segments Case study 2: m=h. D 0.582
2.1 2.1 2.1 2 2 2 m=2 1.9 1.9 m=4 1.9 m=6 m=10 1.8 1.8 m=20 1.8 m=50 m=80 1.7 1.7 1.7 1.6 1.6 1.6 1.5 1.5 1.5 1 5 15 25 40 1 5 15 25 40 1 5 15 25 40 Combining Techniques – Simulation Results Algorithm RR1 Algorithm RR2 Greedy Algorithm delay # of segments # of segments # of segments Case study 3: h=½m D 1.552
and Open Problems Other Models • Our shifting and channel sharing techniques can be used also: • To reduce average client delay. • In the receive-r model - where clients have limited number of readers. • For movies with different lengths. • For movies with different popularity/priority (where the desired maximal delay varies). For all these models we have examples of the efficiency of shifting and/or sharing. We have no general algorithm or asymptotic analysis.
Multimedia-on-Demand Systems • A large database of media files transmitted to clients on channels. • Storage devices (disks). • The goal: minimize client delay. Broadcasting: The ultimate solution for popular media. Unicast on-demand: For less popular media.
Unicast in MoD Systems Less-popular media is not broadcasted. Each request is served by a ‘dedicated’ stream. New problem:Data placement on the disks. • Each diskhas two limited resources: Storage Capacity: the number of movies that can be stored on the disk. Load Capacity: the maximal number of concurrent streams that can be transmitted by dj.
The Challenge: Balance the load on the disks. 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?
Related Work:Data sharing techniques • Batching– delaying requests with the hope that more requests for the same data will arrive during the batching interval. • Buffering/ Stream Merging- closing the temporal `gaps' between successive requests through the use of buffer space. • 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
Summary: Multimedia-on-Demand Systems • A large database of media files transmitted to clients on channels. • Storage devices (disks). • The goal: minimize client delay. Broadcasting: The ultimate solution for popular media. Unicast on-demand: For less popular media. We only saw a sample of the problems arising in each.
More Open Problems • Product delivery systems: Any popular digital data can be broadcasted - games, software (originals and updates), educational material. • Delivering multimedia vs. flexible data (that can be received in any order). • Delivering dependent data (e-learning) • Integrated error recovery. • Combining Broadcasting and unicast. • Better broadcasting techniques, better disk utilization.