This paper, "Joint Cache Partition and Job Assignment on Multi-Core Processors," provides the first rigorous theoretical treatment of a problem that system designers usually solve with "gut-feeling" heuristics: how to split a shared cache among processor cores while simultaneously deciding which jobs run on which core.
TL;DR
The authors initiate the theoretical study of jointly partitioning a shared cache and assigning jobs to cores to minimize the total execution time (makespan). They prove the problem is NP-hard but provide a constant-factor approximation algorithm (36-approximation) and even tighter results (2-approximation) for common practical scenarios.
What Problem Does This Paper Address?
In modern multi-core processors, cores often share a large Level 2 or Level 3 cache. When multiple jobs run concurrently, they compete for this shared resource. If one job "hogs" the cache, others slow down, leading to unpredictable performance and longer completion times.
System designers use cache partitioning to give each core a dedicated slice of the cache. However, the "best" partition depends on which jobs are assigned to which core, and the "best" assignment depends on how much cache each core has. Historically, researchers treated these as two separate problems or used heuristics. This paper tackles them as a single, joint optimization problem: given $n$ jobs and $c$ cores sharing a cache of size $K$, how do we allocate cache $p(i)$ and assign jobs $S(j)$ to minimize the makespan (the time when the last job finishes)?
Methods
The authors approach this through the lens of computational complexity and approximation theory. Their key techniques include:
- Significant Cache Levels: To handle the General Case, they show that you don't need to consider every possible way to slice the cache. By looking only at a polynomial-sized subset of "significant" partitions (based on powers of 2 and specific thresholds), they reduce the search space enough to create a constant-factor approximation.
- Ordered Unrelated Machines: They define a new scheduling model where machines are ordered by "strength" (more cache = more strength). They prove that the joint cache/job problem generalizes this model.
- Graph Theory (Threshold Graphs): For the "minimal cache demand" case—where jobs have a fixed load but need a minimum amount of cache to run—they use dominant perfect matchings in threshold graphs to optimally pair up "large" jobs.
- Dynamic Programming: They provide a DP approach for cases where job loads are step functions (e.g., a job runs at speed $A$ with little cache and speed $B$ with enough cache).
Datasets
As a theoretical computer science paper, no empirical datasets or real-world benchmarks were used. The results are mathematical proofs of algorithmic performance bounds (approximation ratios) and complexity classes.
Key Insights and Ideas
- The "Strength" Hierarchy: Cache allocation effectively transforms identical cores into "unrelated machines." Because more cache always makes a job run faster (or at least no slower), these machines follow a natural hierarchy of strength.
- Polynomial Representative Set: One of the most important "aha" moments is the proof that a very small, polynomial-sized set of cache partitions is "good enough" to approximate the optimal solution within a constant factor.
- The Cost of Static vs. Dynamic: The paper explores the gap between static partitioning (set it and forget it) and dynamic partitioning (changing cache slices on the fly). They show that dynamic partitioning can improve the makespan by a factor of up to $c$ (the number of cores), providing a theoretical justification for the added complexity of dynamic cache management.
Key Results
- General Case: A 36-approximation algorithm that runs in polynomial time. (An intermediate version provides an 18-approximation if you are allowed to use slightly more cache than the hardware actually has).
- Single Load Minimal Cache Demand: For the specific case where jobs have a fixed load and a minimum cache requirement, they achieved a 2-approximation.
- PTAS for Correlated Jobs: If a job's "hardness" affects both its processing time and its cache needs in a correlated way, they provide a Polynomial Time Approximation Scheme (PTAS), which can get arbitrarily close to the optimal solution.
- Complexity: Proved that the problem is NP-hard, even in the simplified "ordered unrelated machines" setting.
Limitations and Future Work
- Function Knowledge: The algorithms assume we already know the function $T_j(x)$ (how long job $j$ takes with $x$ cache). In reality, profiling these functions accurately is difficult.
- Approximation Constants: While a "36-approximation" is a major theoretical milestone, a factor of 36 is quite large for practical engineering. Future work could focus on tightening these bounds.
- Context Switching: The model for dynamic partitioning does not explicitly account for the overhead/latency of re-partitioning the cache or migrating jobs between cores.
Summary updated