Task Scheduling for Heterogeneous Multicore Systems

Zhuo Chen, Diana MarculescuarXiv 2017

Abstract

Modern computing systems increasingly rely on heterogeneous architectures, combining diverse processing units like CPUs and GPUs. Efficiently scheduling tasks across these varied cores remains a significant challenge due to task-processor affinity. This paper presents a mathematical framework based on queueing theory to optimize task scheduling. The authors introduce the CAB policy for dual-processor systems and the GrIn heuristic for multi-processor environments. Evaluations show that these methods significantly outperform traditional load-balancing methods, offering up to 9x performance gains on real-world platforms while remaining robust to varying task size distributions.

Introduction

Modern chips are increasingly "heterogeneous," mixing different types of cores such as high-power CPUs, energy-efficient CPUs, and parallel-heavy GPUs. While this diversity allows for massive efficiency gains, it creates a scheduling nightmare. Most tasks have an affinity: a sequential sorting algorithm might run 100x faster on a CPU, while a neural network layer thrives on a GPU.

Traditional schedulers often use simple "load balancing" (keeping all cores busy) or "best fit" (placing tasks where they run fastest). However, these approaches fail to account for the global system state or the "closed" nature of real-world applications where finishing one task immediately triggers the next. This research aims to find a policy that is mathematically provable, computationally efficient, and robust across different types of workloads.

Methodology

The researchers modeled the system as a closed batch network using queueing theory. This model captures the cyclic nature of task execution in many real-world applications.

Closed batch network model for heterogeneous processors.

Key components of their approach include:

  • Affinity and Power Matrices: They represent the processing rates and power consumption of every task type on every processor type as matrices, allowing for a formal optimization objective.
  • CAB Policy (Choose-between-Accelerate-the-fastest-and-Best-fit): For the common CPU+GPU case, they proved the optimal policy is usually one of two extremes: either "Best-Fit" (matching tasks to their preferred core) or "Accelerate-the-Fastest" (cramming tasks onto the fastest available core to clear the bottleneck).
  • GrIn (Greedy-Increase) Heuristic: Since finding the absolute optimum for many processor types is an "integer non-linear optimization problem," they designed GrIn. It’s a fast algorithm ($O(k \times l)$ complexity) that greedily moves tasks between cores to maximize total system throughput.

Key Insights and Ideas

One of the most powerful findings is that the optimal scheduling state ($S_{max}$) depends on the ratios in the affinity matrix, not the specific distribution of task sizes. This makes the policy highly practical for real-world "messy" data.

Classification of task-processor affinity and corresponding optimal states.

In "biased" systems, the optimal move is sometimes counter-intuitive: running only a single program on the fastest processor while piling everything else onto the slower ones. This "Accelerate-the-Fastest" (AF) approach minimizes memory transfer penalties and clears bottlenecks more effectively than spreading work thin. Furthermore, the GrIn algorithm achieves results within 1.6% of the theoretical optimum while running significantly faster than generic mathematical solvers like SLSQP.

Evaluation and Results

The paper validates its theories through both simulation and physical hardware. Simulations tested four different task-size distributions: Exponential, Bounded Pareto (heavy-tailed), Uniform, and Constant. Real-world implementation was performed on a system with an Intel i7 CPU and an NVIDIA GTX 760Ti GPU using OpenCL, utilizing Quicksort and Neural Network benchmarks.

  • Performance Gains: Compared to classic load-balancing, the proposed policies achieved 1.08x to 2.24x better performance in simulations. On real-world hardware, the improvement was even more dramatic, ranging from 2.37x to 9.07x better.
  • Efficiency and Scalability: The policies achieved similar gains in energy efficiency. GrIn was shown to be up to 2x faster than existing optimization methods, with its advantage growing as the number of processor types increased.

Conclusion

While the current model assumes a relatively stable number of programs, it provides a robust foundation for heterogeneous scheduling. Future work includes integrating these policies directly into operating system kernels to manage system-wide resources and explicitly modeling data movement costs between cores to further refine performance.

Summary updated

BibTeX
@misc{chen2017task,
  author = {Zhuo Chen and Diana Marculescu},
  title = {{Task Scheduling for Heterogeneous Multicore Systems}},
  year = {2017},
  eprint = {1712.03209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1712.03209},
}
Figure