arXiv:2609.07402cs.DSSep 2026

Manuscript Offprint

arXiv:2609.07402

Better Late Than Never: Online Flow Time Scheduling with Online Estimates

Anupam Gupta, Haim Kaplan, Alexander Lindermayr, Jens Schlöter, Sorrachai Yingchareonthawornchai

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In the classical online flow-time scheduling problem on a single machine, jobs arrive over time and must be processed in some order to minimize the total time they spend in the system: for over fifty years, we have known that SRPT is an optimal online algorithm. But this algorithm requires exactness in two different ways: (a) job sizes must be known exactly, and (b) they must be revealed as soon as the job arrives. Recent work relaxed each of these assumptions separately: there are algorithms based on knowing approximate sizes (given when the job arrives), or based on knowing (exact) sizes at some point before the remaining size gets too small. (The latter setting models the phenomenon that the algorithm may “learn” job sizes by processing them—but asking for learning algorithms to output exact sizes is unreasonable.) Nonetheless, prior to this work, there was no known approach to relax both of these assumptions simultaneously.

In this work, we consider a model that demands much less: jobs arrive over time. When a job arrives, we are notified. As we process it, at some point in time between when we complete an ε\varepsilon-fraction and a (1−ε)(1-\varepsilon)-fraction of its unknown processing requirement, we are informed that the job is “somewhere in the middle”. Finally, when the job has received its desired amount of processing, we are informed of its completion. No other information is shared about the job. We give an O(1/ε2)O(1/\varepsilon^2)-competitive algorithm for this model.

Slightly more generally, we assume that an algorithm receives a μ\mu-approximate estimate of each job's processing time at some time before we complete a (1−ε)(1-\varepsilon)-fraction of its processing. Our algorithm is O(μ/ε)O(\mu/\varepsilon)-competitive, and we show that this is asymptotically optimal. (The previous “three bit” model can be solved using this algorithm with μ=1/ε\mu = 1/\varepsilon.) Our algorithm is a surprisingly natural variant of the multilevel feedback algorithm (MLF), which is widely used in practice, and is parameter-oblivious: it does not need to know μ\mu or ε\varepsilon upfront. The core analytical contribution is to generalize and robustify the dual-fitting framework for this problem to handle jobs for which we have not yet received estimates.

*New York University, anupam.g@nyu.edu. †Tel Aviv University, haimk@tau.ac.il ‡Institut für Mathematik, Technische Universität Berlin, alexander.lindermayr@tu-berlin.de §Department of Mathematics and Computer Science, University of Southern Denmark, schloter@imada.sdu.dk ¶Institute for Theoretical Studies, ETH Zürich, sorrachai.yingchareonthawornchai@eth-its.ethz.ch

1 Introduction

We consider the problem of minimizing the total flow time of jobs arriving online on a single machine. This is a classical problem for which the textbook algorithm Shortest Remaining Processing Time (SRPT) is optimal [Sch68] (i.e., 1-competitive). As the name suggests, at each time the algorithm processes a job which has the least amount of processing remaining to be done. However, this algorithm relies on two assumptions:

(A1) the precise job size pjp_j for each job jj is known, and

(A2) the job size is revealed as soon as the job arrives.

While this is reasonable for some settings, other settings may violate one or both of these assumptions. The nonclairvoyant model captures an extreme version of this uncertainty: it assumes that size is revealed only when the job completes. While SRPT is no longer applicable, other natural algorithms, like Round-Robin, Shortest Elapsed Time First (SETF), or its close cousin, Multilevel Feedback (MLF) are all applicable. However, proving constant-competitiveness in this model is impossible: Ω(n1/3)\Omega(n^{1/3})-competitive deterministic algorithms and Ω(log⁡n)\Omega(\log n)-competitive randomized algorithms being the best possible [MPT94], where nn is the total number of jobs. Given the bleakness of these competitive ratios, we ask: is there a little more information we can use to get better algorithms? In the past decades, numerous works [ALT21; ALT22; APT22; Bec+04; Ben+25; Gup+25; Gup+26; Lin+26; YT17] have sought to address precisely this question. However, each relaxes either (A1) or (A2), but none address both simultaneously.

We propose the following simple ε\varepsilon-signaling model:

Jobs arrive over time. When a job arrives, we know nothing about it (yet). As we process it, we receive a signal. The timing of the signal is allowed to be at any time (adversarially) between the times when we complete an ε\varepsilon-fraction and a (1−ε)(1-\varepsilon)-fraction of its unknown processing requirement. Of course, we can measure the elapsed time ourselves, and we get to know when we finish processing the job. Those are the only pieces of information we get about the job—the information that a job has arrived, the information that we are currently “somewhere in the middle” of its processing, and finally, the information that the job has just completed.

This model requires little clairvoyance from the scheduling algorithm. Given a weak job profiler (or job estimator) that only tells us whether we have processed between ε\varepsilon and 1−ε1-\varepsilon of the job's size at some point, can we give good algorithms in this setting, especially one that does not need to know ε\varepsilon either? To our surprise, we show:

Theorem 1.1 (Algorithm for Signaling). There exists an algorithm for total flow time minimization in the ε\varepsilon-signaling model that, for any ε∈(0,1/2]\varepsilon \in (0, 1/2], ensures a total flow time within a factor of O(1/ε2)O(1/\varepsilon^2) of the optimal value. The algorithm does not need any knowledge of ε\varepsilon.

Previously, an O(1/ε)O(1/\varepsilon)-competitive algorithm was shown in the setting where a job's exact size is revealed when exactly a (1−ε)(1-\varepsilon)-fraction of its processing time is done [Gup+25]. Our result successfully removes the impractical assumption that a job profiler has to be precise.

This model and theorem will be a consequence of our actual model of interest: in the (ε,μ1,μ2)(\varepsilon, \mu_1, \mu_2)-online estimate model, for each job jj, the adversary reveals a size estimate p^j∈[pj/μ2,μ1⋅pj]\hat{p}_j \in [p_j/\mu_2, \mu_1 \cdot p_j] to the algorithm at some point in time while at least an ε\varepsilon-fraction of the job jj still remains to be processed. Our main result is as follows:

Theorem 1.2 (Algorithm for Online Estimates). There is an algorithm for total flow time minimization in the online estimate model that, for every μ1,μ2≥1\mu_1, \mu_2 \geq 1 and ε∈(0,1]\varepsilon \in (0, 1], ensures a total flow time within a factor of O(μ1μ2ε)O(\frac{\mu_1 \mu_2}{\varepsilon}) of the optimal value. It does not require μ1,μ2\mu_1, \mu_2, or ε\varepsilon as inputs.

(For completeness, in Section A we prove that Theorem 1.2 implies Theorem 1.1.) The algorithm of Theorem 1.2, which we call Balanced MLF, is “hyperparameter-oblivious”: it does not need to know any of μ1,μ2\mu_1, \mu_2, or ε\varepsilon. It only performs O(∑j(1+log⁡2pj))O(\sum_j (1 + \log_2 p_j)) preemptions overall (the proof is in Section B). Moreover, it is conceptually simple, close to the widely-used MLF algorithm, and easy to describe and implement, as we will see next.

Balanced MLF (informal). There are multiple queues (classes) Q0,Q1,…Q_0, Q_1, \dots of jobs. A job can be fresh or ongoing. When a job arrives, it is fresh and placed in Q0Q_0. Whenever it has received 2k2^k units of processing, and its estimate has not yet arrived, it is promoted to queue Qk+1Q_{k+1}. When the estimate p^j\hat{p}_j of job jj arrives while it is in queue QkQ_k, it is promoted to queue Qk′Q_{k'} with k′=⌊log⁡2p^j⌋k' = \lfloor \log_2 \hat{p}_j \rfloor if k′>kk' > k; otherwise it stays ongoing in its current queue.¹ Whenever a job is promoted, it becomes fresh again. At each time step, if at least a 1/41/4 fraction of active jobs is fresh, make the first job of the smallest-index nonempty queue ongoing if it is currently fresh; process the ongoing job with the smallest-index queue for one unit of time. (We defer a discussion about intuition of the algorithm to Section 1.1 and a formal description to Section 2.)

Besides our algorithmic results, we view the definition of the online estimate model as a central contribution of this work. Indeed, it captures and unifies several models for robustness and noisy/partial information that are popular in the literature:

(a) The robust flow time or semi-clairvoyant models considered by [ALT21; ALT22; APT22; Bec+04; Gup+26], which are special cases of our model where ε=1\varepsilon = 1, and the algorithm receives a noisy estimate as soon as the job arrives. Our algorithm (Balanced MLF) is identical to their algorithm (Balance) in [Gup+26] when we restrict ε=1\varepsilon = 1.

(b) The ε\varepsilon-clairvoyance model of [Ben+25; Gup+25; YT17], which is another special case of our model where μ1=μ2=1\mu_1 = \mu_2 = 1, and the algorithm receives an exact size-estimate before the remaining fraction of its processing drops below ε\varepsilon. Balanced MLF is also asymptotically optimal in this model.

(c) Moreover, algorithms in the ε\varepsilon-clairvoyance model imply nonclairvoyant algorithms in the (1+ε)(1+\varepsilon)-speed-augmentation model (see [Gup+25] for a reduction) which gives a connection for yet another well-studied model [Edm00; IMP11; KP00].

The first two models relax one of the assumptions (A1) and (A2) we stated at the beginning of the paper. In this work, we manage to relax both at once. The last model is nonclairvoyant, but gives a bi-criteria guarantee, comparing apples to oranges. Given that our model subsumes these previous ones, our algorithm (Balanced MLF) is asymptotically optimal for these models simultaneously.

Finally, our matching lower bound shows that the competitiveness is asymptotically optimal:

Theorem 1.3 (Lower Bound). For every μ1,μ2≥1\mu_1, \mu_2 \geq 1 and ε∈(0,1]\varepsilon \in (0,1], every (randomized) algorithm has a competitive ratio in Ω(μ1μ2ε)\Omega(\frac{\mu_1 \mu_2}{\varepsilon}) for minimizing the total flow time on a single machine in the (ε,μ1,μ2)(\varepsilon, \mu_1, \mu_2)-online estimate model, even if μ1,μ2\mu_1, \mu_2, and ε\varepsilon are given up-front to the algorithm.

References (27)