TL;DR
This paper introduces a novel fixed-priority memory-centric scheduler for commercial off-the-shelf (COTS) multiprocessor systems that lack specialized hardware for memory management. By implementing a global "memory preemption" scheme within the Jailhouse hypervisor and Erika RTOS, the authors achieve improved real-time schedulability, demonstrating a 20% gain over existing approaches.
What Problem Does This Paper Address?
Modern commercial-off-the-shelf (COTS) multiprocessor systems offer significant computational power but suffer from unpredictable performance due to shared memory interference. In real-time systems, this interference can drastically increase task execution times, making it difficult to guarantee temporal predictability. Existing solutions for memory-centric scheduling often rely on specific hardware features like scratchpads or strict cache partitioning, which are not universally available on COTS platforms. This paper tackles the challenge of achieving deterministic memory management and improving real-time schedulability on these common, yet less specialized, COTS multiprocessors without requiring such hardware support.
Methods
The core of this work is a fixed-priority memory-centric scheduler designed for COTS multiprocessors. The approach is built upon the Predictable Execution Model (PREM), which divides tasks into distinct memory and computation phases. The key innovation is a global "memory preemption" scheme. This allows a higher-priority processor to preempt the memory phase of a lower-priority processor, even if they are on different cores. This is achieved by implementing the scheduler within the Jailhouse hypervisor and integrating it with the Erika real-time kernel.
To manage memory access and prevent interference, the system utilizes cache partitioning through cache coloring, a software-based technique managed by the hypervisor. This ensures that each processor's cache partition is isolated. The scheduler itself operates on a token-passing mechanism at the hypervisor level, where a token grants exclusive access to the main memory.
The paper also introduces a fixed-priority partitioned multiprocessor schedulability analysis that incorporates the actual memory arbitration overheads. This analysis is backed by a heuristic for task partitioning designed to optimize schedulability by considering task periods and processor priorities.
Datasets
Not discussed in the paper. The evaluation uses microbenchmarks and real-world workloads, including benchmarks from TACLeBench.
Key Insights and Ideas
- Hardware-agnostic memory-centric scheduling is feasible: The paper demonstrates that predictable memory management and improved schedulability can be achieved on COTS platforms even without specialized hardware like scratchpads or explicit cache locking.
- Global memory preemption is powerful: Allowing higher-priority processors to preempt lower-priority ones during their memory phases is crucial for reducing blocking times and enhancing overall schedulability.
- Hypervisor-level arbitration is effective: Implementing the memory scheduler within a hypervisor like Jailhouse provides a centralized and efficient mechanism for managing shared memory access across multiple cores.
- Cache coloring is a viable software-based partitioning solution: This technique effectively isolates cache partitions without requiring hardware support, making it suitable for a wider range of COTS platforms.
- Task partitioning heuristics matter: The proposed heuristic, which prioritizes tasks with shorter periods on higher-priority processors, significantly improves schedulability by minimizing interference and blocking.
Key Results
- The proposed memory-centric scheduler achieved a 20% gain in schedulability compared to contention-based and static fair-share approaches.
- The measured overheads for hypercalls, IPIs, and arbitration were found to be small, with the total overhead for acquiring exclusive memory access being less than 6.028 μs on the tested platform. This overhead represented less than 6.5% of the worst-case execution times of memory phases in real-world benchmarks.
- Experiments showed that the fixed-priority policy, with its memory preemption, bounded prefetching times and prevented unpredictable interference, unlike legacy approaches.
- The schedulability analysis, when incorporating measured overheads, showed that the fixed-priority policy improves schedulability and reduces response times on high-priority processors, at the cost of slightly increased preemption for low-priority tasks.
Limitations and Future Work
Limitations:
- I/O Interference Ignored: The current work does not account for interference effects from I/O devices that share the memory hierarchy. This might be less of an issue on platforms with dedicated I/O buses but needs consideration otherwise.
- Minimal Cache Pollution: While cache partitioning is employed, a minimal degree of cache pollution can still occur as the OS and its tasks share the same cache partition. The hypervisor's memory region is also not colored.
- Task Data Size Assumption: The implementation assumes that task data will not exceed the size of the cache partition.
- Multi-segment Tasks: While the implementation can support multi-segment tasks, the schedulability analysis needs to be revisited for such cases.
Future Work:
- Investigating limited preemption for tasks assigned to the same processor.
- Extending the model to support three-phase PREM tasks.
- Incorporating I/O interference into the analysis or exploring alternative I/O isolation mechanisms.
Summary updated