TL;DR
This paper introduces a novel operating system (OS) scheduling strategy for embedded Multi-Processor Systems-on-a-Chip (MPSoCs) that prioritizes on-chip cache utilization. By intelligently mapping processes to processor cores based on their data sharing patterns, the scheduler significantly reduces task completion times and improves overall system performance.
What Problem Does This Paper Address?
Modern embedded applications are increasingly complex, demanding more processing power than single-core systems can provide. This has led to the widespread adoption of MPSoCs, which integrate multiple processor cores onto a single chip. A critical challenge in these systems is the efficient management of on-chip memory, particularly caches. If not utilized effectively, frequent off-chip memory accesses can severely degrade performance and increase power consumption. Prior work often focused on hardware or compiler-level optimizations for cache behavior. This paper addresses the gap by proposing an OS-level scheduling approach that leverages global access pattern information across applications to optimize cache usage. The core problem is how to schedule multiple processes from potentially different applications on an MPSoC to maximize data reuse within the on-chip caches, thereby minimizing costly off-chip accesses.
Methods
The paper proposes a two-pronged, cache-conscious OS process scheduling strategy:
- Data Sharing Analysis: The scheduler first captures inter-process data sharing using Presburger arithmetic. This allows it to represent the sets of data elements accessed by each process and identify which processes share common data.
- Two-Tiered Scheduling:
- Process Isolation: Processes that do not share any data are preferentially scheduled on different processor cores to minimize potential conflicts.
- Data Reuse Maximization: Processes that do share data, especially those with dependencies that prevent them from running concurrently, are mapped to the same processor core. This encourages them to share cache contents, leading to higher data reuse.
Additionally, the paper introduces a data re-mapping strategy to further reduce cache conflicts. This strategy aims to optimize the layout of arrays in memory to prevent elements accessed by concurrently running or successively scheduled processes from mapping to the same cache lines. This is achieved by interleaving chunks of arrays and using different offset values (b=0 or C/2) for array re-layout.
Datasets
The paper evaluates its proposed scheduling strategy using six array-intensive embedded applications from the image/video processing domain. These applications vary in the number of processes they comprise (between 9 and 37). The paper does not introduce new benchmarks but uses existing applications to demonstrate the effectiveness of its scheduling approach.
Key Insights and Ideas
- OS-Level Cache Optimization is Crucial: The paper strongly emphasizes that the operating system, by having a global view of process interactions, plays a vital role in optimizing cache performance, complementing hardware and compiler efforts.
- Data Sharing is a Double-Edged Sword: While data sharing can lead to excellent reuse, it also creates potential for cache conflicts. The scheduler must strategically manage this to maximize benefits.
- Strategic Process Placement Matters: Placing processes that don't share data apart and those that do share data together on the same core are complementary strategies for cache optimization.
- Data Re-mapping Enhances Scheduling: The data re-mapping technique is shown to be particularly effective when processes from different applications are scheduled concurrently, as it directly addresses cache conflicts that can arise from disparate data access patterns.
Key Results
The experimental evaluation, conducted using the Simics simulation tool, demonstrates significant improvements:
- Reduced Task Completion Times: The locality-aware scheduling strategies (LS and LSM) consistently outperformed random (RS) and round-robin (RRS) scheduling in both isolated and concurrent execution scenarios.
- LS vs. LSM: In isolated execution (processes from the same application), the difference between LS (scheduling only) and LSM (scheduling + data mapping) was minimal, suggesting data sharing within an application is the dominant factor. However, when applications ran concurrently, LSM showed a much larger performance advantage over LS. This is attributed to LSM's ability to mitigate cache conflicts arising from processes of different applications sharing cores.
- Significant Gains: The paper reports "significant improvements in task completion times" and "much better results" compared to traditional scheduling methods. While specific percentage gains are not explicitly quantified in the summary text, the figures (Figure 6 and 7) visually show substantial reductions in execution times for the proposed methods.
Limitations and Future Work
- Limitations:
- The paper acknowledges that the greedy scheduling algorithm, while effective, might not always produce the absolute optimal results in all cases due to the order in which cores are processed.
- The data re-mapping algorithm might not always find the best results if arrays have already been re-layouted in a previous step.
- Future Work:
- Compare the proposed OS scheduling strategy with other OS scheduling strategies using the same benchmarks.
- Implement the proposed strategy within an embedded Linux environment for real-world testing.
- Explore the interactions between OS scheduling and compiler-driven techniques to identify potential communication mechanisms between them.
Summary updated