Keywords

1 Introduction

Efficient allocation of scarce resources is a versatile task lying at the core of many optimization problems. One of the most well-studied resource allocation problems is parallel processor scheduling, where a number of jobs need (typically at least temporarily exclusive) access to one or multiple machines to be completed. The problem variety is huge and might depend on additional constraints, parameters, available knowledge, or the optimization objective (see [14]).

In the context of computing systems, recent years demonstrated a bottleneck shift from processing power (number of machines) towards data throughput. Indeed, thanks to cloud services like AWS and Azure, machine power is available in abundance while data-intensive tasks (e.g., training LLMs like ChatGPT) rely on a high data throughput. If the bandwidth of such data-intensive tasks is, say halved, they may experience a serious performance drop, while computation-heavy tasks care less about their assigned bandwidth. In contrast to the number of machines, throughput is (effectively) a continuously divisible resource whose distribution may be easily changed at runtime. This opens an opportunity for adaptive redistribution of the available resource as jobs come and go. Other examples of similarly flexible resources include power supply or the heat flow in cooling systems.

This work adapts formal models from a recent line of work on such flexible resources [1, 5, 13] and considers them under new objectives and settings. Classical resource constrained scheduling [8, 11, 15, 16] assumes an “all-or-nothing" mentality (a job can be processed if it receives its required resource but is not further affected). One key aspect of the model we consider is the impact of the amount of received resource on the jobs’ performance (sometimes referred to as resource-dependent processing times [9,10,11,12]). The second central aspect is that we allow a job’s resource assignment to change while the job is running.

1.1 Model Description and Preliminaries

We consider a scheduling setting where a set \(J = \left[ n \right] :=\{ 1, 2, \dots , n \}\) of \(n \in \mathbb {N}\) jobs compete for a finite, shared resource in order to be processed. A schedule \(R = (R_j)_{j \in J}\) consists of an (integrable) function \(R_j:\mathbb {R}_{\ge 0} \rightarrow \left[ 0, 1 \right] \) for each \(j \in J\) (the job’s resource assignment) that returns what fraction of the resource is assigned to j at time \(t \in \mathbb {R}_{\ge 0}\). We use \(R(t) = ( R_j(t) )_{j \in J}\) to refer to j’s resource distribution at time t and \(\bar{R}(t) :=\sum _{j \in J} R_j(t)\) for the total resource usage at time t. Each \(j \in J\) comes with a (processing) volume \(v_j \in \mathbb {R}_{\ge 0}\) (the total amount of resource the job needs to receive over time in order to be completed) and a resource requirement \(r_j \in \left[ 0, 1 \right] \) (the maximum fraction of the resource the job can be assigned). We say a schedule \(R = (R_j)_{j \in J}\) is feasible if:

  • the resource is never overused: \(\forall t \in \mathbb {R}_{\ge 0}:\bar{R}(t) \le 1\),

  • a job never receives more than its resource requirement: \(\forall t \in \mathbb {R}_{\ge 0}:R_j(t) \le r_j\), and

  • all jobs are completed: \(\forall j \in J:\int _{0}^{\infty } R_j(t) {{\,\mathrm{d\!}\,}}{t} \ge v_j\).

For \(j \in J\) we define its processing time \(p_j :=v_j / r_j\) as the minimum time that j requires to be completed. See Fig. 1a for an illustration of these notions.

For a schedule \(R = (R_j)_{j \in J}\) we define \(C_j(R) :=\sup \{ t \ge 0 | R_j(t) > 0 \}\) as the completion time of job \(j \in J\). We measure the quality of a schedule R via its makespan \(M(R) :=\max \{ C_j(R) | j \in J \}\) and its total completion time \(C(R) :=\sum _{j \in J} C_j(R)\). Our analysis additionally considers the total fractional completion time \(C^F(R) :=\sum _{j \in J} C^F_j(R)\), where \(C^F_j(R) :=\int _{0}^{\infty } R_j(t) \cdot t / v_j {{\,\mathrm{d\!}\,}}{t}\) is job j’s fractional completion time.

Fig. 1.
figure 1

Illustration of model notions (left) and a WaterFill step.

Relation to Malleable Tasks with Linear Speedup. Our problem assumes an arbitrarily divisible resource, as for example the bandwidth shared by jobs running on the same host. Another common case are jobs that compete for a discrete set of resources, like a number of available processing units. This is typically modeled by a scheduling problem where a set J of n malleable jobs of different sizes \(s_j\) (length when run on a single machine) must be scheduled on m machines. Each machine can process at most one job per time, but jobs j can be processed on up to \(\delta _j \in \left[ m \right] \) machines in parallel with a linear speedup. Jobs are preemptable, i.e., they can be paused and continued later on, possibly on a different number of machines. See [14, Ch. 25] for a more detailed problem description.

This formulation readily maps to our problem by setting j’s processing volume to \(v_j = s_j / m\) and its resource requirement to \(r_j = \delta _j / m \in \left( 0, 1\right] \). The only difference is that our schedules allow for arbitrary resource assignments, while malleable job scheduling requires that each job j gets an integral number \(\delta _j\) of machines (i.e., resource assignments must be multiples of 1/m). However, as observed by Beaumont et al. [3], fractional schedules can be easily transformed to adhere to this constraint:

Observation 1

([3, Theorem 3, reformulated]). Consider a feasible schedule R for a job set J in which \(j \in J\) completes at \(C_j\). Let \(m :=1 / \min \{ r_j | j \in J \}\). We can transform each \(R_j\) without changing \(C_j\) to get \(R_j (t) \in \{ i/m | i \in [m] \cup \{ 0 \} \}\) for any \(t \in \mathbb {R}_{\ge 0}\) and such that each \(R_j\) changes at most once between consecutive completion times.

We first consider online makespan minimization (Sect. 2), where the scheduler must commit to future resource assignments as jobs arrive (as in list-scheduling). Afterwards, we consider offline total completion time minimization (Sect. 3).

1.2 Related Work

Our model falls into the class of continuous shared-resource job scheduling as introduced in [1] and its variants [5, 13]. These models have the same relation between a job’s resource requirement, the assigned resource, and the resulting processing time as we but only consider makespan minimization as objective. The two main differences are that they assumed an additional constraint on the number of machines and considered discrete time slots in which resource assignments may not change.

Another closely related model is malleable job scheduling, where the number of machines assigned to a job can be dynamically adjusted over time. If each job j has its own upper limit \(\delta _j\) on the number of processors it can be assigned, the model becomes basically equivalent to our shared-resource job scheduling problem (as discussed at the end of Sect. 1.1). Drozdowski [7] gave a simple greedy algorithm for minimizing the makespan in the offline setting (see also Sect. 2). Decker et al. [6] considered total completion time minimization for identical malleable jobs for an otherwise rather general (possibly non-linear) speed-up function. They gave a 5/4-approximation for this setting. Beaumont et al. [3] is closest to our model. In particular, they assumed job-dependent resource limits \(\delta _j\) that correspond to our resource requirements. For minimizing weighted total completion time, they used a water-fill approach to prove the existence of structurally nice solutions (cf. to the our water-filling approach in Sect. 2). Their main result is a (non-clairvoyant) 2-approximation algorithm for the weighted case. Their algorithm WDEQ assigns each job a number of processors according to their relative weight, but no more than the limit imposed by \(\delta _j\). Our results in Sect. 3 yield an improved approximation ratio of \(3/2+\varepsilon \) at the cost of clairvoyance (i.e., we must know the job’s volumes and resource requirements). Also, our algorithm only handles the unweighted case.

Other related models, such as rigid and moldable scheduling, disallow the resource assignment of a job to be adjusted after it has been started (see [14] for details).

1.3 Our Contribution and Methods

For our model, makespan minimization is known to be offline solvable (see Sect. 2). We thus concentrate on an online (list-scheduling) setting where jobs are given sequentially and we must commit to a resource assignment without knowing the number of jobs and future jobs’ properties. We use a water-filling approach that is known to produce “flattest" schedules [3]. We derive properties that are necessary and sufficient for any c-competitive algorithm by providing conditions on c-extendable schedules (c-competitive schedules to which we can add any job while remaining c-competitive). From this, we derive slightly weaker universal schedules that are just barely c-extendable and show that schedules derived via water-fill are always flatter than universal schedules. Optimizing the value of c yields \(e/(e-1)\)-competitiveness. We then show that no algorithm can have a lower competitive ratio than \(e/(e-1)\).

Our main result considers offline total completion time minimization. We improve upon the so far best result for this variant (a 2-approximation [3]) by providing a \((3/2+\varepsilon )\)-approximation running polynomial time in \(n,1/\varepsilon \). The result relies on a continuous linear programming (CLP) formulation for the fractional total completion time, for which we consider primal-dual pairs. The primal solution represents the resource assignments over time, while the dual represents the priority of jobs over time. We then extract additional properties about the primal/dual pair. Roughly, our method is as follows. We draw both the primal and dual solutions into a two-dimensional coordinate system. See Fig. 3b for an example. We then merge both solutions into a single 3D coordinate system by sharing the time axis and use the these solutions as a blueprint for shapes in this coordinate system (see Fig. 4). The volume of these shapes then correspond to parts of the primal and dual objective. We use a second algorithm called Greedy that attempts to schedule jobs as early as possible. Choosing the better one of the CLP and the greedy solution gives us the desired approximation.

2 Makespan Minimization

This section considers our resource-aware scheduling problem under the makespan objective. For the offline problem, it is well-known that the optimal makespan \(M^*(J)\) for a job set \(J = \left[ n \right] \) with total volume \(V(J) = \sum _{j \in J} v_j\) is \( M^*(J) = \max \{ V(J) \} \cup \{ p_j | j \in J \}\) and that a corresponding schedule can be computed in time \(\text {O}{n}\) [14, Section 25.6]. The idea is to start with a (possibly infeasible) schedule R that finishes all jobs at time \(p_{\max } :=\max \{ p_j | j \in J \}\) by setting \(R_j(t) = v_j / p_{\max }\) for \(t \in \left[ 0, p_{\max } \right) \) and \(R_j(t) = 0\) for \(t > p_{\max }\). This schedule uses a constant total resource of \(\bar{R} :=V(J) / p_{\max }\) until all jobs are finished. If \(\bar{R} \le 1\) (the resource is not overused), this schedule is feasible and optimal (any schedule needs time at least \(p_{\max }\) to finish the “longest" job). Otherwise we scale all jobs’ resource assignments by \(1/\bar{R}\) to get a new feasible schedule that uses a constant total resource of 1 until all jobs are finished at time V(J). Again, this is optimal (any schedule needs time at least V(J) to finish a total volume of V(J)).

List-Scheduling Setting. Given that the offline problem is easy, the remainder of this section considers the (online) list-scheduling setting. That is, an (online) algorithm \(\mathcal {A}\) receives the jobs from \(J = \left[ n \right] \) one after another. Given job \(j \in J\), \(\mathcal {A}\) must fix j’s resource assignment \(R_j:\mathbb {R}_{\ge 0} \rightarrow \left[ 0, 1 \right] \) without knowing n or the properties of future jobs. We refer to the resulting schedule by \(\mathcal {A}(J)\). As usual in the online setting without full information, we seek to minimize the worst-case ratio between the costs of the computed and optimal schedules. More formally, we say a schedule R for a job set J is c-competitive if \(M(R) \le c \cdot M^*(J)\). Similarly, we say an algorithm \(\mathcal {A}\) is c-competitive if for any job set J we have \( M\bigl ( \mathcal {A}(J) \bigr ) \le c \cdot M^*(J) \).

An Optimal List-Scheduling Algorithm. Water-filling algorithms are natural greedy algorithms for scheduling problems with a continuous, preemptive character. They often yield structurally nice schedules [2,3,4]. In this section, we show that water-filling (described below) yields a simple, optimal online algorithm for our problem.

Theorem 1

Algorithm WaterFill has competitive ratio \(e / (e-1)\) for the makespan. No deterministic online algorithm can have a lower worst-case competitive ratio.

We first describe a single step \(\textsc {WFstep}(R, \iota , C)\) of WaterFill (illustrated in Fig. 1b). It takes a schedule \(R = \left( R_j \right) _{j \in J}\) for some job set J, a new job \(\iota \notin J\), and a target completion time C. Its goal is to augment R by \(\iota \) with completion time C, i.e., to feasibly complete \(\iota \) by time C without altering the resource assignments \(R_j\) for any \(j \in J\). To this end, define the h-water-level \( \text {wl}_h(t) :=\min \{ r_{\iota }, \max \{ h - \bar{R}(t), 0 \} \} \) at time t (the resource that can be assigned to \(\iota \) at time t without exceeding total resource h). Note that \(\iota \) can be completed by time C iff \( \int _{0}^{C} \text {wl}_1(t) {{\,\mathrm{d\!}\,}}{t} \ge v_{\iota } \) (the total leftover resource suffices to complete \(\iota \)’s volume by time C). If \(\iota \) cannot be completed by time C, \(\textsc {WFstep}(R, \iota , C)\) fails. Otherwise, it succeeds and returns a schedule that augments R with the resource assignment \(R_{\iota } = \text {wl}_{h^*}\) for job \(\iota \), where \( h^{*} :=\inf _{h \in \left[ 0, 1 \right] }\{ h | \int _{0}^{C} \text {wl}_h(t) {{\,\mathrm{d\!}\,}}{t} \ge v_{\iota } \}\) is the smallest water level at which \(\iota \) can be scheduled.

WaterFill is defined recursively via WFstep. Given a job set \(J = \left[ n \right] \), define \(H_j :=M^*(\left[ j \right] ) \cdot e/(e-1)\) as the target completion time for job \(j \in J\) (remember that \(M^*(\left[ j \right] )\) can be easily computed, as described at the beginning of this section). Assuming WaterFill computed a feasible schedule \(R^{(j-1)}\) for the first \(j-1\) jobs (with \(R^{(0)}(t) = 0\) \(\forall t \in \mathbb {R}_{\ge 0}\)), we set \(R^{(j)} :=\textsc {WFstep}(R^{(j-1)}, j, H_j)\). If this step succeeds, the resulting schedule is clearly \(e/(e-1)\)-competitive by the choice of \(H_j\). The key part of the analysis is to show that indeed these water-filling steps always succeed.

We start the observation that water-fill schedules always result in “staircase-like” schedules (see Fig. 1b), a fact also stated in [3] (using a slightly different wording).

Observation 2

([3, Lemma 3]). Consider a schedule R whose total resource usage \(\bar{R}\) is non-increasing (piecewise constant). If we \(\textsc {WFstep}(R, \iota , C)\) successfully augments R by a job \(\iota \), the resulting total resource usage is also non-increasing (piecewise constant).

Next, we formalize that WFstep generates the “flattest” schedules: if there is some way to augment a schedule by a job that completes until time C, then the augmentation can be done via WFstep.

Definition 1

The upper resource distribution \(A^C_R(y)\) of a schedule R is the total volume above height y before time C in R. Given schedules RS (for possibly different job sets), we say R is flatter than S (\(R \preceq S\)) if \( A^C_R(y) \le A^C_S(y) \) \(\forall C \in \mathbb {R}_{\ge 0},y \in \left[ 0, 1 \right] \).

Lemma 1

([3, Lemma 4, slightly generalized]). Consider two schedules \(R \preceq S\) for possibly different job sets. Let \(S'\) denote a valid schedule that augments S by a new job \(\iota \) completed until time C. Then \(\textsc {WFstep}(R, \iota , C)\) succeeds and \( \textsc {WFstep}(R, \iota , C) \preceq S' \).

Next, we characterize c-competitive schedules that can be augmented by any job while staying c-competitive.

Definition 2

A schedule R is c-extendable if it is c-competitive and if it can be feasibly augmented by any new job \(\iota \) such that the resulting schedule is also c-competitive.

Lemma 2

Consider a job set J of volume V and with maximal processing time \(p_{\max }\). A c-competitive schedule R for J is c-extendable if and only if

$$\begin{aligned} \forall y \text { with } (c-1)/c < y \le 1:\quad A^{\infty }_R(y) \le (c-1) \cdot (1-y)/y \cdot \max \{ V, p_{\max } \cdot y \}. \end{aligned}$$
(1)

See the Full Version for the proof of Lemma 2. While Lemma 2 gives a strong characterization, the bound on the right hand side of Eq. (1) cannot be easily translated into a proper schedule for the given volume. Thus we introduce proper (idealized) schedules that adhere to a slightly weaker version of Eq. (1). These schedules are barely \(e/(e-1)\)-extendable. Our proof of Theorem 1 combines their existence with Lemma 1 to deduce that WaterFill is \(e/(e-1)\)-competitive.

Definition 3

For any \(V \in \mathbb {R}_{\ge 0}\) we define the universal scheduleFootnote 1 \(U_V:\mathbb {R}_{\ge 0} \rightarrow \left[ 0, 1 \right] \) via

$$\begin{aligned} U_V(t) :={\left\{ \begin{array}{ll} 1 &{} \text {if} \, t < \frac{1}{e-1} \cdot V, \\ 1 - \ln \big ( t \cdot \frac{c-1}{V} \big ) &{} \text {if} \,\frac{1}{e-1} \cdot V \le t < \frac{e}{e-1} \cdot V, \text {and}\\ 0 &{} \text {otherwise.} \end{array}\right. } \end{aligned}$$
(2)
Fig. 2.
figure 2

Universal schedules \(U_V\) and \(U_{V + v}\). The blue area indicates a new job \(\iota \) with volume v and resource requirement r that is scheduled via \(\textsc {WFstep}(U_V, \iota , H)\). Depending on the resource requirement r, the yellow line enters the blue area exactly once, either on the upper plateau (a) or on the lower plateau (b).

See Fig. 2 for an illustration of universal schedules. With \(c = e / (e-1)\), one can easily check that \( A^{\infty }_{U_V}(y) = \frac{e^{1-y}-1}{e-1} \cdot V \le (c-1) \cdot \frac{1-y}{y} \cdot V. \) Thus, by Lemma 2, universal schedules (and any flatter schedules for the same volume) are \(e/(e-1)\)-extendable. Our final auxiliary lemma extends the optimality of WaterFill from Lemma 1 to certain augmentations of universal schedules.Footnote 2 See the Full Version for the proof of Lemma 3.

Lemma 3

Consider the universal schedule \(U_V\), a new job \(\iota \) of volume v and processing time p, as well as a target completion time \(H \ge \frac{e}{e-1} \cdot \max \{ V + v, p \}\). Then \( \textsc {WFstep}(U_V, \iota , H) \preceq U_{V + v} \).

The above enables us to prove the competitiveness of WaterFill from Theorem 1: We show inductively that WaterFill produces a feasible schedule \(R^{(j)}\) for the first j jobs (using that \(R^{(j-1)}\) is “flatter" than \(U_{V(\left[ j-1 \right] )}\) together with Lemma 1) and use this to prove \(R^{(j)} \preceq U_{V(\left[ j \right] )}\) (via Lemma 3). By universality, this implies that all \(R^{(j)}\) are \(e/(e-1)\)-extendable (and thus, in particular, \(e/(e-1)\)-competitive). The full proof of WaterFill is given in the Full Version.

3 Total Completion Time Minimization

This section considers the total completion time minimization and represents our main contribution. In contrast to offline makespan minimization (Sect. 2), it remains unknown whether there is an efficient algorithm to compute an offline schedule with minimal total completion time. The so far best polynomial-time algorithm achieved a 2-approximation [3]. We improve upon this, as stated in the following theorem.

Theorem 2

There is a \((3/2+\varepsilon )\)-approximation algorithm for total completion time minimization. Its running time in polynomial time in n and \(1/\varepsilon \).

For clarity of presentation, we analyze an idealized setting in the main part. The details for the actual result can be found in the Full Version.

Algorithm Description. Our algorithm computes two candidate schedules using the two sub-algorithms Greedy and LSApprox (described below). It then returns the schedule with smallest total completion time among both candidates.

Fig. 3.
figure 3

Schedules for a job set \(J=[3]\) with , and . (a) Greedy’s schedule, (b) Above: A primal (resource) schedule. Below: A dual (priority) schedule. With the dual variables having values \(\alpha _1=51/16\),\(\alpha _2=39/16\) and \(\alpha _3=31/16\), the volumes of the jobs are exactly scheduled. (See the Full Version.)

Sub-algorithm Greedy processes the jobs in ascending order of their volume. To process a job, Greedy assigns it as much resource as possible as early as possible in the schedule. Formally, for jobs \(J=[n]\) ordered as \(v_1\le \dots \le v_n\), the schedule \(R^G\) for Greedy is calculated recursively using \(R^G_j(t)=\mathbbm {1}_{t<t_j}\cdot \min (r_j,1-\sum _{i=1}^{j-1} R^G_{i}(t))\), where the completion time \(t_j\) for job j is set such that j schedules exactly its volume \(v_j\). See Fig. 3b for an example of a Greedy schedule. Sub-algorithm LSApprox deals with solutions to following continuous linear program (CLP).

$$\begin{aligned} \text {minimize } &\sum _{j\in J}\int _0^\infty {\frac{t\cdot R_j(t)}{v_j}{{\,\mathrm{d\!}\,}}{t}}~~~~~~~~& \int _0^\infty {R_j(t){{\,\mathrm{d\!}\,}}{t}}\ge v_j~~\forall j\in J \\ &0\le R_j(t)\le r_j~~\forall j\in J, t\in \mathbb {R}_{\ge 0}~~~~~~~~& \sum \nolimits _{j\in J} R_{j}(t)\le 1~~\forall t\in \mathbb {R}_{\ge 0} \end{aligned}$$

Roughly, LSApprox first subdivides the job set into those jobs that produce a high completion time and the remaining jobs. For the former, an approximate solution is computed using the dual to the discretization (an LP) of above CLP. For the latter, is enough to reserve a small portion of the resource to schedule them with small completion times. For clarity of presentation, the main part will only do a simplified analysis using an idealization of LSApprox. For the details of this algorithm, the analysis using LSApprox and the analysis of Greedy, we refer to the Full Version.

3.1 Analysis via a Bounded Fractionality Gap

Throughout the analysis, we use \(C^*\) to denote the optimal total completion time and \(C^{F*}\) for the optimal fractional total completion time. We require an algorithm that produces a schedule R with a small fractionality gap \(\gamma (R):=C(R)/C^{F*}\), i.e., we compare the total completion time of R with the optimal fractional total completion time for the same job set. We show the following generalization of Theorem 2.

Theorem 3

Assume that there is a polynomial-time algorithm A for total completion time minimization that produces a schedule R with \(\gamma (R)\ge 1\). Then there exists a polynomial-time \((\gamma (R)+1)/2\)-approximation for total completion time minimization.

The proof of Theorem 3 relies on Proposition 1 (three lower bounds on the optimal total completion time) and Proposition 2 (Greedy’s objective in relation to these bounds). Lower Bound (1) (Squashed Area Bound) and Bound (2) (Length or Height Bound) are due to Beaumont et al. [3, Def. 6,7]. Bound (3) is our novel lower bound. The proof can be found in the Full Version.

Proposition 1

Assuming \(v_1\le \dots \le v_n\), the following are lower bounds on \(C^*\):

  1. (1)

    \(C^L:=\max _{j\in J} p_j\)

  2. (2)

    \(C^A:=\sum _{j=1}^n \sum _{i=1}^{j} v_j\)

  3. (3)

    \(C^{F*}+1/2\cdot C^L\)

Proposition 2

The Greedy schedule \(R^G\) satisfies \(C(R^G)\le C^A+C^L\).

Using them, we can give the proof of Theorem 3.

Proof of Theorem 3. We run both Greedy and A in polynomial time to produce schedules \(R^G\) and \(R^A\), respectively, and choose the schedule with the smaller total completion time. Using Proposition 1 and 2 and the fractionality gap \(\gamma :=\gamma (R^A)\), we can bound the cost \(C:=\min (C(R^A),C(R^G))\) of the resulting schedule in terms of \(C^*\):

$$\begin{aligned} C \le \min (\gamma \cdot C^{F*},C^A+C^L) \le \min (\gamma \cdot (C^*-1/2\cdot C^L),C^*+C^L) \end{aligned}$$
$$\begin{aligned} =\frac{\gamma +1}{2} C^*- \frac{\gamma +2}{4} C^L + \min \left( \frac{\gamma -1}{2} C^*-\frac{\gamma +2}{4} C^L,\frac{\gamma +2}{4}C^L-\frac{\gamma -1}{2}C^*\right) \le \frac{\gamma +1}{2}C^* \end{aligned}$$

   \(\square \)

3.2 The Fractionality Gap of Line Schedules

For the remainder of this paper, we will introduce line schedules and their structural properties. Roughly, a line schedule is a certain primal-dual pair for the CLP defined in Sect. 3, and its dual, which we call DCP:

$$\begin{aligned} \text {maximize } &\sum \nolimits _{j\in J} \alpha _j v_j - \sum \nolimits _{j\in J}r_j \int _{0}^{\infty } \beta _{j}(t) {{\,\mathrm{d\!}\,}}{t}-\int _{0}^{\infty }\gamma (t){{\,\mathrm{d\!}\,}}{t}\\ \text {s.t. }&\alpha _j,\beta _j(t),\gamma (t)\ge 0~~\forall j\in J,t\in \mathbb {R}_{\ge 0}~~~~~~~ \gamma (t)+\beta _j(t)\ge \alpha _j-t/v_j~~\forall j\in J,t\in \mathbb {R}_{\ge 0} \end{aligned}$$

It is obtained by dualizing the time-discretized version of the CLP (see the Full Version) and extending its constraints to the continuous time domain. Line schedules formalize the idea that, if we know the dual \(\alpha \)-values, we can reconstruct all remaining primal/dual variables to obtain a primal-dual pair. If the \(\alpha \)-values are chosen correctly, then the volumes scheduled in the primal are exactly the desired volumes \((v_j)_{j\in J}\).

To this end, we will assume that we have access to an algorithm called LS that produces such a line schedule \(R^F\) with \(C^F(R^F)=C^{F*}\). We can then show that LS produces schedules with a fractionality gap of 2:

Proposition 3

The LS schedule \(R^F\) satisfies \(\gamma (R^F)\le 2\).

In the following, we develop the details of line schedules. To this end, first define primal-dual pair as a tuple \((R,\alpha ,\beta ,\gamma ,v)\) that fulfills the following continuous slackness conditions (sc). Again, these are found by extending the time-discretized version of the CLP to the continuous time domain. These conditions hold for all \(j\in J\) and \(t\in \mathbb {R}_{\ge 0}\).

$$\begin{aligned} & {( \alpha \text {-sc}): }\alpha _j(\bar{v}_j-\int _{0}^{\infty }{R_j(t){{\,\mathrm{d\!}\,}}{t}})=0 \qquad \qquad \qquad \qquad \qquad {} & {} {(\beta \text {-sc}): }\beta _j(t)(r_j-R_j(t))=0~~ \\ & {(\gamma \text {-sc}): }\gamma (t)(1-\sum \nolimits _{j\in J} R_j(t))=0~~ \qquad \qquad \qquad \qquad \qquad {} & {} {(R\text {-sc}):} R_j(t)(\alpha _j-t/v_j-\beta _j(t)-\gamma (t))=0~~ \end{aligned}$$

If we choose arbitrary \(\alpha \)-values, then the corresponding line schedule is still a primal-dual pair, except that it possibly schedules a different set of volumes, i.e., the \(\alpha \)-sc is only true if we replace \(v_j\) in the constraint by some other volume \(\bar{v}_j\). This fact is used for the detailed proof of our \((3/2+\varepsilon )\)-approximation, see the Full Version.

To this end, define the dual line \(d_j(t):=\alpha _j-t/v_j\) for each \(j\in J\). The intuition behind a line schedule is now that the heights of the dual lines represent priorities: Jobs are scheduled (with maximum remaining schedulable resource) in decreasing order of the dual line heights at the respective time points. Jobs are not scheduled if their dual line lies below zero. This is formalized in the following definition. (In Fig. 3b, we supplement the example from Fig. 3a by a depiction of the dual lines.)

Definition 4

We call a job set J non-degenerate if all job volumes are pairwise distinct, i.e., \(v_j\ne v_{j'}\) for all \(j,j'\in J\).Footnote 3 Define a total order for each \(t\ge 0\) as \(j'\succ _t j:\Leftrightarrow d_{j'}(t)>d_j(t)\text { or } d_{j'}(t)=d_j(t)\text { and } v_{j'}>v_j\).Footnote 4 The line schedule of \(\alpha \) is a tuple \((R,\alpha ,\beta ,\gamma ,v)\) (recursively) defined as follows.

$$\begin{aligned} R_j(t)&=\mathbbm {1}_{d_j(t)>0}\cdot \min (r_j,1-\sum \nolimits _{j'\succ _t j} R_{j'}(t))~~~~~~~~~~\beta _j(t)=\max (0,d_j(t)-\gamma (t)) \\ \gamma (t)&=\max (0,d_j(t))\text {, where } j \text { is} \, \text {the} \, \text {smallest} \, \text {job} \, \text {according} \, \text {to} \succ _t \, \text {with} \, R_j(t)>0 \end{aligned}$$

Equipped with the definition of a line schedule, we can now tackle the proof of Proposition 3. It requires the following two properties about the assumed algorithm LS. First, Lemma 4 allows us to bound the completion times of a fractional schedule in terms of the \(\alpha \)-variables in the DCP:

Lemma 4

Algorithm LS produces a schedule \(R^F\) with \(C_j(R^F)\le \alpha _j v_j\) for all \(j\in J\).

Second, we show the following lemma. Abbreviate \(P=\sum _{j\in J}\int _0^\infty t\cdot R_j(t)/v_j{{\,\mathrm{d\!}\,}}{t}\) (the primals objective), and \(A=\sum _{j\in J} \alpha _j v_j\), \(B=\sum _{j\in J}r_j \int _{0}^{\infty } \beta _{j}(t){{\,\mathrm{d\!}\,}}{t}\) and \(\varGamma =\int _{0}^{\infty }\gamma (t){{\,\mathrm{d\!}\,}}{t}\) (the parts of the dual objective).

Lemma 5

Algorithm LS produces a schedule \(R^F\) such that there exists a primal-dual pair \((R^F,\cdot ,\cdot ,\cdot )\) that fulfills strong duality (\(A=B+\varGamma +P\)) and balancedness (\(P=B+\varGamma \)).

Using these lemmas, we can show Proposition 3.

Proof of Theorem 3. Using Lemmas 4 and 5, we show the statement as follows:

$$\begin{aligned} C(R^F) =\sum _{j\in J} C_j(R^F) \le \sum _{j\in J}{\alpha _j v_j} =A=A-B-\varGamma +P=2P=2C^F(R^F) =2C^{F*} \end{aligned}$$

   \(\square \)

In the Full Version, we show the following Lemma 6, stating that line schedules are indeed primal-dual pairs. We then define LS to output a schedule \(R^F\) for a line schedule \((R^F,\alpha ,\beta ,\gamma ,v)\) according to Lemma 6, i.e., for each \(j\in J\), \(\int _{0}^\infty R_j(t){{\,\mathrm{d\!}\,}}{t}=v_j\). Using this definition, we can show Lemma 4.

Lemma 6

For any job set J there exists an \(\alpha \) such that the line schedule of \(\alpha \) is a primal-dual pair.

Proof of Lemma 4. By definition, \(R^F_j(t)=0\) if \(d_j(t)\le 0\). Hence, as \(d_j\) is monotonically decreasing, \(C_j(R^F)\) is bounded by the zero of \(d_j(t)\), which lies at \(t=\alpha _j v_j\).

   \(\square \)

Fig. 4.
figure 4

(a) \(P\)-shapes for job set from Fig. 3b. \(P\)-shapes are delimited from below by \(d_j(t)\) (extended into the resource axis), from above by \(\alpha _j\), and their top surface follows the primal schedule. (b) The shapes shown represent the union of \(B\)- and \(\varGamma \)-shapes. They are delimited from the left (right) by \(t=0\) (\(d_j(t)\)) (extended into the resource axis), and from top and bottom by the value of \(d_j(t)\) at the starting and finishing time of some piece of j. See the Full Version for the formal definition of these shapes.

The remainder of this section will initiate the proof of Lemma 5. We first give a geometric understanding of the involved quantities (\(P,A,B,\varGamma \)). We build a 3D coordinate system from a line schedule. The time axis is shared, and the ordinates form the remaining two axes. We then draw 3D shapes into this coordinate system that correspond to parts of the above quantities and therefore of the CLP/DCP objectives. These shapes are described in detail in the Full Version. Generally, these shapes are constructed such that the primal and dual schedules can be “seen” from above or front. In our case, the primal schedule will be seen from the top, and the dual schedule from the front. Figure 4 illustrates the shapes in our construction. For each part of the objective \(\varPsi \in \{ P,A,B,\varGamma \}\), we have a corresponding shape \(\varPsi ^{\textrm{all}}\), which is subdivided into pieces \(\varPsi ^{i,l}\), respectively.

We can show that certain pieces are pairwise non-overlapping (Lemma 7), that the \(A\)-pieces make up all other pieces (Lemma 8) and we can relate the volume of these pieces with one another and with the actual objective (Lemma 9).

Lemma 7

Let V and W, \(V\ne W\), be \(P\)-pieces, \(B\)-pieces or \(\varGamma \)-pieces (every combination allowed), or both be \(A\)-pieces. Then V and W do not overlap.

Lemma 8

\(A^{\textrm{all}}\) is composed of the other shapes, i.e., \(A^{\textrm{all}}=P^{\textrm{all}}\cup B^{\textrm{all}}\cup \varGamma ^{\textrm{all}}\).

Lemma 9

The pieces satisfy \(|P^{i,l} |=|B^{i,l} |+|\varGamma ^{i,l} |\) for all il and \(|\varPsi ^{\textrm{all}} |=\varPsi \) for all \(\varPsi \in \{ P,A,B,\varGamma \}\).

Due to space limitations, we give the actual construction of the pieces and the proofs of Lemma 7 to 9 in the Full Version. Now we can give the proof of Lemma 5.

Proof

of Lemma 5. Using Lemma 7 to 9, we get

$$\begin{aligned} A=|A^{\textrm{all}} | =|P^{\textrm{all}}\cup B^{\textrm{all}}\cup \varGamma ^{\textrm{all}} | =|P^{\textrm{all}} |+|B^{\textrm{all}} |+|\varGamma ^{\textrm{all}} | =P+B+\varGamma \end{aligned}$$
$$\begin{aligned} =|P^{\textrm{all}} |+|B^{\textrm{all}} |+|\varGamma ^{\textrm{all}} | =\sum \nolimits _{i,l} |P^{i,l} |+|B^{i,l} |+|\varGamma ^{i,l} | =\sum \nolimits _{i,l} 2|P^{i,l} | =2P. \end{aligned}$$

   \(\square \)