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 $Ω(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 $Θ(\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 $Ω(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$个作业的总流时间。先前工作常引用非抢占式算法的$Ω(n)$下界来论证抢占或资源增强的必要性,这表明平凡的$O(n)$竞争贪婪算法是紧致的。然而,该下界仅适用于\emph{单机}情况下的\emph{确定性}算法,导致若干基本问题悬而未决:随机性在非抢占式设定中是否有帮助?当$m \geq 2$时最优的在线确定性算法是什么?我们解决了这两个问题。我们提出了一个具有$Θ(\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$建立了强$Ω(n/\log n)$下界。此外,我们证明随机性未提供额外优势,因为其下界与非抢占式设定一致。虽然主要结果假设已知$n$,我们还探究了$n$未知的设定。研究表明,即使不知道$n$,终止重启机制也足以在$m \geq 2$时突破$O(n)$障碍。相反,我们证明仅靠随机性是不够的,因为在此设定下任何算法都无法实现$o(n)$竞争比。