Real Time Scheduling for CPU and Hard Disk Requirements-Based Periodic Task with the Aim of Minimizing Energy Consumption
Автор: Vahdaneh Kiani, Zeynab Mohseni, Amir Masoud Rahmani
Журнал: International Journal of Information Technology and Computer Science(IJITCS) @ijitcs
Статья в выпуске: 10 Vol. 7, 2015 года.
Бесплатный доступ
In recent years, with an increasing number of requests, energy, power and temperature have been important keys in embedded systems, which decrease the lifetime of both CPUs and hard disks. The energy consumption is an important issue in computer systems, particularly real-time embedded systems. The frequency and the Revolutions Per Minute are major factors in the reduction of energy consumption in both processors and hard disk drives. Therefore, the main goal of this paper is to present a scheduling mechanism for a real time periodic task that can save more energy. This mechanism is based on increasing, as much as possible, the execution time of the CPU and/or the Read/Write time of the hard disk without passing the task deadline. This will be done by dynamically changing the CPU frequency and/or the RPM of hard disk. Our experimental results demonstrate that the proposed algorithm manages to lower energy consumption by an average of 25% and to reduce the number of missed tasks by 80%.
Energy consumption, periodic real time task, execution time, Read/Write time, Revolutions Per Minute, frequency
Короткий адрес: https://sciup.org/15012390
IDR: 15012390
Текст научной статьи Real Time Scheduling for CPU and Hard Disk Requirements-Based Periodic Task with the Aim of Minimizing Energy Consumption
Published Online September 2015 in MECS DOI: 10.5815/ijitcs.2015.10.07
-
II. Related Work
-
A. Techniques for Saving Energy in CPU
In recent years, a significant number of studies have been done in the field of special-purpose systems for scheduling real time tasks, in which DVFS technique was used in order to improve energy or power consumption. Kamga [1] proposed a mechanism for emulating a precise CPU frequency by using the DVFS management in virtualized environments. In [10] the focus is on a scheduling approach towards the sporadic tasks set in the uni-processor system according to DVFS technique. In [5] they presented a DVFS-based algorithm to reduce energy consumption of processors through efficient use of the generated tasks’ slack times by an independent scheduler. Laszewski et al. [6] proposed a scheduling algorithm for DVFS- enabled clusters for executing multiple virtual machines in order to reduce power consumption. In [8] they introduced a mechanism for scheduling of real-time tasks on a non-ideal DVS processor with shared resources in order to obtain better energy efficiency.
-
B. Techniques for Saving Energy in Hard Disk
Many case studies have been done on the reduction of energy consumption of hard disks. In [12], [13] and [14] they focused on presenting mechanisms for reduction of power and energy consumption of hard disks regardless of them being scheduled for a set of real time tasks. Swaminathan et al. [15] presented the scheduling for a set of hard disk real time tasks with I/O requests based on DPM technique. In this paper we proposed a new algorithm for scheduling a real time periodic task with CPU and hard disk requests, in order to lower energy consumption as much as possible.
Also in Kong et al. [11] they addressed the problem of multi-resource energy minimization for frame-based realtime tasks running on a DVS-capable processor of a discrete set of operational modes with multiple off-chip DPM-capable devices.
-
III. Optimizing Energy Consumption for a Periodic Real Time Task With Cpu and Hard Disk Requests
-
A. Phase1: Computing Energy Consumption of CPU and Hard Disk and Comparison of their Respective Values
In this section we will present our new algorithm for computing and comparing hard disk and CPU energy consumption .With the aim of reducing energy consumption, the execution time of the CPU and/or the R/W time of the hard disk up until the deadline will be increased. Based on which of the hard disk or CPU consumes more energy, the execution time of the task changes with one the items below:
-
• The R/W time of the hard disk increases.
-
• The execution time of the CPU increases.
-
• Both R/W time of the hard disk and CPU execution time increase.
The major parameters of the task are described in Table1.
In Figs.1, 2 and 3 CPU Energy Consumption, HDD Energy Consumption and Decision algorithm are shown, respectively. In the first step of algorithm 1, we have calculated CPU power consumption that is denoted in Eq. (1).
-
1: Input : Fcpu,V, λ
-
2: Output : Ecpu
-
3: Use Eq. (1) to calculate the power consumption of CPU
-
4: U se Eq. (2) to calculate the CPU energy consumption
-
Fig.1. CPUEC algorithm
-
1: Input : RPM
-
2: Output : EHDD
-
3: Use Eq. (3) to calculate the power consumption of HDD
-
4: U se Eq. (4) to calculate the hard disk energy consumption
-
Fig.2. HDDEC algorithm
Table 1. The major parameters of task.
Parameter |
Definition |
F cpu P E HDD R t D t RE t EX t F cpu λ V min-cpu max-cpu E t cpu RWt HDD T t AS t RPM Et task |
CPU Energy consumption(J) Power consumption Hard Disk Drive Energy consumption(J) Ready time(ms) Deadline time(ms) Remaining time up until the deadline(ms) Extended period of time from the deadline(ms) Frequency of CPU(GHz) Effective capacitance Voltage of CPU(V) Minimum frequency of CPU(GHz) Maximum frequency of CPU(GHz) CPU Execution time(ms) Read and Write time for hard disk drive(ms) Transfer time(ms) Average Seek time in hard disk(ms) Revolutions Per Minute in hard disk The execution time of modified task(ms) |
P = λ×F cpu ×V2 (1)
Where F, λ and V represent processor’s working frequency, the effective capacitance, and processor’s working voltage, respectively. In this paper for Intel Pentium M Processor model, the maximum frequency is 1.6 GHz and the minimum frequency is 0.6GHz, so CPU energy consumption is defined as:
E cpu = P ×E tcpu (2)
For calculating hard disk energy consumption, at first, we must compute power consumption that is defined as:
P=Number of platters ×(RPM)2.8×(Diameter)4.6 (3)
For Eq. (3)[17] we used HP 300GB-6G-SAS 15k rpm-SFF(2.5inch) model of hard disk drive with 2 platters, four levels for RPM and 2.5inch diameter, so hard disk energy consumption that is denoted in Eq. (4).
E HDD = P × T t (4)
In Fig.3 at first we compared energy consumption of the hard disk and that of the CPU. If energy consumption of the CPU is greater than that of the hard disk, algorithm 4(First Frequency-Last RPM) will be executed, otherwise algorithm 5(First RPM-Last Frequency) will be executed.
-
1: Ecpu = CPUEC algorithm
-
2: EHDD= HDDEC algorithm
-
3: If EHDD
cpu then -
4: FF-LR algorithm
-
5: else If EHDD>Ecpu then
-
6: FR-LF algorithm
-
7: end if
-
Fig.3. Decision algorithm
-
B. Phase2: Computing the Optimal Execution Time of the Task Based on Obtained Ideal Frequency and RPM
In this section, the second phase of our proposed algorithm will be described. In this phase after determining which of the two (CPU or hard disk) consumes more energy, based on the above algorithms, either FF-LR algorithm or FR-LF algorithm in Figs. 4 and 5 will be selected.
-
B.I. Energy Consumption of CPU is More than that of the Hard Disk
In Fig.4 first, the frequency of the CPU is set to minimum and the RPM of the hard disk is set to maximum, in other words, the CPU performs with minimum frequency, which causes the execution time of CPU to increase and the hard disk performs with maximum level of RPM, which causes an decrease of the R/W time of the hard disk. Then the execution time of the CPU and the R/W time of the hard disk are calculated with these new amounts according to Eq. (6) and Eq. (9)[16]. If the sum of the execution time of the CPU and the R/W time of the hard disk is less than Dt- Rt (task is not missed), it means in addition to prolonging the execution time of the CPU, maybe we can also prolong the R/W time of the hard disk, so the remaining time will be calculated from Eq. (5).
RE t = D t - (E tcpu +RW tHDD ) (5)
Based on the sum of the REt from Eq. (5), and the
RWt , the new R/W time of the hard disk is calculated. According to the Eq. (6) and the new R/W time of the hard disk, the rotational delay time will be calculated.
RW tHDD =RD t + AS t +T t (6)
-
1: Input : R t , D t , E t cpu ,RW t HDD , F cpu , F max-cpu , F min-cpu AS t , T t , RPM
-
2: Output : E ttask
-
3: RPM = RPMmax max
-
4: F cpu = F min-cpu
-
5: Use Eq. (6) to calculate RWt
-
6: Use Eq. (9) to calculate Et
-
7: If E tcpu +RW tHDD < D t - R t then
-
8: Use Eq. (5) to calculate REt
-
9: RD t = (RW t HDD + RE t ) - (AS t +T t )
-
10: Use Eq. (7) to calculate RPM
-
11: Compare calculated RPM with 4 levels RPM
-
12: Assign the first RPM level that is greater than
calculated RPM
-
13: Use Eq. (6) with ideal RPM level to calculate
RW t HDD
-
14: else if E tcpu +RW tHDD > D t - R t then
-
15: Use Eq. (8) to calculate EXt
-
16: CPU frequency changes to F ideal (from Eq. (10))
-
17: If F ideal > F max-cpu then
-
18: F ideal = F max-cpu
-
19: end if
-
20: Use Eq. (9) with ideal Fcpu to calculate Et
-
21: end if
-
22: E t task = E t cpu + RW t HDD
-
Fig.4. FF-LR algorithm
The desired RPM will be obtained from Eq. (7).
RPM = ( 1 × 60)/ RD t (7)
Then this new RPM will be compared with the levels of RPM and the first RPM level that is greater than the calculated RPM will be considered as the desired RPM value. Finally the new R/W time of the hard disk will be calculated with this RPM.
If the sum of the execution time of the CPU and the R/W time of the hard disk is more than Dt- Rt (missed task), the extended period of time will be calculated from the deadline that is defined as:
EX t = (E tcpu +RW tHDD )- D t (8)
The execution time of the CPU when frequency is minimum will be calculated from Eq. (9).
E t cpu
_ sN=i CPi i
F cpu
Where N and CPI represent the total number of instructions and Clock cycle Per Instruction, respectively. In addition, the execution time of the CPU can be calculated by the current execution time of the CPU, the minimum frequency and the current frequency. According to calculated Et and EXt , the ideal CPU frequency will be obtained (Higher frequency) which is defined as follows:
р , ,=
1 ideal
F - xR min-cpu tcpu
E t cpu-EX t
If this obtained frequency is more than the maximum CPU frequency, the maximum frequency will be selected as ideal. Consequently the new execution time of the CPU is calculated from Eq. (9) according to the new frequency. Finally according to these obtained execution time of the CPU and R/W time of the hard disk, the new execution time of the task will be calculated.
B.II. Energy Consumption of Hard Disk is more than that of the CPU
-
1: Input : R t , D t , E t cpu ,RW t HDD , F cpu , F max- C p u, F min-cpu , AS t , T t , RPM
-
2: Output : E ttask
-
3: RPM = RPMmln
-
4: F cpu = F max-cpu
-
5: Use Eq. (6) to calculate RWt
-
6: Use Eq. (9) to calculate Et
-
7: If E tcpu +RW tHDD < D t - R t then
-
8: Use Eq. (5) to calculate REt
-
9: CPU frequency changes to Fideal (from Eq. (11))
-
10: If F ideai < F min-cpu then
-
11: F ldeal = F mln-cpu
-
12: end if
-
13: Use Eq. (9) with ideal Fcpu to calculate Et
-
14: else if E tcpu +RW tHDD > D t - R t then
-
15: Use Eq. (8) to calculate EXt
-
16: Rd. = (RW t HDD - EX t ) - (AS t +T t )
-
17: Use Eq. (7) to calculate RPM
-
18: Compare calculated RPM with 4 levels RPM
-
19: Assign the first RPM level that is greater than
calculated RPM
-
20: Use Eq. (6) with ideal RPM level to calculate
RW t
HDD
-
21: Use Eq. (5) to calculate REt
-
22: If RE t > 0 then
-
23: CPU frequency changes to Fideal(from Eq.
(11))
-
24: Use Eq. (9) with ideal Fcpu to calculate Et
-
25: end if
-
26: end if
-
27: E t task = E t cpu + RW t HDD
Fig.5. FR-LF algorithm
In Fig.5 first the RPM of the hard disk is set to minimum and the frequency of the CPU is set to maximum. Then the execution time of the CPU and the R/W time of the hard disk are calculated with these new amounts according to Eq. (6) and Eq. (9). If the sum of the execution time of the CPU and the R/W time of the hard disk is less than the Dt- Rt(task does not miss), it means in addition to the prolongation of the R/W time of the hard disk, we can also prolong the execution time of the CPU, so this remaining time will be calculated form Eq. (5).
According to calculated Et and REt, the ideal CPU frequency will be obtained (lower frequency) which is defined as follows:
p 1 , — ideal
F max-cpu ×E tcpu
E t cpu+RE t
If this obtained frequency is less than minimum CPU frequency, minimum frequency will be selected. Finally the new execution time of the CPU will be calculated according to the new frequency.
If the sum of the execution time of the CPU and the R/W time of the hard disk is more than Dt- Rt (missed task), the extended period of time will be calculated from the deadline according to Eq. (8). Then based on subtraction of the RWt from the EXt, the new R/W time of the hard disk is calculated. According to the Eq. (6) and the new R/W time of the hard disk, the rotational delay time will be calculated. The desired RPM will be obtained from Eq. (7).
As a result, the new R/W time of the hard disk will be calculated according to the ideal RPM level. Finally, according to obtained execution time of the CPU and R/W time of the hard disk, the new execution time of the task will be calculated.
If the task is not initially missed, after applying our algorithms, we will have a task with an execution time which approaches the deadline, therefore the energy consumption of CPU and/or hard disk is reduced as much as possible, otherwise the execution time of the task is decreased until the deadline.
-
IV. Performance Evaluation
This section presents the results of our proposed algorithm. Table2 summarizes the specifications of CPU and hard disk that are used in our simulation. We used Matlab software for evaluating our proposed algorithm. 50 tasks were randomly generated of which 10% were initially missed. Fig.6 shows the average execution time of the tasks prior and subsequent applying our algorithm. After applying the algorithm, the average execution time of the tasks increases (because most of them were not initially missed). This algorithm could extend the execution time of the CPU and/or the R/W time of the hard disk up until the deadline. Therefore the energy consumption is reduced by about 25%, which is very significant (Fig.7). Also the execution time of each separate task can be seen in Fig.8 prior and subsequent applying the algorithm.
Real Time Scheduling for CPU and Hard Disk Requirements-Based Periodic
Task with the Aim of Minimizing Energy Consumption

Fig.6. Average execution time of task

Fig.7. Average energy consumption

Number of tasks
Fig.8. Execution time of tasks
Fig.9 shows the number of tasks that are missed prior and subsequent to the algorithm execution in which the number of the missing tasks is reduced by 80%. The amount of RPMs of the hard disk and frequencies of the CPU are shown in Fig.10. As shown in Fig.10. (a) and Fig.10. (b) the frequency of the CPU and the RPM of the hard disk in most of the tasks reduced to a minimum, respectively. Their respective average values before and after applying our algorithm are also shown in Fig.11. In this figure a reduction in the values of the CPU frequency and the RPM of the hard disk can be observed after running the algorithm.
Table 2. Specification of CPU and hard disk drive
HP hard drive |
|
Name |
Value |
Capacity |
300,000MB |
Height |
0.62 in (15.6 mm) |
Width |
2.98 in (75.7 mm) |
Depth |
4.67 in (118.7 mm) |
Interface |
SAS |
Transfer Rate Synchronous(Maximum) |
6 Gb/sec |
Physical Configuration |
Bytes/Sector 512 Logical Blocks 585,937,500 Rotational Speed: 5400(Min), 7200, 10,000 and 15,000(Max)rpm |
Operating Temperature(System Inlet Air Temperature) |
50° to 95° F (10° to 35° C) |
Number of Platters |
2 |
Intel Pentium M Processor |
|
Name |
Value |
High Frequency Mode(HFM) |
Frequency 1.6 GHz Voltage 1.484V TDP(Thermal Design Power) 24.5w |
Low Frequency Mode(LFM) |
Frequency 600 MHz Voltage 0.956V TDP(Thermal Design Power) 6w |

Fig.9. Number of missed tasks

(a) CPU frequency

(b) RPM of hard-disk
Fig.10. (a) The values of CPU frequencies and (b) RPM of hard-disk, before and after applying algorithm
z
У 1.1

■ Before running presented algorithm ■ After running presented algorithm
(a) Average frequency

(b) Average RPM
Fig.11. (a) Average CPU frequency and (b) Average RPM of hard disk drive before and after applying algorithm
-
V. Conclusion And Future Work
In this paper we have presented a novel scheduling algorithm in order to reduce energy consumption in a real time periodic task with CPU and hard disk requests. To achieve this goal, the execution time of the CPU and/or the R/W time of the hard disk must be changed according to the remaining time and consumed energy. In the future study we intend to propose a new algorithm with the aim of minimizing energy consumption with a minimal performance reduction in multitask-multicore processes.
Список литературы Real Time Scheduling for CPU and Hard Disk Requirements-Based Periodic Task with the Aim of Minimizing Energy Consumption
- C.M. Kamga, “CPU Frequency Emulation Based on DVFS,” In Utility and Cloud Computing (UCC), 2012, pp. 367– 374.
- S.J. Cho, S.H. Yun, J.W. Jean, “A power saving DVFS algorithm based on Operational Intensity for embedded systems,” In IEICE Electronics Express, vol. 12, no. 3, Jan. 2015, pp. 1-7.
- Ch. Da-Ren, Ch. Young-Long, Ch. You-Shyang, “Time and Energy Efficient DVS Scheduling for Real-Time Pinwheel Tasks”, in Journal of Applied Research and Technology, vol. 12, Issue. 6, Dec. 2014, pp. 1025- 1039.
- Z. Tang, L. Qi, Z. Cheng, K. Li, S.U.Khan, K. Li, “An Energy-Efficient Task Scheduling Algorithm in DVFS-enabled Cloud Environment,” in Journal of Grid Computing, April. 2015.
- N. Babaii Rizvandi, J. Taheri, A.Y. Zomaya, “Some observations on optimal frequency selection in DVFS-based energy consumption minimization,” In Journal of Parallel and Distributed Computing, vol. 71, Issue 8, 2011, pp. 1154-1164.
- G.V. Laszewski, L. Wang, A. J.Younge, X. He, “Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters, In Cluster Computing and Workshops, 2009, pp. 1 – 10.
- G.M. Tchamgoue, J. Seo, K.H. Kim, Y.K. Jun, “Compositional Power-Aware Real-Time Scheduling with Discrete Frequency Levels,” In Journal of Systems Architecture, 2015.
- J. Wu, “Energy-Efficient Scheduling of Real-Time Tasks with Shared Resources,” In Future Generation Computer Systems, May. 2015.
- X. Zhu, C. He, K.Li, X. Qin, “Adaptive energy-efficient scheduling for real-time tasks on DVS-enabled heterogeneous clusters,” In Journal of Parallel and Distributed Computing, 2012, pp. 751-763.
- Y. Zhang, R. Guo, “Power-aware fixed priority scheduling for sporadic tasks in hard real-time systems,” In Journal of Systems and Software, vol. 90, 2014, pp. 128-137.
- F. Kong, Y. Wang, Q. Deng, W. Yi, “Minimizing Multi-Resource Energy for Real-Time Systems with Discrete Operation Modes,” In Real-Time Systems (ECRTS), 2010 22nd Euromicro Conference on, 2010, pp. 113 –122.
- T. Inoue, A. Aikebaier, T. Enokido, M. Takizawa, “A Power Consumption Model of a Storage Server, “ In Network-Based Information Systems (NBiS), 2011, pp. 382 – 387.
- A. Hylick, R. Sohan, A. Rice, B. Jones, “An Analysis of Hard Drive Energy Consumption,” In Modeling, Analysis and Simulation of Computers and Telecommunication Systems, 2008, pp. 1 – 10.
- X. Mountrouidou, A. Riska, E. Smirni, “Saving power without compromising disk drive reliability,” In Green Computing Conference and Workshops (IGCC), 2011, pp. 1– 6.
- V. Swaminathan, K. Chakrabarty, S.S. Iyengar, “Dynamic I/O Power Management for Hard Real-time Systems,” In Hardware/Software Codesign, 2001, pp. 237 – 242.
- M. Pedram, K. Choi, “Dynamic Voltage and Frequency Scaling for Energy-Efficient System Design,” In the Association for Computing Machinery, 2005.
- E. Grochowski, R.D. Halem, “Technological impact of magnetic hard disk drives on storage systems,” In IBM SYSTEMSJOURNAL, vol. 42, no. 2, 2003.