In this paper we look at the problem of scheduling tasks on a single-processor system, where each task requires unit time and must be scheduled within a certain time window, and each task can be added to or removed from the system at any time. On each operation, the system is allowed to reschedule any tasks, but the goal is to minimize the number of rescheduled tasks. Our main result is an allocator that maintains a valid schedule for all tasks in the system if their time windows have constant size and reschedules O 1 ε log( 1 ε ) tasks on each insertion as ε → 0, where ε is a certain measure of the schedule flexibility of the system. We also show that it is optimal for any allocator that works on arbitrary instances. We also briefly mention a few variants of the problem, such as if the tasks have time windows of difference sizes, for which we have an allocator that we conjecture reschedules only 1 task on each insertion if the schedule flexibility remains above a certain threshold.Let span( S) = max X∈S X.end− min X∈S X.start for any finite set/sequence of intervals S.Let ( P ? X : Y ) evaluate to X iff P = true and Y otherwise for any boolean P and expressions X, Y .
Reallocation problem terminologyTake any instance I = (n, T, W ) that comprises a set of n unit tasks T [1..n] and their windows W [1..n]. For convenience we shall often not mention the tasks but associate an allocated slot directly with the task's window.Call S a valid allocation for I iff it is an allocation of tasks in I such that each taskis unallocated, and no two tasks in I are allocated to overlapping slots. For convenience we shall use "slot" to refer to a unit interval unless otherwise specified.Call I ordered iff W [1..n] is ordered. If so, call a valid allocation S for I ordered iff S[1..n] is ordered. (Unallocated tasks are ignored.) Call S a solution for I iff S is a valid allocation for I that allocates all tasks in I.Call S a partial solution for (I, k) iff S is a valid allocation for I that allocates all tasks inCall S a γ-solution for I iff S is a solution for I ′ where I ′ is I with all task lengths multiplied by γ.Call S a γ-partial solution for (I, k) iff S is a partial solution for (I ′ , k) where I ′ is I with all task lengths multiplied by γ.Call I feasible iff there is a solution for I, and call I γ-underallocated iff there is a γ-solution for I.Call I ε-slack iff I is (1 + ε)-underallocated, and let the underallocation of I be the maximum such ε, which clearly exists.Call (I, S, k) an insert state iff S is a partial solution for (I, k), and call it ordered iff I is ordered, feasible iff I is feasible, and (1 + ε)-underallocated or equivalently ε-slack iff there is a (1 + ε)-partial solution for (I, k).Call an insertion of a new task feasible iff the resulting instance is feasible, or equivalently iff it creates a feasible insert state.Call an algorithm A an allocator iff it maintains a solution on any feasible task insertion.