Distortion-Oblivious Algorithms for Minimizing Flow Time

Yossi Azar, Stefano Leonardi, Noam Touitou

Introduction

In online scheduling, a single machine must process jobs arriving over time to minimize the total flow time—the cumulative time jobs spend in the system. While the Shortest Remaining Processing Time (SRPT) algorithm is optimal when job durations are known exactly, real-world scenarios often rely on imperfect estimates. The challenge lies in managing distortion (\mu), the factor by which these estimates may vary from actual processing times.

The Robustness Challenge

Previous "robust" scheduling algorithms required a pre-defined distortion cap ($\hat{\mu}$) to function. This creates a "Catch-22": if processing times are unknown, the degree of error in their estimates is likely also unknown. If the actual distortion exceeds the predicted cap, these algorithms can suffer from unbounded competitive ratios. This paper introduces the first distortion-oblivious algorithms, which achieve near-optimal performance for any $\mu$ without prior knowledge of the error margin.

The ZigZag Algorithm

The core contribution of this work is the ZigZag algorithm. It categorizes partially processed jobs into three states: ZIG, ZAG, and ZIGZAG. The algorithm balances two competing strategies: SEPT (Shortest Estimated Processing Time), which follows estimates, and a Special Rule (SR) that limits the number of new jobs started to prevent getting stuck with many nearly-finished but underestimated jobs.

Step-by-step execution of the ZigZag algorithm, illustrating how jobs are appointed to ZIG, ZAG, or ZIGZAG states as they are released.

As shown in the figure above, ZigZag uses a sophisticated "appointment" system. When a new job $q_1$ is released, it is appointed as a ZIG. Subsequent arrivals like $q_2$ may be appointed as ZAG by $q_1$. The state of a job can evolve (e.g., from ZAG to ZIGZAG) based on the arrival of further jobs ($q_4$), which then triggers new appointments ($q_3$ as ZIG). This mechanism ensures that the number of partially finished jobs remains proportional to the total number of jobs, preventing the algorithm from being misled by distorted estimates.

Key Insights and Theoretical Results

A fundamental insight of this research is the "failure of learning." In scheduling, an algorithm cannot easily learn the distortion because if it overestimates a job's length, it may never process it, thus never discovering the error. ZigZag bypasses this by using a structural strategy that is inherently resistant to distortion rather than trying to estimate it.

The structural strategy of ZigZag, showing the chain of appointments across different job classes.

The ZigZag algorithm achieves an $O(\mu \log \mu)$ competitive ratio, a quadratic improvement over the $O(\mu^2)$ performance of previous state-of-the-art robust methods. Given that the authors also established a randomized lower bound of $\Omega(\mu)$, ZigZag is optimal up to a logarithmic factor.

Conclusion

By introducing distortion-oblivious scheduling, this work provides a practical path for systems that must handle unpredictable data quality. The jump from quadratic to nearly-linear dependence on distortion makes these algorithms significantly more viable for real-world applications. Future research may extend these principles to multi-machine environments and weighted flow time objectives.

Summary updated

BibTeX
@inproceedings{azar2022distortion,
  author = {Yossi Azar and Stefano Leonardi and Noam Touitou},
  title = {{Distortion-Oblivious Algorithms for Minimizing Flow Time}},
  booktitle = {SODA},
  year = {2022},
  doi = {10.1137/1.9781611977073.13},
}
Figure