Scheduling Self-Suspending Tasks: New and Old Results

Jian-Jia Chen, Tobias Hahn, Ruben Hoeksma, Nicole Megow, Georg von der BrüggenECRTS 2019

TL;DR

This paper bridges the gap between operations research (OR) and real-time systems scheduling for tasks that can pause their execution (self-suspend). It provides a unified analysis of speedup factors for various self-suspension models, showing that simpler algorithms like Longest Suspension First (LSF) are surprisingly effective and often optimal for many scenarios, even outperforming more complex state-of-the-art methods.

What Problem Does This Paper Address?

In real-time embedded systems, tasks often need to interact with the physical world or external resources. This can lead to "self-suspension," where a task pauses its execution to wait for something else to complete. While this can improve overall system efficiency by allowing other tasks to run, it complicates scheduling and can degrade performance if not handled carefully. Existing real-time scheduling analysis often assumes tasks run continuously or are preempted by higher-priority tasks, making them unsuitable for self-suspending tasks. This paper addresses the challenge of designing efficient scheduling algorithms and analyzing their performance for self-suspending tasks, particularly in frame-based periodic real-time systems. It aims to understand the fundamental complexity of this problem and provide practical, high-performing scheduling solutions.

Methods

The paper draws heavily from the operations research (OR) community's work on the "master-slave problem," which is analogous to self-suspending tasks. It then re-examines and unifies results for different self-suspension models (segmented, hybrid, and dynamic) within the real-time systems context. Key methods include:

  • Speedup Factor Analysis: This is the primary metric used to evaluate scheduling algorithms. It measures how much faster a processor needs to be for a given algorithm to achieve the same performance as an optimal clairvoyant scheduler. The paper distinguishes between "suspension-coherent speedup" (where both computation and suspension can be sped up) and general "speedup" (where only computation is sped up).
  • Algorithm Design and Analysis: The paper presents and analyzes algorithms like Sahni-Vairaktarakis (SV) and Longest Suspension First (LSF). LSF, in particular, is highlighted for its simplicity and effectiveness.
  • Theoretical Bounds: The authors derive both upper and lower bounds for speedup factors to understand the theoretical limits of scheduling performance for different models.
  • Connection to OR: By mapping real-time self-suspending tasks to the master-slave problem, the paper leverages established OR results to understand the inherent complexity of the scheduler design problem.

Datasets

Not discussed in the paper. The evaluation section describes synthetic task sets generated for experiments, but no specific named datasets are mentioned.

Key Insights and Ideas

  • OR-RT Synergy: The master-slave problem from OR provides a powerful lens to understand the complexity of self-suspending tasks in real-time systems, revealing that the core difficulty lies in the non-uniform suspension times, not necessarily the periodicity of real-time tasks.
  • LSF's Surprising Power: The simple "Longest Suspension First" (LSF) algorithm, which prioritizes jobs with longer suspension times, proves to be remarkably effective. It achieves optimal or near-optimal speedup factors (e.g., 3/2 for uniprocessor, 2 for multiprocessor suspension-coherent speedup) across various self-suspension models (segmented, hybrid).
  • Segmented vs. Hybrid Equivalence: For many speedup factor analyses, the segmented and hybrid self-suspension models yield similar results, suggesting that detailed knowledge of individual computation segment lengths might not be necessary for achieving good performance bounds.
  • Speedup Factor Distinction: The paper clearly differentiates between speeding up computation and suspension (suspension-coherent speedup) versus only speeding up computation. This distinction is crucial for understanding the practical implications of resource augmentation.
  • Tightness of Bounds: The derived speedup factors are shown to be tight, meaning no better general algorithm exists for the studied scenarios, highlighting the effectiveness of the proposed solutions.

Key Results

  • Uniprocessor:
    • LSF achieves a suspension-coherent speedup factor of 3/2 for segmented and hybrid self-suspension models.
  • A general speedup factor of 2 is shown for hybrid and dynamic models using work-conserving algorithms.
  • LSF is proven to be speedup-optimal for the hybrid model, with no deterministic algorithm achieving a better speedup factor than 2 - ε.
  • Multiprocessor:
    • A suspension-coherent speedup factor of 2 is achieved for segmented and hybrid models using the Sahni-Vairaktarakis algorithm.
  • A speedup factor of 3 - 1/m is achieved for segmented and hybrid models when only processor speed can be increased.
  • Complexity: The scheduler design problem for self-suspending tasks is NP-hard in the strong sense, even for simplified scenarios, confirming the need for approximation algorithms and speedup factor analysis.
  • Evaluation: Experimental results show that LSF and SV significantly outperform the state-of-the-art SEIFDA algorithm, especially with longer suspension intervals, demonstrating their practical advantage.

Limitations and Future Work

  • Dynamic Model: The paper acknowledges that the dynamic self-suspension model, being the most general, presents significant challenges. They were unable to provide upper or lower bounds on the speedup factor for this model, even when comparing against clairvoyant schedules.
  • Preemptive to Non-Preemptive Conversion: While the paper shows that preemptive schedules can be transformed into non-preemptive ones without increasing the makespan for uniprocessors, it notes that generalizing this conversion for multiprocessors and understanding its implications remains an open question.
  • Harmonic Task Systems: The authors suggest extending their results to harmonic or nearly-harmonic real-time task systems, as these are common in industrial applications and are known to be more tractable for scheduling.
  • Exploiting Detailed Information: While LSF is effective, it doesn't fully exploit the detailed knowledge of Cj,1 and Cj,2 in the segmented model. It remains an open question whether algorithms can be designed to leverage this information for improved speedup factors.

Summary updated

BibTeX
@inproceedings{chen2019scheduling,
  author = {Jian-Jia Chen and Tobias Hahn and Ruben Hoeksma and Nicole Megow and Georg von der Brüggen},
  title = {{Scheduling Self-Suspending Tasks: New and Old Results}},
  booktitle = {ECRTS},
  year = {2019},
  doi = {10.4230/lipics.ecrts.2019.16},
}
Figure