Energy harvesting earliest deadline first scheduling algorithm for increasing lifetime of real time systems

ABSTRACT


INTRODUCTION
The role of real time system is increasing in today's scenario. As user needs are changing, real time systems are being used very extensively in a large number of systems. These systems also have been used in the daily life of human such as automatic vehicle driver, automatic control system, navigation system, reservation system, medical fields, weather forecasting system, etc. Many real time devices which are situated in the remote area where charging a battery is not possible through usual resources, energy harvesting is required [1].
Energy harvesting is an approach that allows capturing the energy from natural resources. An unused ambient energy is converted into electrical energy which can be directly used by the system or stored in batteries for further use. Using this approach we can increase the system's lifetime. In energy harvesting real time systems, the main issue is to guarantee that the system does not consume more energy than available and harvested energy at a particular moment [1], [2], [3].
There are several energy harvesting approaches such as solar power (sunlight), wind power, ocean waves, etc. Energy harvesting using solar power is a perfect match for real time devices [2]. Energy is being harvested from sunlight and pass to the energy storage device (battery) or to the system directly. A system can perform continuous functioning if it is getting the required energy directly from the sun [4]. The system stops working if the battery gets discharged. DVS (Dynamic Voltage Scaling) is the well known and most effective approach for energy management in real time systems [2]. Energy consumption can be reduced using DVS by scaling the voltage level on the basis of energy requirement of the system to execute a task. DVS gives the best performance when the energy requirement of a system is less than the available energy, the supply voltage can dynamically be reduced to the lowest possible requirement of energy to operate the system [5], [6].
The main issue in battery operated real time devices is to increase the system lifetime. The lifetime of a system can be increased by proper task scheduling and proper energy management. Many approaches have been designed for energy minimization. As the functioning for a device is increasing, a continuous source of energy is required which is not possible in a real time device working in remote areas. Energy harvesting is best suitable approach in such systems. The lifetime can be increased by using both concept together. In this paper, we are using the concept of energy harvesting for ensuring energy availability of a system and DVS for reducing energy consumption. We investigate an algorithm for minimizing power consumption in energy harvesting real time systems which increase the lifetime. Energy Harvesting Earliest Deadline First Scheduling (EH-EDF) Algorithm for Increasing Lifetime of Real Time Systems has been proposed to increase the task feasibility and minimize energy consumption.
Rest part of the paper is organized as follows: section 2 reviews the related work. Section 3 describes the system models and which include application model, task model, and energy model. In section 4, we formally define the scheduling policies with the problem statement. The EH-EDF scheduling algorithm has been proposed and analyzed in section 5. Section 6 presents the experiment and results and finally section 7 concludes the paper.

RELATED WORK
In past years, researchers focuses on designing online scheduling algorithms for real time systems. The researchers also worked to enhance the task scheduling to overcome the limitation of exiating algorithms. Feasibility of task in real time systems depends on its deadline as timing constraint. Unavailability of energy in these real time systems (working in remote areas) is a big issue. A lot of research has been done to minimize the energy consumption. Dynamic Power Management (DPM) and Dynamic Voltage and Frequency Scaling (DVFS) has been investigated for minimizing energy consumption for battery operated system [7], [8], [9]. These approaches work efficiently with available energy resources. In battery operated systems, a battery has its lifetime. It can't work after discharge. Batteries need to be charged or replaced for continuing the functioning. Replacement of battery is not possible of those systems which are working in remote areas (such as mountains, forests, etc). Replacement of batteries in such real time systems is not possible easily and it is very costly [10], [11], [12], [13].
To overcome the problem of battery life, an energy harvesting approach has been designed by many researchers [1], [14], [15]. The lifetime of such real time system can be enhanced using energy harvesting and the problem of battery charging is also reduced. Uninterrupted power supply can be produced using energy harvesting from sunlight using photovoltaic (PV) cell (solar system). Energy harvesting from sunlight have various characteristics such as the output of solar panel varies in the morning, noon and evening time. The magnitude of energy is very high at noon as compare to morning and evening time. The outputs of such systems also depend upon weather conditions. Good weather condition leads to maximize energy output. To continue operating properly in bad weather condition, morning or evening time, or even in the night, energy storage element such as a rechargeable battery is required [6], [17], [18]. Many researchers also have been presented for energy harvesting in real time systems which work differently from DVFS/DPM [19]. The task scheduling in such systems is also based on EDF [15], [17].
In earlier research, it was considered that energy is not required for scheduling jobs in single processor computing systems [20]. In EDF, the feasibility of each task depends on its deadline. A task which a minimum deadline at that instant is scheduled first. Energy harvesting EDF scheduling algorithms also have been presented for an aperiodic task, which does not consider future energy requirement, energy production and task arrival [21], [22]. Energy shortage should imperatively be anticipated to avoid missing the deadline of tasks. ED-H, a semi-online scheduling algorithm has been presented by Chetto in [14] for optimal scheduling in the energy harvesting computing system in which feasibility test is applied to check optimality.

SYSTEM MODELS
In this section, it is explained the results of research and at the same time is given the comprehensive discussion. Results can be presented in figures, graphs, tables and others that make the reader understand easily [2], [3]. The discussion can be made in several sub-chapters.

Application Model
We consider real time critical applications connected to an energy harvesting system. Real time critical systems contain various tasks such as periodic task, sporadic task, or aperiodic task. Here we consider aperiodic task which contains its arrival time, execution time and deadline. Here we also consider another parameter for energy harvesting. An energy harvesting device collects energy from its environment with some rate. That energy is stored in an energy storage device for future use by real time system.

Task Model
In this paper, we consider a set T = {T1, T2, …, Tn } of n independent, non-preemptive aperiodic tasks scheduled on the uni-processor system. Each task Ti is a collection of 4 tuples <ai, ci, di, Ei>, where ai represents arrival time, ci represents execution time, di is the deadline of a task, and Ei is energy consumption. We consider a single processing unit to schedule the real time task that supports only operating voltage. Its energy consumption is only at the time of operation performing on a task. Another parameter in real time system is utilization Ui. The utilization of task can be defined as Ui=ci/di such that 0≤Ui≤1. The total utilization of task set can be defined as the sum of all task utilizations and it can be expressed as Total Utilization U=∑ U .
The utilization of task and total utilization of n task set should be less than 1. When the utilization U is closed to "1" then the execution of task can't be postponed by the processor.

Energy Model
Energy is the major concern in battery operated real time systems. Energy model can be expressed in three different ways such as energy production model and energy consumption model and energy storage model [5]. a. Energy Production Model: The energy can be produced by an instantaneous charging rate that incorporates all losses. The energy production from a source between time interval [t1 and t2] can be expressed as follows.
Ep (t1, t2)=∫ ( ) Where Ep (t1, t2)=Energy produced between t1 and t2 and ( )=Rate of energy production. b. Energy Consumption Model: Energy consumption of a real time device can be modelled as the sum of static energy consumption and dynamic energy consumption. Real time systems are DVS enabled which can perform at different frequency level. The frequency level of a system is directly proportional to supplied voltage. The frequency level is maximum (fmax) at maximum voltage (Vmax) and frequency level is minimum (fmin) at a minimum voltage (Vmin). Frequency level will increase on increasing the voltage and decrease on decreasing the supplied voltage. The energy consumption Ec(t) at maximum voltage and frequency for a task T can be defined

Ec (t)=Ec (stat)+h {Ec (dep)+Ec (Indp)}
Where Ec (stat) is static energy consumption which can be saved by turning off the whole system, Ec(dep) and Ec(Indp) both are dynamic power consumption which is frequency dependent and independent. The coefficient h=1, If the task executes in the system otherwise h=0. c. Energy Storage Model: Normally battery (energy storage device) is used for energy storage in a system.
We also assume a battery (with maximum capacity EC), is used in the real time system. Harvested energy cannot be more than its capacity. Energy is wasted on continuous charging if the battery is fully charged at time t. A battery can be considered as fully charged if Ep(t1, t2) ≈ EC.

SCHEDULING POLICIES
Static Scheduling: Task set is pre-defined and initially computed for checking the feasible schedule. A processor demand for the task set is defined at starting level. A predefined set of periodic tasks are generated between time interval t1 and t2. The total processor demand of n tasks can be calculated as the sum of execution time of all tasks are expressed by following equations pd(t1, t2) =∑ |{ i = 1,2,…,n} where pd(t1, t2)=Processor Demand between t1 and t2. ci=Execution time Feasibility of task can be checked by comparing processor demand with a deadline. Feasibility of a task Ti is guaranteed if and only if the processor demand (pd) of that task is less than its deadline and slack time of the task is greater than 0. For a task Ti, its deadline di and slack time Si are Where D is the duration of a frame in 1≤ i ≤ k. we can easily say the necessary and sufficient condition for a task, Ti ∈ T, to be feasible is Si ≥ 0. Dynamic Scheduling: In dynamic scheduling, the arrival of the task is not defined and the feasibility of task is decided after its arrival at runtime. If a task Ti arrives at ai with execution time ci and deadline di. Slack time Si(d) for dynamic task Ti at arrival time ai is computing by the following equation.

Si(d) = di -ai -ci -RTi
where RTi is total remaining execution time of higher priority tasks.
In real time energy harvesting systems, the feasibility of a task depends upon slack time and the slack time depends upon available energy. If the system has sufficient energy then it can be run at a maximum voltage which gives maximum slack time. We reduce the voltage level for saving energy to increase the lifetime of a system. The system also harvests energy if it is situated in remote areas where harvesting is only the source of energy. Our aim is to enhance the task feasibility and reduce the energy consumption.

PROPOSED APPROACH
EDF is a traditional scheduling algorithm based on earliest deadline first scheduling policy. Energy minimization is major concern in battery operated real time systems. The task is authorized to execute only if there is sufficient power supply otherwise the low priority task which requires less energy than available energy is scheduled first. The idea behind this paper is to use energy harvesting for regular source of energyand execute the awaiting task by combining both EDF and DVS togather. Theorem 5.1: if Task Ti missed the deadline due to Edi > EAi, there exist no schedule in EDF for a task set T. Proof: if Edi > EAi, directly shows that energy demand for a task is greater than the available energy. The task will not schedule due to less amount of available energy. If the task is not schedulable then there exists no schedule for a task set T. Energy Harvesting EDF algorithm: Theorem 5.1 shows that there exists no schedule if available energy is less than the demand energy. If Ep(t1, t2) is energy produced between interval t1 and t2 Then EAi = EAi (t1)+ Ep(t1, t2) If Edi < EAi There exists a valid schedule for task Ti. The energy demand of a task set T between the time interval t1 and t2 can be defined as Edi(t1, t2) = ∑ Where Ei is energy demand for a task Ti. Available energy of a task set T between the time interval t1 and t2 is computing using the following EAi(t1, t2) = EC + Ep(t1, t2) -Edi(t1, t2) Where EAi(t1, t2) = Available energy after executing T tasks between time interval t1 and t2 EC = the capacity of energy storage device In proposed energy harvesting earliest deadline first (EH-EDF) scheduling algorithm EDF is applied with energy harvesting to schedule the task set. The feasibility of tasks depends upon two factors, absolute deadline ADi and available energy. If a task has smaller execution time than its absolute deadline then the task may be feasible. It then checks the available energy at the time of execution and if the available energy is less than the required energy to execute the task then the task scheduling is feasible.

543
We Applied DVS to increase lifetime by decreasing the voltage level. We reduced the voltage level of the system to schedule a task. The processing time of task will increased on decreasing the voltage and energy consumption reduced. For the task having sufficient deadline, DVS is applied to decrease energy consumption. We can dynamically increase or decrease the voltage level as per system requirement which saves the system energy and enhance the lifetime of the system.

EXPERIMENT & RESULTS
We implemented the proposed approach in C++ and use Jetson TK1 boad to check the task feasibility. Each task contains its arrival time, execution time, deadline and initially available energy. Now suppose EA is available energy at time instant t=0, we compute the utilization of that task. Utilization of the task should be smaller than 1, which means that the task scheduling is feasible. We again check the worstcase execution time of the task and if it is less than the absolute deadline, again task may be feasible. We assume initially battery is full with the capacity (available energy) 100 units and tasks are ready for execution. We assume energy is drained in multiple of 8 units by execution time for each task. We check that energy drained is less than the available energy, which provide a feasible schedule for the task. Each task is scheduled on the basis of the smaller deadline. Figure 1 shows the availability of energy at different time interval and the experiment are done on the assumption of energy harvested at different time interval in good weather conditions. When the system is executing a task some amount of energy is drained and available energy is decreased. After ehergy harvesting the reduction in available energy is less as compared to the reduction without energy harvesting. As there is no source of energy for charging the battery then the continuous consumption of energy discharged the battery and stops the execution of more tasks. Comparison of task scheduling feasibility has been shown in Figure 2. The experiment results shows that the proposed approach scheduled more tasks as compared to existing tasks scheduling algorithms. The tasks scheduling is very low in non harvesting real time systems as compared to energy harvesting real time systems. Task scheduling depends upon available energy which gives the feasible schedule with available energy only. A large number of the task has been scheduled after applying energy harvesting approach. The feasibility of task increased by using energy harvesting and DVS simultaneously. Graph in Figure 2 shows that the proposed approach EH-DVS executes more number of task as compared to existing approaches. As energy capacity is increased the task scheduling ratio is also increased in our proposed approach.

CONCLUSION
To enhance the lifetime of real time system, energy harvesting with dynamic voltage scaling (DVS) is applied. A system works effectively and continuously using energy efficient approach with charging resource. We developed an algorithm which enhanced the lifetime of an energy harvesting real time systems. We applied dynamic voltage scaling and EDF togather and scheduled the task set with energy harvesting. Experiments and results shows that the proposed Energy Harvesting Earliest Deadline First (EH-EDF) Scheduling Algorithm is better and scheduled more task as compared to existing approaches.