3.2.1. Simple Case: Exact Match
Table 2 shows some examples of processor selections for scheduling the task set shown in
Table 3. In a CMOS chip, power consumption is determined by the operating frequency and supply voltage. The relationship between the power consumption and the supply voltage in the processor is as follows.
In addition, according to the relationship between the supply voltage and the operating frequency in a processor, shown in Equation (
7), a processor operating at a higher frequency requires a higher supply voltage than that operating at a lower frequency. Therefore, as shown in
Table 2, a processor with a higher supply voltage will have a higher capacity.
where
is the threshold voltage of transistors and
is a measure of the velocity saturation in COMS transistors.
,
, and
shown in
Table 2 satisfy Theorems 1 and 2 presented above. Since the processing capacity of
,
, and
is equal to the total utilization of the task set, there is no idle time when the task set is scheduled. However, since the number and capacity of processors is not the same in each processor, the power consumed by
,
, and
is different. The energy consumption for scheduling the task set in
Table 3 on
,
, and
is shown in
Table 4. The lowest power consumption can be observed on
, where each task is independently assigned to a processor whose capacity is equal to the utilization of each task in the task set. If the total capacity of a processor set is equal to the total utilization of a task set, then there is no idle time because all processors always perform their tasks. Therefore, the power consumption of each processor is dependent on the processed workload. High-capacity processors can handle more work in terms of processor workloads. Equation (
8) shows the power consumption
needed to process
in a processor whose operating frequency and supply voltage are
and
, respectively.
where
and
denote the voltage and capacity of the
k-th processor, respectively. Lemma 1 shows the power consumption characteristics of processor sets whose total capacity is equal to the total utilization of a task set.
Lemma 1. If , when scheduling a task set with on two processor sets and , the power consumption satisfies .
Proof of Lemma 1. According to Equation (
8), the power consumption measures of
and
are
and
respectively. Since
and
, there is no idle time when the tasks are scheduled. In addition,
, where
and
. Hence,
. ☐
According to Lemma 1, selecting the 0.8 capacity processor for scheduling the 0.6 and 0.2 utilization tasks in the task set, as shown in
Table 1, will result in higher power consumption than selecting the 0.6 and 0.2 capacity processors for the scheduling the tasks. Therefore, assigning each task to the processor sets whose capacity is equal to its utilization is the most energy-efficient way when there are enough processors. Under the condition of
, the processor whose capacity is equal to
shows the lowest power consumption to execute the task with the utilization
. Lemma 2 shows these characteristics.
Lemma 2. When a task with utilization is executed on two processors under the condition of , their power consumption for processing the allocated workload during the task period is .
Proof of Lemma 2. When two processors with capacities of
and
perform the workload
during the period
, their power consumption measures are
and
respectively. If
,
is satisfied by Equation (
7). Hence,
is satisfied by Equation (
8). ☐
When a task set with the total time of
is scheduled on
n processors whose capacity is different, the power consumption required for processing the allocated workload on n processors is shown in Equation (
9).
,
, …,
represents the workload assigned to each processor.
If the total capacity of n processors is greater than the total utilization of a task set to be scheduled, there will be idle time during task scheduling. This means that the power consumption during the idle time should be taken into account to measure the processors’ power consumption required for scheduling the task set. The power consumption of
n processors is shown in Equation (
10).
denotes the power consumption of the
i-th processor during the idle time.
Lemma 3 and Theorem 3 show the power consumption required for scheduling a task set on a set of n processors with different capacities.
Lemma 3. When the task set is scheduled with the processor set , the lowest power is consumed, where the total capacity of is .
Proof of Lemma 3. If
, scheduling involves no idle time, so the processor power consumption is
. If
, scheduling involves some idle time, so the processor power consumption based on Equation (
10) is
. Hence, if
, then the lowest power consumption will be observed. ☐
Theorem 3. Independently assigning each task in the task set τ to processors whose capacity is equal to the utilization of the task shows the lowest power consumption for scheduling a set of tasks.
Proof of Theorem 3. This is easily proven by Lemmas 1–3. ☐
Therefore, selecting processors whose capacity is equal to the utilization of each task shows the lowest power consumption for scheduling a set of tasks.
3.2.2. Generalized Solution
When not assignable to a processor with the same capacity as the task’s utilization, it is necessary to select a processor set available for scheduling with the limited processors.
Table 5 shows the characteristics of processors used for task scheduling.
Table 6 shows the processor sets selected from the processors in
Table 5 for scheduling the task set shown in
Table 7.
Since the processor sets
,
,
, and
shown in
Table 6 satisfy Theorems 1 and 2, they can be used for task scheduling. However, since the processor sets are differently configured, the idle time during the task scheduling and the difference in their supply voltages result in their different power consumption. Therefore, the following two strategies should be considered to select energy-efficient processors.
Selecting a processor set for task scheduling in consideration of all the problems presented above is a NP-hard problem. Therefore, in this paper, we propose a heuristic method for selecting an energy-efficient processor set. In the proposed method, if the size of the current plane is smaller than , the processor in active mode is added to a processor set for task scheduling because it cannot be switched to sleep mode at the end of the previous plane. If the preferentially selected processors are not enough for scheduling the given task set, additional processors will be selected. Processors for scheduling are selected in terms of the local utilization of tasks from highest to lowest. Selecting processors for scheduling depends on the difference between the total local utilization of tasks in at the start time in each plane and the total capacity of the processors in . The selected processors are moved to . The following describes how to select processors.
If , the processor with the smallest capacity is selected for scheduling in the given processor set, .
If , the previously selected processor is used for scheduling without selecting an additional processor.
is the set of all the processors in the system. is the set of the selected processors for task scheduling. Algorithm 1 shows how to select processors for scheduling at the beginning of each plane. The function getMinimumCapacityProcessor(availableCapacity, τ, ) takes the available capacity (availableCapacity) of the previously selected processor into account to return the lowest capacity processor for scheduling the task set from the given processor set . The function add() adds elements to the set, and the function erase() removes elements from the set. The processors in indicate the processor in the sleep state in the plane. It is necessary to ensure a break-even time longer than the idle time in order to use DPM techniques for switching the state of a processor. To ensure the idle timeis long enough to enter the sleep mode, the idle time in the plane should be generated as much as possible on a single processor. To prevent unnecessary power consumption, a task is assigned to the selected processor whose capacity is the lowest for scheduling the task. For this reason, in the proposed method, the processors in the selected processor set are classified into the following categories: processors that can be used to the maximum extent in the plane and processors that can be used exclusively by a single task in the plane. That is, the processors in are classified into the following categories: , , and . The processors in represent a set of processors exclusively used by a single task. is the set of processors used to the maximum extent in the plane. is the set of processors that may result in idle time in the plane during task scheduling. The tasks to be executed on the classified processor sets are divided into the following categories: , , and . Tasks assigned to a processor set cannot be moved to another processor set. The following describes how to classify the processor sets.
Algorithm 1 Processor selection of the beginning time of a T-L plane |
- 1:
Input: - 2:
Output: - 3:
psize—Size of the T-L plane - 4:
—The set of processors in the system - 5:
—The set of processors to be sleep mode - 6:
—The set of processors selected for scheduling tasks - 7:
—The temporary set of processors - 8:
—The set of all tasks in the system - 9:
—The set of ready tasks - 10:
—Temporary variable for tasks - 11:
p—Temporary variable for processors - 12:
availableCpacity—Temporary variable for available capacity - 13:
for do - 14:
if then - 15:
add(); - 16:
end if - 17:
end for - 18:
for do - 19:
if then - 20:
add(); - 21:
end if - 22:
end for - 23:
repeat - 24:
= getFirstLocalUtilizationTask(); - 25:
availableCapacity = - 26:
if then - 27:
contitue; - 28:
else - 29:
p = getMinimumCapacityProcessor(); - 30:
if p is null then - 31:
p = getMinimumCapacityProcessor(); - 32:
if then - 33:
erase() - 34:
end if - 35:
erase(); - 36:
else - 37:
erase(); - 38:
end if - 39:
add(); - 40:
; - 41:
end if - 42:
until is not null - 43:
return
|
To select a processor for scheduling a task in where the difference between the total local utilization of the tasks in at () and the total capacity of the processors in () is greater than zero: .
If , the task is additionally assigned to a previously selected processor without selecting an additional processor. The assigned task is moved from to .
If , the task is additionally assigned to a previously selected processor without selecting an additional processor. The assigned task is moved from to .
If ,
All processors and tasks in and are moved to and .
The processor whose capacity is the lowest for scheduling a task , is selected from the following processor set, . If the capacity of the selected processor is equal to the local utilization () of the task , the processor and the task are moved to and , respectively. Otherwise, they are moved to and , respectively.
Algorithm 2 shows how to classify the processor set into the following categories: , , and . The task with the highest local utilization is considered first to classify the processor set and the task set. The function getFirstLocalUtilizationTask() returns the task with the highest local utilization in . The function getMinimumCapacityProcessor(availableCapacity, τ, ) takes availableCapacity into account to return the processor whose capacity is the lowest for scheduling a task in . If the capacity of the returned processor is equal to the local utilization of the task, the processor and the task is moved to and , respectively. If availableCapacity is 0, the processors in and the tasks in are moved to and .