Co-Optimizing Cache Partitioning and Multi-Core Task Scheduling: Exploit Cache Sensitivity or Not?

Binqi Sun, Debayan Roy, Tomasz Kloda, Andrea Bastoni, Rodolfo Pellizzoni, Marco Caccamo

Co-Optimizing Cache Partitioning and Multi-Core Task Scheduling: Exploit Cache Sensitivity or Not?

Abstract

In multi-core real-time systems, shared resources like the Last-Level Cache (LLC) introduce unpredictability due to inter-core interference. This paper proposes a nested three-layer optimization framework that simultaneously addresses task allocation and cache partitioning. By co-optimizing these factors, the framework achieves a 15.2% average improvement in system schedulability. Crucially, the research reveals that for non-preemptive tasks, clustering by timing compatibility often yields better results than clustering by cache sensitivity.

Introduction

Modern multi-core processors typically feature a shared Last-Level Cache. In real-time environments, this sharing can lead to "noisy neighbor" effects, where one task evicts another's data, causing unpredictable execution delays. While cache partitioning—allocating dedicated cache slices to specific cores—mitigates this, it introduces a complex trade-off: insufficient cache slows tasks down, while excessive cache wastes resources. Existing solutions often treat task scheduling and cache partitioning as isolated problems. This work tackles the integrated challenge of assigning tasks to cores while determining optimal cache sizes to ensure all deadlines are met.

Methodology

The authors propose a nested three-layer hybrid optimization framework designed for Non-Preemptive Fixed-Priority (NP-FP) scheduling:

  1. Outer Layer (Cache Partitioning): Employs a Breadth-First Search (BFS) to explore cache configurations. A proactive pruning heuristic is used to discard configurations unlikely to lead to a feasible solution, maintaining computational tractability.
  2. Middle Layer (Task Allocation): Assigns tasks to cores based on one of two strategies: COMP (Compatibility), which clusters tasks with similar periods, or CASE (Cache Sensitivity), which clusters tasks based on their potential benefit from additional cache.
  3. Inner Layer (Schedulability Analysis): Uses exact recurrence relations to verify if the proposed allocation meets all timing constraints. This layer is modular and can be adapted for other policies like Earliest Deadline First (EDF).

Experimental Evaluation

The framework was evaluated using real-world benchmarks from computer vision (OpenCV, VLFeat) and motion planning (OMPL), profiled via Cachegrind to determine how execution times scale with cache availability.

Execution time slowdown relative to a 2048 KB cache for various real-world benchmarks as available cache size decreases.

As shown in Figure 4, different applications exhibit varying degrees of cache sensitivity. For instance, the kmeans benchmark shows a sharp increase in execution time when the cache drops below 1024 KB, whereas geometric car planning remains relatively stable. This variability is what the framework seeks to exploit.

Discussion: Exploit Cache Sensitivity or Not?

A significant finding of this research is that timing compatibility (COMP) generally outperforms cache sensitivity (CASE) for non-preemptive tasks. In such systems, long-running low-priority tasks can block high-priority ones. Clustering tasks with similar periods minimizes this blocking interference more effectively than optimizing solely for cache usage.

Sample task set parameters showing the relationship between task periods and execution times across different cache partition counts.

Table 6 illustrates the data structure used to model these sensitivities, showing how execution time decreases as the number of cache partitions increases for different tasks. The framework leverages this data to find the most efficient resource distribution, saving an average of 8% of total cache compared to baseline methods.

Results

The proposed framework demonstrated significant performance gains across multiple metrics:

  • Schedulability: Improved by 15.2% on average over state-of-the-art baselines for NP-FP task sets.
  • High-Sensitivity Scenarios: In cases where tasks were highly sensitive to cache size, improvements reached up to 233.6%.
  • Generalization: Despite being designed for NP-FP, the framework outperformed specialized algorithms for P-EDF and NP-EDF by 8.7% and 19.2%, respectively.

Conclusion

This work highlights the benefits of integrated resource management in multi-core real-time systems. While the current model focuses on static allocation and cache partitioning, future research will explore dynamic re-partitioning and the integration of memory bandwidth regulation to further enhance system predictability and performance.

Summary updated

BibTeX
@inproceedings{sun2023co,
  author = {Binqi Sun and Debayan Roy and Tomasz Kloda and Andrea Bastoni and Rodolfo Pellizzoni and Marco Caccamo},
  title = {{Co-Optimizing Cache Partitioning and Multi-Core Task Scheduling: Exploit Cache Sensitivity or Not?}},
  booktitle = {RTSS},
  year = {2023},
  doi = {10.1109/rtss59052.2023.00028},
}
Figure