Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Windows Scheduling as a Restricted Version of Bin-packing. Amotz Bar-Noy Brooklyn College Richard Ladner Tami Tamir University of Washington.

Similar presentations


Presentation on theme: "1 Windows Scheduling as a Restricted Version of Bin-packing. Amotz Bar-Noy Brooklyn College Richard Ladner Tami Tamir University of Washington."— Presentation transcript:

1 1 Windows Scheduling as a Restricted Version of Bin-packing. Amotz Bar-Noy Brooklyn College Richard Ladner Tami Tamir University of Washington

2 2 The Bin Packing Problem  Input: Items of sizes at most 1  Output: A feasible packing in bins of size 1  Goal: minimize number of bins used. 0.45 0.2 0.3 0.25 0.3 0.45 0.7 0.2 Example: Input: 0.45 0.2 0.3 0.25 0.3 0.45 0.7 0.2 A packing in 3 bins:

3 3 The Windows Scheduling Problem  Input: A set W={w 1,w 2,…,w n } of requests for periodic broadcast. A request with window w i needs to be broadcasted at least once in any window of w i time-slots.  Output: A feasible windows scheduling of W.  Goal: minimize number of channels used. Example: Input: W={2,4,5} Output: one channel 425242425252 … There is at least one transmission of in any window of 5 time-slots 5 There is at least one transmission of in any window of 4 time-slots 4

4 4 The Windows Scheduling Problem Windows Scheduling has applications in media delivery systems, and in machine maintenance. - Client-server-provider. - QoS in push system. - Periodic job-scheduling. - MoD systems. Transmit the weather at least once in any 3 time-slots. Replace batteries at least once a week

5 5 Windows Scheduling vs. Bin Packing  It is possible to schedule W={2,4,5} on one channel. It must be that  In particular, it is possible to pack in a single bin. 42425252 … Bandwidth requests 1/21/41/5 A packing A schedule

6 6 Windows Scheduling vs. Bin Packing  In general, if W={w 1,w 2,…,w n } can be scheduled on h channels then and the schedule induces a packing.  However, it might be possible to pack {1/w i } into h bins, but not to schedule W on h channels. Example: W={2,3,6} 6222622 1/21/31/6 A packing No schedule

7 7 Unit Fractions Bin Packing  A Unit Fraction: A fraction of the form 1/w for an integer w.  Windows Scheduling (WS) is a restricted version of Unit Fractions Bin Packing (UFBP).  Our work considers:  The relationship between BP and UFBP.  The relationship between UFBP and WS.  Offline and Online versions of both problems. UFBP isolates the ‘partition’ problem of WS. WS is UFBP with additional requirements.

8 8 Offline UFBP  Input: integers W={w 1,w 2,…,w n }.  Goal: Bin packing of {1/w 1, 1/w 2,…,1/w n }.  Is it NP-hard? We only know it is NP-hard for bins of arbitrary size.  Let. Clearly, OPT(W)  H(W).  We show: An algorithm that uses at most H(W)+1 bins (additive error of one for any input).

9 9 Any-fit Decreasing for Offline UFBP 1.Sort the items such that 1/w 1  1/w 2    1/w n 2.Pack the items in this order, each item is placed in any open bin that can accommodate it, or in a new bin, if none exists. Theorem: The number of bins used is at most Proof idea: After packing all the items of size at least 1/k : (i) There are at most k-1 non-full bins, and (ii) Each of the non-full bins is at least 1-1/k full.

10 10 Any-fit Decreasing for Offline UFBP Remark: The analysis is tight (the alg. is not optimal) Example: - in decreasing order. - Can be packed in two bins: - Will be packed in three bins:

11 11 On-line UFBP  Input: a sequence of integers  = w 1, w 2,…, w n  Goal: Online Bin packing of 1/w 1, 1/w 2,…, 1/w n (Pack 1/w i with n, w i+1, w i+2,…, w n unknown)  Recall: For regular BP, there are close lower and upper bounds on the competitive ratio of any online algorithm (1.54 [van Vliet] and 1.59 [Seiden]).  Can we do better with unit fractions?

12 12 On-line UFBP  Recall:  Lower Bound: H(  ) +  (ln H(  ))  Upper Bound: An algorithm.  Performance of traditional ‘fit’ algorithms:  Next-fit is 2-competitive (like BP)  First-fit, Best-fit are 1.2-competitive (1.7 for BP [JDUGG 74]) For any on-line algorithm A, and for any integer h > 0, there exists a sequence  such that H(  ) > h and A uses at least H(  )+  (ln H(  )) bins.

13 13 On-line Windows Scheduling  Input: a sequence of integers  = w 1,w 2,….  Goal: On-line windows scheduling of w 1, w 2,…. on a minimal number of channels.  Example: 8482 4444888888882222222222222222  A better one: 4444 8482

14 14 Algorithm for On-line WS Building blocks: Optimal on-line algorithms for ‘easy’ sequences: - For any odd c we present an algorithm A c such that: For any sequence  in which for all i,, A c schedules  on H(  ) channels. Specifically: A 1 schedules optimally sequences over {1, 2, 4,…,2 j }. A 3 schedules optimally sequences over {3, 6, 12,…, 3·2 j }. A c schedules optimally sequences over {c, 2c, 4c,…, c·2 j }.

15 15 Algorithm A * for On-line WS 1.Each request w in the (arbitrary) on-line sequence, is rounded down to a number w’=c2 v, c  {1,3,…,2k-1}, such that w-w’ is minimized. 2.All the requests rounded to c2 v’ (for some v’) are packed (optimally) by A c Theorem: The total number of channels used is at most Due to the rounding (bandwidth loss) One for each possible choice of ‘c’ k

16 16 Example : A * Input: 9537 8888222222224444 2106 In A 2 * each request is rounded to the nearest 2 v or 3·2 v 5 - rounded to 4, packed by A 1. A 1 : {1, 2, 4,…,2 j } A 3 : {3,6,12,…,3 · 2 j } - rounded to 3, packed by A 3. 3 3333 7 - rounded to 6, packed by A 3. 66 - rounded to 8, packed by A 1. 10 6 - rounded to 6, packed by A 3. - rounded to 2, packed by A 1. 2 - rounded to 8, packed by A 1. 9 669910 222222225555 33337766 2

17 17 The Algorithm A * Recall: The total number of channels used by A k * is at most If H(  ) is known, then minimizes the number of channels for this algorithm. In A *, k is increased dynamically as H(  ) is increased. At each time (k-1) 2 < H(  )  k 2. Theorem: The number of channels used by A * to schedule  is at most What is a good choice of k?

18 18 Summary of Results: UFBP vs. WS Off-lineOn-line Lower bound (UFBP and WS) H(  ) H(  ) +  (ln H(  )) UFBP upper bound H(  ) + 1 WS upper bound H(  ) + O(ln H(  )) [BL02] APX-hard (reduction from 3D3M).

19 19 Open Problems Off-lineOn-line Lower bound (UFBP and WS) H(  ) H(  ) +  (ln H(  )) UFBP upper bound H(  ) + 1 WS upper bound H(  ) + O(ln H(  )) [BL02] hardness unknown Same for UFBP and WS? Reduce it? Increase for WS? WS with migrations


Download ppt "1 Windows Scheduling as a Restricted Version of Bin-packing. Amotz Bar-Noy Brooklyn College Richard Ladner Tami Tamir University of Washington."

Similar presentations


Ads by Google