Abstract
In chip multiprocessor scheduling, cache memory awareness is critical. However, most existing cache-aware multiprocessor scheduling methods are static and open-loop and thus do not work well in dynamic environments. To address this challenging problem, a control-theoretic approach is presented in this paper for adaptive cache-fair multiprocessor scheduling. The adaptive cache-fair multiprocessor scheduling uses process models to estimate the shared cache size requirements and the instruction count variations of the threads running on multiprocessor cores. Then, it feeds the estimated information back to an adaptive controller. Designed from the process models, the controller decides processor cycle re-allocation through model computation to maintain the instruction counts of the multiple threads at their desired values. The effectiveness of the adaptive cache-fair multiprocessor scheduling is demonstrated through examples.
Introduction
A chip multiprocessor (CMP) system is a system with two or more cores integrated on a single chip. It is designed to improve the overall computation throughput of the system while reducing power consumption and design complexity. It is widely used in general-purpose and embedded applications (Cui et al., 2014; Pricopi and Mitra, 2014; Zhuravlev et al., 2012). As shown in Figure 1, each of the CMP cores in a CMP system consists of L1 instruction and data caches, and is able to process multiple threads simultaneously. Also, there is an on-chip L2 cache memory, which is shared by all cores and aims to reduce off-chip memory access latency.

Chip multiprocessor (CMP) architecture.
Scheduling of CMP systems is a typical application of the general technique of resource scheduling. The concept and theory of resource scheduling are widely employed in various applications, such as computing (Wang et al., 2016), communications (Dong et al., 2014), control and general complex systems (Bogdan and Zhou, 2011). The proliferation of general-purpose and embedded CMP systems leads to an imminent challenge to guarantee the scheduling performance of multiple tasks or threads on shared computing resources (Cui et al., 2014; Pricopi and Mitra, 2014; Yu et al., 2013; Zhuravlev et al., 2012). However, the shared cache memory architecture outdates conventional time-centric approaches to multi-thread scheduling due to the lack of cache memory awareness in the scheduling decisions. Cache unawareness of these algorithms results in poor utilization of processor cycles, and memory stalls with this poor utilization lead to thread execution performance degradation and processor cycle wastes.
To tackle this challenging problem, cache-aware multiprocessor scheduling has attracted increasing interests, e.g. see the work by Ebrahimi et al. (2010) and Zhou et al. (2009a,b). However, the majority of existing cache-aware scheduling methods, such as those presented by Ebrahimi et al. (2010); Jahre and Natvig (2009) and Zhou et al. (2009b), are static and open-loop. They cannot dynamically adapt against the dynamic transitions of the processor states, such as varying cache demands of the threads.
Addressing cache-fair CMP scheduling in dynamic environments, this paper describes the CMP scheduling from a feedback control perspective (Lu et al., 2002), and then presents a control-theoretic approach for adaptive cache-fair multiprocessor scheduling (ACMS). The main objective is to reduce cache memory dependence on the execution performance of threads under time-varying cache dynamics. The ACMS avoids memory stalls in thread executions with additional processor cycles while estimating the instant cache size requirement of the thread. Thus, it maintains the instruction counts of the multiple threads at their respective desired values through manipulating the processor cycles. This is achieved through real-time estimation of the dynamic variations in thread cache size requirements and instruction counts of the threads, together with processor cycle re-allocation decided by an adaptive controller (Park et al., 2012). For controller design, the system dynamics is mathematically described with a thread execution pattern model. The parameters of the model are identified in real-time through a QR-decomposition based recursive least square (QR-RLS) algorithm. The controller is designed using the pole placement technique with system modelling.
The paper is organized as follows. Following this brief introductory section is a section on related work and motivations. Then, a section is dedicated to the ACMS framework. After that, thread execution pattern modelling is developed. This is followed by developments of model identification, real-time scheduling control strategies and pole placement for controller design, respectively. Furthermore, experiments are conducted for benchmark examples. Finally, conclusions are drawn at the end of the paper.
Related work and motivations
Multiprocessor scheduling is an active topic of research (Pricopi and Mitra, 2014; Zhuravlev et al., 2012). For example, it has also been investigated for energy savings through software controlled dynamic voltage scaling (Mishra and Tripathi, 2014). Recently, with the proliferation of CMP architecture, multiprocessor scheduling faces new challenges in scheduling resources with share memory access constraints (Schliecker et al., 2009). The work in this paper deals with CMP scheduling with consideration of shared memory.
As multiprocessors in a CMP system share the limited memory, memory awareness becomes critical in achieving satisfactory scheduling performance of the system. Conventional time-centric scheduling algorithms, e.g. the earliest-deadline-first (EDF) (Anderson and Srinivasan, 2000; Stankovic et al., 1998), the least-laxity-first (LLF) and proportionate fair (Pfair) (Stankovic et al., 1998), lack cache memory awareness. Memory stalls and poor utilization of processor cycles lead to thread execution performance degradation and processor cycle wastes. Thus, cache-aware scheduling methods have been proposed to address this problem. This paper will present a new cache-aware CMP scheduling approach, which we refer to as ACMS.
Cache-aware scheduling can be categorized into cache-fair scheduling (Ebrahimi et al., 2010; Fedorova et al., 2006; Jahre and Natvig, 2009; Kim et al., 2004) and cache pattern-aware scheduling (placement) (Fedorova et al., 2005; Rajagopalan et al., 2007; Sato et al., 2013; Zhou et al., 2009a). The former comes from the fact that fair sharing of the resources among multiple threads will minimize the resource conflicts and bottlenecks. The latter is based on partitioning scheduling algorithms, in which tasks statically execute among the available cores according to the underlying scheduling criteria. Cache pattern-aware scheduling analyses the data patterns of the threads at application levels and places the threads into the most convenient cores according to their cache data pattern behaviours. The ACMS to be presented in this paper is a cache-fair scheduling approach.
However, the majority of existing cache-aware scheduling methods, e.g. those presented by Ebrahimi et al. (2010); Fedorova et al. (2006); Jahre and Natvig (2009); Kim et al. (2004) and Zhou et al. (2009b), are static and open-loop, implying that the actual scheduling performance is not fed back to the scheduler for dynamic adaptation of the scheduling decision. Open-loop cache-fair scheduling algorithms are diversified according to the specific methodology employed in the scheduling. For instance, Jahre and Natvig (2009) use interference points (IPs) to measure unfairness, while Fedorova et al. (2006) identify fairness based on the central processing unit (CPU) latency or cycle per instruction (CPI). However, the general inclination in all these methods is to use execution time metric (Ebrahimi et al., 2010; Kim et al., 2004). Regarding fairness enforcement strategies, there are different approaches. For example, Fedorova et al. (2006) enforce fairness by adapting processor cycles of threads. A general trend is to enforce fairness using cache related parameters such as cache allocation and partitions (Ebrahimi et al., 2010; Jahre and Natvig, 2009; Kim et al., 2004; Zhou et al., 2009b).
Existing studies (Tam et al., 2009) have shown significant differences in the cache size requirements among a number of applications or threads, indicating high uncertainty of the cache size requirement and cache miss rate due to the highly correlated nature of the co-runner threads. However, operating on a single operating point efficiently, open-loop cache-fair scheduling fails to consider dynamic variation in an operating environment. Even for the single operating point, the efficiency of the existing open-loop cache-aware algorithms is only verifiable on a specific system state, and the performance of the open-loop algorithms may degrade significantly in a changing environment such as varying cache demands of the threads. Therefore, there is a demand of closed-loop CMP scheduling to deal with this problem, motivating the research of our work in this paper on control-theoretic closed-loop cache-fair CMP scheduling.
Indirectly related to the topic of this paper, investigating scheduling from the feedback control perspective was reported in a single processor (Lu et al., 2002). The basic concept in the work by Lu et al. (2002) was to measure the actual scheduling performance and then feed the measured performance back to the scheduler, thus forming feedback scheduling. Feedback scheduling is a broad area in real-time scheduling. Similar work on feedback scheduling includes the works by Buttazzo and Aneni (2002); Tian and Gui (2011) and Tian et al. (2010).
There are a few closed-loop frameworks for CMP resource allocation despite the fact that none of them have directly tackled the fairness of the allocation at cache level. Srikantaiah et al. (2009) developed a SHArd Resource Partitioning (SHARP) control framework, which was an adaptive cache-aware scheduling framework for CMP systems. They used control theory for dynamic partitioning of the multiprocessor shared last-level caches, and this was achieved by optimizing the last level cache utilization among multiple concurrently executing applications on a well-defined service level platform. The SHARP control framework (Srikantaiah et al., 2009) uses a utilization metric and instruction count per cycle of an application, and updates cache ways for an application based on this metric. In comparison, the ACMS to be presented in this paper measures cache performance dependence on the utilization of a thread and avoids negative cache dependence by allocating more processor cycles to that particular thread.
Another set of articles on feedback control theory applications on CMP systems includes the work by Brinkschulte and Pacher (2008) and Velusamy et al. (2002), which inspire the research of our work in the present paper as an applied control example on a CMP platform. Brinkschulte and Pacher (2008) have proposed a closed-loop feedback framework with consideration of only branch mis-prediction as a slowdown factor for the throughput of a thread. From this slowdown metric, a new thread priority is defined for a thread on each control cycle. Velusamy et al. (2002) provided a general guideline on applications of the controller-design technique for tracing a desired adaptive behaviour. Their discussions covered modelling of the underlying system behaviour, determination of a setpoint (target metric) and sampling rate, and hardware controller implementation. They also defined cache decay, which is a technique for leakage energy savings. The introduction of the cache decay concept gives the flexibility of waiting for a pre-determined time duration, which is called the decay interval, before concluding that the data of a cache line is no longer in use and the cache line can be deactivated.
Compared with other adaptive or closed-loop control frameworks, the ACMS in this paper is a more advanced control framework with self-tuning capability. It is able to lean time-varying system dynamics and re-design the closed-loop system in each control period, making it more robust and less prone to uncertainties in CMP systems. So far, adaptive self-tuning control theory has not been well applied in robust and real-time cache-fair CMP scheduling.
In various approaches to the resource allocation fairness on CMP systems, a general strategy can be formulated in three stages:
fairness measurement;
resource allocation;
fairness enforcement.
These stages will be addressed in this paper in the ACMS development.
ACMS framework
Extending conventional single-dimensional scheduling, the ACMS has additional capability such as online learning and adaptive re-designable closed-loop architecture. It is constructed as a self-tuning adaptive control system, as depicted in Figure 2. The primary goal of the ACMS is to drive the actual instruction count (

The framework of the ACMS. Notations in the figure: processor cycles
As shown in Figure 2, the ACMS consists of four main components:
CMP system plant demonstrating thread execution dynamics;
QR-RLS model identification for plant model identification;
pole placement controller design module for adaptive adjustment of the controller parameters;
scheduling controller for dynamic CMP scheduling control.
In addition, a thread execution pattern model has to be established to describe the thread execution dynamics. This can be considered as an additional and hidden component of the ACMS.
The four components of the ACMS in Figure 2 are interconnected into two separate loops: a conventional feedback loop with the plant and the controller, and a parameter adjustment loop including the online model identification and adaptive controller parameter adjustment.
The conventional feedback loop tracks the actual
With the hidden execution pattern model, the parameter adjustment loop provides online learning and adaptive re-designable closed-loop architecture to guarantee controller parameter adaptation against the characteristics and uncertainties of the time-varying cache size requirement. The hidden model relates to cache size requirement variables such as miss count and co-runner miss counts as well as processor cycles assigned to that particular thread. The QR-RLS model identification module is designed for parameter identification of the thread execution pattern model. With the identified model, the pole placement controller design module updates the controller parameters in real time. The detailed design of the ACMS components is discussed in the next few sections.
Thread execution pattern model
To design an adaptive control system for CMP scheduling, a dynamic model is essential to capture the thread execution pattern for the threads in a CMP system. This section builds such a model, which describes the relationships between processor cycle, miss count (
The execution performance of a thread can be modelled by formulating the impact of a cache miss on the cycles per instruction (CPI) of the thread. As the ACMS aims to maintain the ICs of the multiple threads at their respective desired values through manipulating the processor cycle re-allocation, the model will relate the CPI with IC. From the work by Matick et al. (2001), the actual CPI vector,
where
Equation (1) can be reformulated to a discrete-time state space model for practical computation
where
where
In this state space model,
As
where
where
where
Considering
It can be re-written in a compact form as
The corresponding discrete-time transfer function of the system plant is expressed as
QR-RLS model identification
The cache size requirement of a thread in equation (8) is a linear combination of
The QR-RLS algorithm in our work is given in adaptive QR-RSL algorithm steps 1 to 3. In the QR-RLS algorithm, it is assumed that
initialization and basic assignments;
input data matrix triangularization;
back-substitution to find
It is worth mentioning that the convergence of the system model largely depends on both the coefficients
Structure of the scheduling controller
After the model parameters of equation (9) are identified, an algebraic pole placement algorithm can be designed to update the controller parameters, i.e. the coefficients of the polynomials
A pre-designed or desired closed-loop system response enables determination of the closed-loop system stability and other desired close-loop system characteristics such as settling time, maximal overshoot and damping ratio. This increases the flexibility and applicability of the approach for a range of scheduling control scenarios.
For the given model in equation (4), considering the plant transfer function
From equation (22), solvable algebraic polynomial equations, also known as Diophantine equations, are derived
It follows that the error tracking function
where
where
which can be re-written as
From Bobál et al. (2005), consider the following criterion
If this is met, the polynomial degree relation is defined as
If the criterion in equation (28) is not met,
From the assumption of
When equation (28) is met, it is feasible to assume the polynomial degrees of the whole system dynamics to be
Thus, given equation (22), the polynomial degrees of the closed-loop system can be derived as
Equation (32) shows that the closed-loop polynomial degree is four. Thus, a fourth-order desired closed-loop response needs to be designed, as will be shown below.
Pole placement controller design
In the previous section, the orders of
The response of the forth-order closed-loop system is designed based on a desired damping ratio and oscillation frequency for a given sampling period
This gives a damping ratio of about 0.54 with the maximum overshoot of about 13% for the closed-loop system. The oscillation frequency is about 231.46 Hz. The resulting closed-loop system is stable with gain and phase margins of about 104 dB and 113∘, respectively.
With the desired poles given in equation (33), the characteristic polynomial
From equation (32), re-write equation (23) as
Re-arranging equation (35) gives
Let us denote
From equations (36) and (37), the polynomial coefficients of the controller transfer function are derived as
Experimental results
Simulation experiments are designed to validate the effectiveness of the scheduling controller in execution performance improvement of the active thread through improved
Selected specifications of the hardware CMP architecture are shown in Table 1. Experiments are conducted in simulations with various cache utilization scenarios simulated by controlled co-runner pairs. Each thread of the pairs is chosen from compiled benchmarking binaries of the Standard Performance Evaluation Corporation (SPEC) (KleinOsowski and Lilja, 2002). The controlled co-runner thread pairs are formed from the chosen threads as listed in Table 2.
Multi-core CMP architecture constraints.
Workload/thread definition and scope (KleinOsowski and Lilja, 2002).
The SPEC benchmarking suite offers a number of workload levels to represent different memory access characteristics and thread execution patterns. For our purpose, the SPEC co-runner thread pairs are classified into heavy-weight and light-weight co-runner pairs. The co-runner pairs chosen in this work are shown in Table 3, in which some statistics of our simulation results are also tabulated. They include both heavy- and light-weight co-runner pairs. For example, mcf-art is a heavy-weight co-runner pair while mcf-vpr is a light-weight co-runner pair. In all these co-runner pairs, the first thread of each pair always refers to the thread with higher cache requirement and thus is the target thread for performance improvement.
Average miss count (
Other experimental settings include the following parameters. The cache miss penalty
Heavy-weight co-runner pair mcf-art
As both mcf and art threads are cache demanding, mcf-art is a heavy-weight co-runner pair. Thus, a significant level of miss count can be expected, as demonstrated in Table 3, e.g. 35 and 48 from the conventional scheduling and ACMS, respectively. As a result, the average
The average

mcf-art co-runner pair: adaptive
Figure 4 shows that after a short transition, the adaptive

mcf-art: adaptive

mcf-art: actual
Light-weight co-runner pair mcf-vpr
The light-weight co-runner pair mcf-vpr is a combination of a heavy-weight thread mcf and a light-weight thread vpr. Table 3 shows that the average

mcf-vpr: dedicated (reference) cache
However, the quality of the ACMS in improving the performance of the thread mcf increases over time. Figure 7 shows that after a short transient process, the ACMS becomes better than the conventional CMP scheduling in terms of the

Co-runner pair mcf-vpr:
ACMS is designed to drive the

mcf-vpr: adaptive
Further discussions
In our experiments, the ACMS has improved the average
Two exceptions are light-weight co-runner pairs mcf-vpr and gcc-crafty. While the mcf-vpr exhibits a slight deterioration in the average
Conclusion
This paper has shown that the multiprocessor scheduling problem in dynamic environments can be tackled from the feedback control perspective through process modelling, model computation and adaptive control. A control-theoretic approach has been presented for closed-loop adaptive cache-aware chip multiprocessor scheduling (ACMS). It maintains the instruction counts at their respective desired values through process cycle manipulation computed from an adaptive controller, which is designed from CMP models. The real-time and proactive estimation of the cache size requirements of the multiple threads executing on the processors is an input to the adaptive controller. Through some benchmark examples, the ACMS has been demonstrated to be effective in improving the thread execution performance, particularly for a thread in a highly utilized L2 cache environment.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is supported in part by the Shanxi Provincial Government of China under the International Collaboration Projects Scheme (grant number 2015081007), and the Talent and Technological Innovation Projects Grant Scheme (grant number 201605D211021), both to authors Y-C Tian and F Li. The work is also supported by Shanghai Science and Technology Commission of China under the International Corporation Projects Scheme (grant numbers 14510722500 and 15220710400) to Y-C Tian, M-R Fei and C Peng.
