This paper studies the classical online scheduling problem of minimizing total flow time for $n$ jobs on $m$ identical machines. Prior work often cites the $\Omega(n)$ lower bound for non-preemptive algorithms to argue for the necessity of preemption or resource augmentation, which shows the trivial $O(n)$-competitive greedy algorithm is tight. However, this lower bound applies only to \emph{deterministic} algorithms in the \emph{single-machine} case, leaving several fundamental questions unanswered. Can randomness help in the non-preemptive setting, and what is the optimal online deterministic algorithm when $m \geq 2$? We resolve both questions. We present a polynomial-time randomized algorithm with competitive ratio $\Theta(\sqrt{n/m})$ and prove a matching randomized lower bound, settling the randomized non-preemptive setting for every $m$. This also improves the best-known offline approximation ratio from $O(\sqrt{n/m}\log(n/m))$ to $O(\sqrt{n/m})$. On the deterministic side, we present a non-preemptive algorithm with competitive ratio $O(n/m^{2}+\sqrt{n/m}\log m)$ and prove a nearly matching lower bound. Our framework also extends to the kill-and-restart model, where we reveal a sharp transition of deterministic algorithms: we design an asymptotically optimal algorithm with the competitive ratio $O(\sqrt{n/m})$ for $m\ge 2$, yet establish a strong $\Omega(n/\log n)$ lower bound for $m=1$. Moreover, we show that randomization provides no further advantage, as the lower bound coincides with that of the non-preemptive setting. While our main results assume prior knowledge of $n$, we also investigate the setting where $n$ is unknown. We show kill-and-restart is powerful enough to break the $O(n)$ barrier for $m \geq 2$ even without knowing $n$. Conversely, we prove randomization alone is insufficient, as no algorithm can achieve an $o(n)$ competitive ratio in this setting.
翻译:本文研究了经典在线调度问题,即在 $m$ 台相同机器上最小化 $n$ 个作业的总流时间。先前工作常引用非抢占式算法的 $\Omega(n)$ 下界来论证抢占或资源增强的必要性,这表明平凡的 $O(n)$-竞争贪婪算法是紧致的。然而,该下界仅适用于单机情况下的确定性算法,留下了若干基本问题未解:随机性在非抢占式设置中是否有帮助?当 $m \geq 2$ 时,最优的在线确定性算法是什么?我们解决了这两个问题。我们提出了一种多项式时间随机算法,其竞争比为 $\Theta(\sqrt{n/m})$,并证明了匹配的随机下界,从而为每个 $m$ 值确定了随机非抢占式设置的界。这还将已知的最佳离线近似比从 $O(\sqrt{n/m}\log(n/m))$ 改进为 $O(\sqrt{n/m})$。在确定性方面,我们提出了一种非抢占式算法,其竞争比为 $O(n/m^{2}+\sqrt{n/m}\log m)$,并证明了近乎匹配的下界。我们的框架还扩展到终止-重启模型,其中我们揭示了确定性算法的急剧转变:对于 $m\ge 2$,我们设计了一种渐近最优算法,其竞争比为 $O(\sqrt{n/m})$,但对于 $m=1$,我们建立了强 $\Omega(n/\log n)$ 下界。此外,我们表明随机性未提供额外优势,因为该下界与非抢占式设置的下界一致。虽然我们的主要结果假设已知 $n$,我们还研究了 $n$ 未知的设置。我们证明即使不知道 $n$,终止-重启模型也足以打破 $m \geq 2$ 时的 $O(n)$ 障碍。相反,我们证明仅靠随机性是不够的,因为在此设置中没有任何算法能实现 $o(n)$ 的竞争比。