TL;DR
This paper introduces CaM, a novel holistic resource allocation strategy for multicore real-time systems. CaM simultaneously considers CPU, cache, and memory bandwidth demands to optimize task mapping and resource partitioning, achieving near-optimal schedulability while significantly outperforming existing methods.
What Problem Does This Paper Address?
Modern real-time systems are increasingly using multicore processors to consolidate functionalities, leading to complex resource contention. Cores share critical resources like the last-level cache (LLC) and memory bandwidth, causing interferences that can unpredictably degrade task execution times (WCET). Traditional resource allocation methods often focus solely on CPU or treat shared resources in isolation, failing to capture the intricate interplay between them. This paper tackles the challenge of efficiently allocating these shared resources (cache and memory bandwidth) alongside CPU to ensure predictable timing guarantees (schedulability) in multicore real-time systems.
Methods
The core of this paper is the CaM (Cache and Memory bandwidth) holistic resource allocation strategy. CaM integrates task partitioning (mapping tasks to cores) and resource partitioning (allocating cache and memory bandwidth to cores) into a single, unified approach.
Key methodological components include:
- Hardware Integration: The authors leverage Intel's Cache Allocation Technology (CAT) for cache partitioning and MemGuard for memory bandwidth regulation, integrated into the LITMUSRT real-time operating system. This provides a practical platform for experimentation.
- Empirical Evaluation of Interdependence: A significant part of the work involves experimentally investigating how a task's WCET is affected by the amount of cache and memory bandwidth it receives. They discovered a crucial interdependence: a task's sensitivity to cache allocation increases when memory bandwidth is limited, and vice-versa.
- Heuristic Algorithm: CaM employs a heuristic algorithm that combines several strategies:
- Clustering by Sensitivity: Tasks are grouped into clusters based on their "resource sensitivity" – how much their WCET changes with different cache/bandwidth allocations.
- Bin Packing with Load Balancing: Tasks are then packed into cores, aiming to balance the total utilization across cores.
- Resource Utility Maximization: Cache and bandwidth resources are allocated to cores to maximize a defined "resource utility," which prioritizes cores that benefit most from additional resources to become schedulable.
- Iterative Balancing: The algorithm iteratively balances task migration and resource re-allocation to achieve schedulability.
Datasets
The paper uses real-world benchmarks for evaluation:
- PARSEC Benchmark Suite: Used to represent typical workloads with varying characteristics.
- Cache-bench synthetic benchmark: A cache-intensive program designed to stress cache performance.
- Interference workload: Specifically a "cache-bomb" program used to induce interference.
The WCETs for these benchmarks were obtained through profiling on their experimental platform under various cache and bandwidth configurations.
Key Insights and Ideas
- Interdependence is Crucial: The most significant insight is the strong interdependence between cache and memory bandwidth. A task's WCET is not solely determined by one resource but by the combination of both. This necessitates a holistic approach rather than isolated optimization.
- Resource Sensitivity Varies: Different tasks exhibit different sensitivities to cache and memory bandwidth. Some tasks are sensitive to both, others to only one, and some to neither. This heterogeneity is key to effective resource utilization.
- Holistic Allocation Outperforms Isolation: Isolating only cache or only memory bandwidth is insufficient to prevent interferences. Combining both provides much stronger protection.
- Clustering Improves Efficiency: Grouping tasks with similar resource sensitivities allows for more efficient allocation of shared resources, as cores can be tailored to the needs of the tasks they host.
- Near-Optimal Performance with Efficiency: The heuristic approach achieves performance very close to an optimal (but computationally expensive) solution, while being significantly more efficient.
Key Results
- Near-Optimal Schedulability: The CaM heuristic algorithm achieved schedulability for 1146 out of 1550 tasksets, very close to the optimal solution (1247 tasksets).
- Significant Performance Gains: CaM outperformed existing baseline methods and the MC² algorithm by a substantial margin, scheduling approximately 2x more tasksets than MC² and 2.08x more than the baseline.
- Efficiency: The heuristic algorithm achieved a maximum average running time of 0.90 minutes, while the optimal solution's running time increased exponentially, reaching up to 35.75 minutes for some tasksets.
- Impact of Phases: Both the clustering and resource allocation phases were found to be critical for CaM's performance, with the resource allocation phase showing a particularly strong positive impact.
- Real-World Validation: Experiments with real-time jobs demonstrated that CaM effectively managed shared resources, reduced interference, and improved timing performance, with all jobs meeting their deadlines under CaM.
Limitations and Future Work
- WCET Assumption: The paper assumes that WCETs are inflated to account for other overheads (like interrupts). While they note this can be extended, it's a simplification.
- Implicit Deadlines: The theoretical model assumes implicit deadlines (deadline equals period). The authors suggest extending this to constrained deadlines.
- Other Interferences: The current work focuses on cache and memory bandwidth interferences. The authors acknowledge that other interferences (e.g., from TLBs, interrupts) are not explicitly handled but could be incorporated into WCETs.
- Hardware Specificity: While using COTS hardware (Intel CAT), the specific number of cache partitions and COS registers might vary across platforms.
- Future Work: The authors suggest extending the analysis to other types of interferences and exploring more complex task models. They also mention the possibility of incorporating the impact of memory bank contention.
Summary updated