## 1. Introduction

Today, multi-core architecture has been widely supported by most of major chip vendors, including Intel, AMD, IBM, Nvidia, ARM, Sum microsystems, Qualcomm, Broadcom, and so on. Some of the chip manufacturers have already launched 16-core chips into the market, that is, AMD OpteronTM 6300 Series [1]. It is not surprising that in the coming future, hundreds or even thousands of cores will be integrated into a single chip [22]. When moving toward multi-core architecture, it comes with new and critical challenges in design of multi-core systems, particularly multi-core real-time systems.

As architecture becomes more and more complicated, besides the timing constraint, many other design constraints are taken into consideration in real-time system design and development. Traditional approaches focus exclusively on timing constraints [3,4,6,7]. Today, many other design constraints (e.g. power/energy, thermal, and reliability) also need to be considered seriously in real-time system design [8,9,11,12,14].

### 1.1. Power/energy analysis in multi-core real-time systems

Catalyzed by continuous transistor scaling, hundreds of billions of transistors have been integrated on a single chip [13]. One of the immediate consequence caused by the tremendous increase of transistor density is the soaring power consumption [5], which further results in severe challenges in energy and temperature[11,17]. Today, power has become a critical and challenging design objective in front of system designers.

### 1.2. Thermal analysis in multi-core real-time systems

The continuously increased power consumption has resulted in a soaring chip temperature. Moreover, as design paradigm shifts to deep submicron domain, high chip temperature leads to a substantial increase in leakage power consumption [13], which in turn further deteriorates the power situation due to the interdependency between temperature and leakage power. For instance, with Intel core i5-2500K (32 nm Sandy Bridge), the leakage power roughly grows up to 2× from 55°C (13 W) to 105°C (26 W), see **Figure 1**. Furthermore, the soaring chip temperature adversely impacts the performance, reliability, and packaging/cooling costs [17]. As a result, power and thermal issues have become critical and significant for advanced multi-core system design. In next section, we introduce some necessary backgrounds of multi-core scheduling with power and thermal awareness, respectively.

The aggressive semiconductor technology scaling has pushed the chip power density doubled every two to three years [16,20], which immediately results in an exponential increasing in heat density. High temperature can degrade the performance of systems in various ways. Therefore, there is a great need of advanced techniques for thermal/temperature aware design of multi-core systems.

## 2. Preliminary

### 2.1. Multi-core platform and task model

The multi-core platform consists of *M* processing cores, *M* ≥ 2, denoted as **P, P** = {*P*_{1},*P*_{2},…,*P*_{M}}. Each core *P*_{i} has N running modes, each of which is characterized by a 2-tuple set (*v*_{k}, *f*_{k}), where v_{k} represents the supply voltage and f_{k} represents the frequency under mode k, 1 ≤ k ≤ N.

Let S represent a static and periodic speed schedule, which indicates how to vary the supply voltage and working frequency for each core at different time instants. A speed schedule S is constituted by several state intervals, which is described as below:

**Definition 1** [25]: Given a speed schedule S for a multi-core system, an interval [*t*_{q−1}, *t*_{q}] is called a state interval if each core runs only at one mode during that interval.

Recall that speed schedule S is a periodic schedule, let L denote the length of one scheduling period. According to Definition 1, a speed schedule S essentially consists of a number of non-overlapped state intervals. Let Q represent the number of non-overlapped state intervals within one scheduling period of S, then we have that [25]

For a single state interval [*t*_{q−1}, *t*_{q}], let **K**_{q} represent the interval mode, **K**_{q} = {*k*_{1},*k*_{2},…,*k*_{M}}, where *ki* denotes the running mode of core *P*_{i} in interval [*t*_{q−1}, *t*_{q}].

### 2.2. Power model

The overall power consumption (in Watt) of each core is composed of two parts: dynamic power *P*_{dyn} and leakage power *P*_{leak}. We assume that: (1) *P*_{dyn} is varied with respect of supply voltage but independent of temperature, (2) *P*_{leak} is sensitive to both temperature and supply voltage. Specifically, for the dynamic power, we know that it is proportional to the square of supply voltage and linearity of working frequency. We assume that the working frequency is linearly proportional to supply voltage, thus the power consumption of the i-th core (*P*_{i}) under running mode *k _{i}* can be formulated as below [18].

where *v*_{ki} is the supply voltage of core *P*_{i} determined by the running mode.

For leakage power, although there is a very complicated relationship between leakage power and temperature from circuit level perspective, Liu et al. [23] found that a linear approximation of the leakage temperature dependency is fairly accurate. Work [12] further formulated the leakage power of core *P*_{i} as below:

where *ki*.

Consequently, the total power consumption of core *P*_{i} at time *t*, denoted as *P*_{i}(*t*), can be formulated as:

For convenience in our presentation, we rewrite the above formula by separating the elements into temperature independent/dependent parts such that

where

Or

Note that we use the bold text for a vector/matrix and the unbolded text for a value, for example, **T** represents a temperature vector while *T* represents a temperature value.

### 2.3. Thermal model

**Figure 2** illustrates the thermal circuit model for a multi-core platform consisting of four processing cores. *C*_{i} represents the thermal capacitance (in Watt/°C) of core *P*_{i}, and *R*_{ij} represents the thermal resistance (in J/°C) between core *P*_{i} and *P*_{j}. Note that the thermal model adopted here is similar to the one used in related work [19,21]. Let *T*_{amb} represent the ambient temperature, then the thermal phenomena of core *P*_{i} in **Figure 2** can be formulated as

Let

Then the thermal model in equation (7) can be rewritten as

Accordingly, for the entire system, the thermal model can be represented as

where **C** and **g** are MxM matrices

and *M*x*1* vector

Note that **C, g**, and **C** is the thermal capacitance matrix with none zero values only on the diagonal, and **g** is a thermal conductance matrix. The thermal model adopted here is a generic model which takes the heat transfer among different cores into consideration. Thus, it can be directly applied on thermal analysis for both temperature transient state and temperature stable state.

## 3. Temperature analysis in multi-core real-time systems

There is an interactive effect between power and temperature, that is, high power leads to high temperature, which in turn further aggravates the power consumption. In order to calculate the energy consumption accurately and efficiently, it is necessary to develop an efficient solution to calculate the temperature first.

In this section, we first present a temperature formulation within thermal transient state for a constant speed schedule interval. Then we present an analytical solution to calculate the temperature within thermal steady state for a periodic speed schedule.

### 3.1. Temperature analysis in system thermal transient state

In this subsection, we will formulate the temperature variation [26] within one state interval [*t*_{q−1}, *t*_{q}] in the system thermal transient state.

First, by applying power model given by equation (6) into thermal model given by equation (10), we can derive that

Then we simplify the above equation by letting

Since **C** represents the capacitance matrix, according to the circuit nature, we know that matrix **C** contains no zero values only on its diagonal. Thus, we can see matrix **C** is non-singular. Therefore, the inverse of **C**, that is,

where

For a state interval [*t*_{q−1},*t*_{q}], it is important to point out that all coefficients in the above are constant. Specifically, let *K*_{q} be the corresponding interval mode, and let **T**(*t*_{q−1}) be the temperature at the starting point of that interval. Then according to equation (16), the ending temperature of that interval, that is, **T**(*t*_{q−1}), can be directly formulated as

where

### 3.2. Temperature analysis in system thermal steady state

In this subsection, we will formulate the temperature variation [26] within one state interval [*t*_{q−1}, *t*_{q}] in the system thermal steady state.

Consider a periodic speed schedule S, and let **T**(0) be the initial temperature at time instant 0. For an arbitrary state interval [*t*_{q−1}, *t*_{q}] within speed schedule S, to obtain its steady-state temperature, one intuitive way is to trace the entire schedule S by consecutively calculating the temperature from the first scheduling period until system reaches its thermal steady state.

Although this approach works from theoretical point of view, when considering the practical computational time cost (which would be extremely expensive), it turns out that this intuitive approach would be inefficient or even impractical. Thus, it would be desirable and useful to develop an efficient solution to rapidly calculate steady-state temperatures for a periodic speed schedule.

Let us first consider the temperature variation at the end of each scheduling period, that is, *t* = *n*L, where *n* ≥ 1. Let the scheduling points of S(*t*) in the first period be *t _{0},t_{1},…,t_{s}*, respectively. After repeating S(

*t*), let the corresponding points in the second scheduling period be

*t*, respectively (see

_{0}',t_{1}',…,t_{s}'**Figure 3**). Note that

*t*_{0} = 0, *t*_{0}' = *t*_{s} = *L*, and *t*_{s}*'* = 2*L*. According to equation (17), at time *t*_{1} and *t*_{1}', we have

Subtract equation (18) from (19) on both sides, and simplify the result by applying

Follow the same trace of the above derivation, we have that

Since

In the same way, we can construct that

where x = 1,2, …,n. Sum up the above n equations, we get

In the above, {**K**^{x−1}|x = 1,2,…,n} forms a matrix geometric sequence. If (**I**−**K**) is invertible, then we have

Next, we consider the temperature variation for an arbitrary time instant when repeating a periodic speed schedule. Given a periodic speed schedule S(*t*), let *t*_{q} (*t*_{q} ∈[0,*L*]) be an arbitrary time instant within schedule S(*t*). Moreover, let's repeat S(*t*) for n times, where *n* ≥ 1. Let **T**(*nL* + *t*_{q}) denote the temperature of **T**(*t*_{q}) in the n-th scheduling period, by following the similar way of the above derivation, we can get that

where

Until now, we have been able to formulate the temperature variation of an arbitrary time instant in the n-th scheduling period. Next, we will further formulate the temperature variation of an arbitrary time instant in the system steady state. Consider an arbitrary time instant, that is, *t*_{q} , 0 ≤ *t*_{q} ≤ *L*, within the first scheduling period. The brief idea of calculating the steady-state temperature corresponding to *t*_{q} is to let n go to infinity in equation (27). We formally describe our method in Theorem 1.

**Theorem 1** [25]: Given a periodic speed schedule S(*t*), let **T**(*L*) and **T**(*t*_{q}) be the temperatures at time instant *L* and *t*_{q}, *t*_{q} ∈ [0,*L*], respectively. If for each eigenvalue λ_{i} of **K**, we have |λ_{i}| < 1, then the steady-state temperature corresponding to t_{q} can be formulated as

Proof:

First, based on equation (26), by letting n→+∞, the steady-state temperature of the q-th scheduling point in S(*t*) can be represented as

When n→+∞, the matrix sequence **K**^{n} converges if and only if |λ_{i}|< 1, for each eigenvalue λ_{i} of **K** [14]. Under this condition, we have _{i}|< 1 holds, then (**I**-**K**) is invertible. Thus, the steady-state temperature of the q-th scheduling point in S(*t*) can be further formulated as

Note that as n→+∞, unless the temperature runs away and causes the system to break down, we know that the system could eventually achieve its thermal steady state. That means for each eigenvalue λi of **K**, the condition of |λi|< 1 should always hold. Therefore, it is reasonable and practical to make such assumption shown in Theorem 1.

## 4. Energy analysis in multi-core real-time systems

Besides temperature, energy consumption is another important and challenging issue in the design of multi-core real-time systems. We have now been able to formulate the temperature variation in a multi-core system in the previous section. In this section, we will discuss how to formulate the energy consumption on multi-core systems with consideration of the interdependence between leakage power and temperature.

In the rest of this section, we first present an analytical solution to calculate energy consumption of an arbitrary state interval. Then we present a solution to calculate the total energy consumption of the entire speed schedule.

### 4.1. Energy analysis for one scheduling state interval

Consider a state interval, that is, [*t*_{q−1}, *t*_{q}] with initial temperature of **T**(*t*_{q−1}). The energy consumption of all cores within that interval can be simply formulated as

Based on our system power model, given by equation (6), we have

Theorem 2 given below is targeted to solve the above energy calculation problem.

**Theorem 2** [25]: Given a state interval [*t*_{q−1}, *t*_{q}], let **T**_{q−1} be the temperature at time *t*_{q−1}. Then the overall system energy consumption within interval [*t*_{q−1}, *t*_{q}] can be formulated as

where

Proof:

In equation (31), let

On the other hand, according to the system thermal model given by equation (10), we have

where *t*, where *t* ∈ [*t*_{q−1}, *t*_{q}], we can get

Note that

where

Applying equation (36) into (33), we can see that

From Theorem 2, we can see that for an arbitrary state interval [*t*_{q−1}, *t*_{q}], once the beginning temperature **T**(*t*_{q−1}) is known, the total energy consumption within [*t*_{q−1}, *t*_{q}] can be easily and directly calculated.

Subsequently, given a periodic speed schedule S and an initial temperature **T**_{0}, we are able to calculate the energy consumption within an arbitrary state interval in any scheduling period.

**Corollary 1** [25]: Given a periodic speed schedule S(*t*) consisting of Q state intervals, let **T**_{0} be the initial temperature. Then the energy consumption within the q-th state interval in the n-th scheduling period, denoted as **E**(*t*_{q−1} + *nL, t*_{q} + *nL*), can be calculated as

where

Corollary 1 can be easily derived from Theorem 2. With the help of Corollary 1, given any periodic speed schedule on a multi-core platform, when repeating that schedule, we can quickly calculate the energy consumption within any state interval.

Accordingly, given a periodic speed schedule, when analyzing the system thermal steady state, we can directly calculate the energy consumption of any state interval within the system steady state.

**Corollary 2** [25]: Given a periodic speed schedule S(*t*) consisting of Q state intervals, let **T**_{0} be the initial temperature. Then the energy consumption within the q-th state interval in the system steady state, denoted as **E**_{ss}(*t*_{q−1}, *t*_{q}), can be calculated as

where

Corollary 2 is directly derived from Corollary 1 by replacing the transient temperatures with steady-state temperatures.