Pinwheel scheduling

From HandWiki

In mathematics and computer science, the pinwheel scheduling problem is a problem in real-time scheduling with repeating tasks of unit length and hard constraints on the time between repetitions.

Definition

The input to pinwheel scheduling consists of a list of tasks, each of which is assumed to take unit time per instantiation. Each task has an associated positive integer value, its minimum repeat time (the minimum time from the start of one instantiation of the task to the next). Only one task can be performed at any given time.[1]

The desired output is an infinite sequence specifying which task to perform in each unit of time. Each input task should appear infinitely often in the sequence, with the largest gap between two consecutive instantiations of a task at most equal to the repeat time of the task.[1]

For example, the infinitely repeating sequence abacabacabac... would be a valid pinwheel schedule for three tasks a, b, and c with repeat times that are at least 2, 4, and 4 respectively.

Density

If the task to be scheduled are numbered from [math]\displaystyle{ 1 }[/math] to [math]\displaystyle{ n }[/math], let [math]\displaystyle{ t_i }[/math] denote the repeat time for task [math]\displaystyle{ i }[/math]. Then the density of a pinwheel scheduling problem is [math]\displaystyle{ \textstyle\sum 1/t_i }[/math]. For a solution to exist, it is necessary that the density is at most [math]\displaystyle{ 1 }[/math].[2]

This condition on density is also sufficient for a schedule to exist in the special case that all repeat times are multiples of each other (for instance, if all are powers of two), because in this case one can solve the problem using a disjoint covering system.[1] Having density at most [math]\displaystyle{ 1 }[/math] is also sufficient when there are exactly two distinct repeat times.[2] However, it is not sufficient in other cases. In particular, there is no schedule for three items with repeat times [math]\displaystyle{ t_1=2 }[/math], [math]\displaystyle{ t_2=3 }[/math], and [math]\displaystyle{ t_3 }[/math], no matter how large [math]\displaystyle{ t_3 }[/math] may be, even though the density of this system is only [math]\displaystyle{ 5/6 + 1/t_3 }[/math].[3]

Every instance of pinwheel scheduling with density at most [math]\displaystyle{ 3/4 }[/math] has a solution,[4] and it has been conjectured that every instance with density at most [math]\displaystyle{ 5/6 }[/math] has a solution.[3][5] Every instance with three distinct repeat times and density at most [math]\displaystyle{ 5/6 }[/math] does have a solution.[5]

Periodicity and complexity

When there exists a solution, the solution can be assumed to be periodic, with a period at most equal to the product of the repeat times. However, it is not always possible to find a repeating schedule of sub-exponential length.[2]

With a compact input representation that specifies, for each distinct repeat time, the number of objects that have that repeat time, pinwheel scheduling is NP-hard.[2]

Applications

Applications of pinwheel scheduling include scheduling communications between satellites and a ground station, scheduling maintenance of a collection of objects (such as oil changes for automobiles), computer processing of multimedia data,[5] and contention resolution in real-time wireless computer networks.[6]

References

  1. 1.0 1.1 1.2 Holte, Robert; Mok, Al; Rosier, Louis; Tulchinsky, Igor; Varvel, Donald (1989), "The pinwheel: a real-time scheduling problem", Proceedings of the Twenty-Second Annual Hawaii International Conference on System Sciences, Volume II: Software Track, IEEE Computer Society Press, pp. 693–702, doi:10.1109/hicss.1989.48075 
  2. 2.0 2.1 2.2 2.3 Holte, Robert; Rosier, Louis; Tulchinsky, Igor; Varvel, Donald (1992), "Pinwheel scheduling with two distinct numbers", Theoretical Computer Science 100 (1): 105–135, doi:10.1016/0304-3975(92)90365-M . Previously announced at MFCS 1989.
  3. 3.0 3.1 Chan, M. Y.; Chin, Francis (1993), "Schedulers for larger classes of pinwheel instances", Algorithmica 9 (5): 425–462, doi:10.1007/BF01187034 
  4. "Pinwheel scheduling: achievable densities", Algorithmica 34 (1): 14–38, 2002, doi:10.1007/s00453-002-0938-9 
  5. 5.0 5.1 5.2 Lin, Shun-Shii; Lin, Kwei-Jay (1997), "A pinwheel scheduler for three distinct numbers with a tight schedulability bound", Algorithmica 19 (4): 411–426, doi:10.1007/PL00009181 
  6. Wu, Jean-Lien C.; Shin, Haw-Yun; Wu, Yi-Hsien (June 2005), "A pinwheel packet scheduling scheme for broadband wireless networks", Journal of the Chinese Institute of Engineers 28 (4): 701–711, doi:10.1080/02533839.2005.9671037 

External links