Pinwheel scheduling
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 to , let denote the repeat time for task . Then the density of a pinwheel scheduling problem is . For a solution to exist, it is necessary that the density is at most .[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 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 , , and , no matter how large may be, even though the density of this system is only .[3]
Every instance of pinwheel scheduling with density at most has a solution,[4] and it has been conjectured that every instance with density at most has a solution.[3][5] Every instance with three distinct repeat times and density at most 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
- 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
- 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, MR 1171436. Previously announced at MFCS 1989.
- Chan, M. Y.; Chin, Francis (1993), "Schedulers for larger classes of pinwheel instances", Algorithmica, 9 (5): 425–462, doi:10.1007/BF01187034, MR 1212158
- Fishburn, P. C.; Lagarias, J. C. (2002), "Pinwheel scheduling: achievable densities", Algorithmica, 34 (1): 14–38, doi:10.1007/s00453-002-0938-9, MR 1912925
- 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, MR 1470043
- 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
- Pinwheel scheduling (1989), Douglas B. West, University of Illinois