Abstract
Ambient energy harvesting also known as energy scavenging is the process where energy is obtained from the environment, converted, and stored to power small devices such as wireless sensors. We present a variant of EDF scheduling algorithm called EH-EDF (Energy Harvesting-Earliest Deadline First). Decisions are taken at run-time without having prior knowledge about the future energy production and task characteristics. We gauge the performance of EH-EDF by means of simulations in order to show its benefits. We evaluate and compare several variants of EH-EDF in terms of percentage of feasible task sets. Metrics such as average length of the idle times are also considered. Simulations tend to demonstrate that no online scheduler can reach optimality in a real-time energy harvesting environment.
1. Introduction
An algorithm is said to be nonclairvoyant if its scheduling decisions are taken at run-time with no prior knowledge about the characteristics of the future tasks [1]. Consequently, a nonclairvoyant scheduling algorithm is necessarily online. The problem of online scheduling in real-time systems has been a fertile ground for theoretical research for many years.
There are many real-time applications concerned with nonpredictability and consequently with nonclairvoyant scheduling. In that system, periodic and aperiodic tasks coexist. Periodic tasks typically arise from sensor data or control loops at regular intervals. In contrast, aperiodic tasks generally arise from arbitrary events (external interrupts).
When considering real-time systems that take time as the only limiting factor, it is important to differentiate between underloaded and overloaded real-time systems. A real-time system is said to be underloaded if there exists a feasible schedule for the workload; that is, the deadlines of all tasks are met under timing constraints. On the contrary, overloaded real-time systems do not have a feasible schedule where all tasks meet their deadlines. Thus, the objective will be to optimize some criteria such as the ratio of deadline success.
In addition, real-time systems can be classified into three categories: hard, soft, and weakly hard. In hard real-time systems, all tasks must be guaranteed to complete within their deadlines. For soft real-time systems, it is acceptable to miss some of the deadlines occasionally with additional value for the system to finish the task, even if it is late. In weakly hard real-time systems, tasks are allowed to miss some of their deadlines but there is no associated value if they finish after the deadline.
Real-time task scheduling determines the order in which tasks have to be executed. The well-known scheduling algorithm is the Earliest Deadline First (EDF) algorithm [2]. EDF schedules at each instant of time
Nowadays, energy management is becoming the central topic of research in real-time systems. In today's applications, most real-time embedded systems are powered by batteries. Therefore, great interest has risen in powering these systems by renewable energy sources. Many energy harvesting methods can be used to harvest energy from a controlled or ambient environment either to power devices directly or to store the energy in capacitors or batteries for later use. Radio-frequency- (RF-) powered systems, solar-powered systems, wind-powered systems, motional energy harvesting systems, thermoelectric-powered systems, and piezoelectric conversion systems are examples of such methods. These harvesting methods support a wide range of applications such as Heliomote [3] and Prometheus [4] and can also be used to increase the lifetime of preexisting devices.
Recently, we addressed the scheduling problem for a uniprocessor platform that is powered by a renewable energy storage unit and uses an harvester such as photovoltaic cells. We presented a scheduler called EDeg (Earliest Deadline with energy guarantee) [5]. The set of tasks is perfectly known offline as in applications where all the tasks run periodically. EDeg is clairvoyant since it must know in advance both the energy source profile and the characteristics of the tasks (arrival time).
To extend the applicability of EDeg scheduling framework, we need to adapt it to situations where the scheduler has to take decisions without a priori knowledge of the future. For real-time energy harvesting applications, a scheduling algorithm will be nonclairvoyant if, in addition, it ignores the incoming environmental energy in the future. We may imagine an application where either the set of tasks or the future energy profile is known but not both.
We focus here on on-line nonclairvoyant scheduling in an underloaded real-time energy harvesting system that executes aperiodic tasks on a uniprocessor platform. We propose a scheduling algorithm named Energy Harvesting-Earliest Deadline First (EH-EDF) which extends the well-known EDF algorithm. We modify EDF so as to count for the limitation of energy. We benefit from a slack-based method to let the processor idle and thus to recharge the energy storage unit as much as possible without violating deadlines.
The remainder of the paper is organized as follows. In the next section, we summarize the related work. The system model and necessary terminology are introduced in Section 3. In Section 4, we present the fundamental concepts about the slack time. Section 5 describes our scheduling scheme, EH-EDF, with some indications about practical issues. Section 6 illustrates the simulation study, whereas the preliminary results are presented in Section 7. Section 8 concludes the paper and gives some new directions for future work.
2. Literature Review
Most of the previous research work around real-time scheduling disregards energy management or assumes that the energy is not a limiting factor for task execution.
Energy consideration is now added as a crucial issue because of the great advances in both hardware and software technology. This enables system designers to develop large, complex embedded systems. Such systems consume a large amount of power and rely mainly on a limited energy storage. Many technical challenges lie ahead in order to make an energy harvesting system work effectively. Among them is to either minimize the total energy consumption without violating deadlines or maximize the performance of hard energy constrained systems with a fixed energy budget.
With the goal to minimize the total energy consumption, Pillai and Shin [6] present several novel algorithms for real-time dynamic voltage scaling called real-time DVS (RT-DVS). They modify the OS's real-time scheduler and task management service in order to achieve significant energy savings without violating deadlines. Later, Aydin et al. [7] address the problem of power-aware scheduling for periodic tasks with the aim to reduce CPU energy consumption by the help of dynamic voltage scaling. The authors propose an offline algorithm to compute the optimal speed, assuming worst-case workload for each arrival. An online speed reduction mechanism is introduced to recompute energy based on the actual workload. The third component in this solution is to perform a speculative speed adjustment mechanism based on the expected workload. Unlike the work in [6], Aydin et al. [8] take into account the frequency-dependent and -independent power components as well as the power consumption of components other than the CPU when addressing the problem of minimizing overall energy consumption.
Many other studies address the ways to maximize the system performance of underloaded real-time systems that have to operate under a fixed energy budget.
Moser et al. [9] give an optimal scheduling algorithm called LSA for tasks with deadlines, periodic or not, that run on a monoprocessor device that is powered by a rechargeable storage unit. They consider that the source power is predictable but time varying. LSA can be considered as an idling variant of EDF. The system starts executing a task only if the task has the earliest deadline among all ready tasks, and the system can keep on running at the maximum power until the deadline of the task. In that work, the consumption power of the computing system is characterized by some maximum value which implies that for every task, its total energy consumption is directly connected to its execution time through the constant power of the processing device. The main disadvantage of this work lies in that the LSA algorithm executes tasks at full power. Moreover, in practice, the total energy consumed by a task is not necessarily proportional to its execution time.
In [5], we relax the restrictive hypothesis that links energy requirement and execution time of tasks. We present a scheduling algorithm called EDeg (Earliest Deadline with energy guarantee). Simply executing tasks according to the EDF rule either as soon as possible (EDS) or as late as possible (EDL) may lead to violate some deadlines. EDeg executes tasks according to the EDF rule with idling phases and relies on two fundamental concepts, namely, slack time and slack energy. Before authorizing a task to execute, we must ensure that the energy availability will permit to execute all future occurring tasks and the current highest priority one. When this condition is not verified, the processor has to stay idle so that the storage unit recharges as much as possible and as long as all the deadlines can still be met despite execution postponement. In [10], we prove the efficiency of this scheduler through a simulation study. EDeg is clearly clairvoyant since it needs both the characteristics of the future occurring tasks and prediction about the future incoming energy.
3. System Model and Terminology
3.1. Task Set
We consider a set of aperiodic tasks that execute on a uniprocessor platform as depicted in Figure 1. Each task is known by the system at the time of its arrival. An aperiodic task set can be denoted as follows:

Real-time energy harvesting system.
Definition 1.
The processor load
Definition 2.
The energy load
3.2. Energy Source
We assume that the ambient energy is harvested and converted into electrical power. We cannot control the energy source but we can predict the expected availability with a lower bound on the harvested source power output, namely,
3.3. Energy Storage
We consider an ideal energy storage unit (supercapacitor or battery) of nominal capacity
At some time
4. Fundamental Concepts
4.1. Slack Time
The slack time of a hard deadline task set at current time
Let us consider a task set
It comes that the slack time of the system at time
4.2. Illustrative Example 1
Consider a task set
Figure 2 describes the resulting schedule where the processor is let idle from time 6 during a time interval whose length equals the slack time. We note that

Computing the slack time at
4.3. Illustrative Example 2
Consider the same task set as in Section 4.2. Nevertheless, we add a task

Updating the slack time at
As the deadline of
By the help of (5), we have
Now, we are prepared to introduce a new online scheduler specifically adapted to aperiodic tasks in an energy harvesting context.
5. The EH-EDF Scheduling Algorithm
In this section, the scheduler ignores the future energy production and the future arrival times of tasks.
5.1. Presentation of the Scheduler
The intuition behind EH-EDF algorithm is to schedule aperiodic tasks as soon as possible according to EDF. When a new task arrives, it is inserted in the ready task list. When the energy in the storage unit reveals to be insufficient for executing tasks, the only solution consists in postponing them as much as possible. We have to perform the computation of the slack time of the system from the ready task list. The scheduler lets the processor idle until the energy storage unit replenishes or the slack time becomes zero.
The slack time is updated whenever a new task arrives even in the recharging phase. The processor continues idling as long as the system has slack.
We propose the so-called
The major components of the EH-EDF algorithm are
The framework of the EH-EDF scheduling algorithm is as Algorithm 1.
Scheduled according to energy level of the battery (1) (2) (3) (4) execute() (5) (6) (7) wait() (8) (9) (10) (11) wait() (12) (13)
From the EH-EDF framework, we notice that tasks do not run after
Therefore, we waste recharging power only when there are no pending tasks in the ready list and the storage unit is full.
5.2. Illustrative Example
Consider a task set
When applying EH-EDF (Figure 4) to

Example on EH-EDF scheduling.
In details, the energy storage is full at time 0. The highest priority task
At time 11, the energy storage is equal to 10 energy units, and
At time 17,
In contrast to EDF, EH-EDF feasibly schedules the task set
6. Simulation Study
This section describes experiments that have been conducted to evaluate the Energy Harvesting-EDF (EH-EDF) algorithm. To measure the effectiveness of EH-EDF, we develop a discrete-event simulation in C/C++. We report a performance analysis which consists of five experiments.
The simulation environment consists of a simulation kernel (scheduler) with a number of components involved in the management and analysis of simulations. The main components are the task generator, the scheduler, and the CPU.
The generator of aperiodic tasks has been designed to accept the following input parameters: the number of desired tasks
Simulation results are then ordered to excel files to be stored and analyzed.
6.1. Formal Definition of Scheduling Strategies
For the sake of comparison, we implement five energy harvesting scheduling policies where aperiodic tasks execute as soon as possible according to EH-EDF: when the battery empties, the processor is put into sleep mode until the battery replenishes or the slack time becomes zero. EH-EDF EH-EDF1: when the battery empties, the processor is put into sleep mode until the energy level reaches a threshold value, namely, EH-EDF2: when the battery empties, the processor is put into sleep mode until the slack time becomes zero regardless of the energy level. EH-EDF3: there are two threshold parameters, namely,
6.2. Measurement Support
6.2.1. Aperiodic Task Sets Generation
We use a simulator that generates 50 tasks with maximum deadline equal to 3360. The worst-case computation times are set according to the processor load
6.2.2. Energy Parameters Generation
The energy consumptions of tasks (WCEC) are randomly generated but constrained by the energy load
6.2.3. Simulations Description
We start the simulation with a battery fully recharged (i) percentage of feasible task sets; (ii) the impact of the slack time and energy storage capacity on the performance of EH-EDF; (iii) average idle time corresponding to recharging phases of the energy storage; (iv) energy storage low level.
The above measurements are compared under different scenarios for the five energy harvesting scheduling policies stated previously. These policies cover all the possibilities of the EH-EDF algorithm. We measure the impact of the slack time and energy storage capacity on the performance of EH-EDF, EH-EDF
7. Preliminary Results
7.1. Impact of Parameter x on EH-EDFx
In this section, we experiment on the effect of the slack time (

Effects of parameter

Effects of parameter
When
When
At higher values of processor load, the performance of EH-EDF
In the second experiment, we double the size of the energy storage unit
When
We conclude that the slack time and the energy storage capacity have a great impact on the system performance. As we increase the energy storage size, the mean system life time increases, but without reaching optimality.
7.2. Impact of Parameter
on EH-EDF1
In this section, we experiment on the effect of parameter

Effects of parameter

Effects of parameter
For
As a conclusion, we demonstrate through the previous simulations that the slack time and energy storage capacity have a great effect on the performance of EH-EDF algorithm. In addition, we note that EH-EDF
7.3. Percentage of Feasible Task Sets
In this section, we experiment on task sets which are feasible. Simulations are performed by varying
First, we consider that

Percentage of feasible task sets (
In details, when
Secondly, we double the size of the capacity of the energy storage unit while keeping the other parameters unchanged (Figure 10). As previously, EH-EDF gives a percentage of feasible task sets 11%, 18%, and 24%, respectively, higher than with EH-EDF1, EH-EDF3, and EH-EDF

Percentage of feasible task sets (
As a summary, this experiment shows that it is highly probable that no online algorithm can achieve optimality. In other words, only clairvoyant algorithms that have a complete knowledge of the task properties and energy production can achieve a valid schedule whenever one exists.
7.4. Energy Storage Low Level
In this section, we measure the number of times the energy storage unit empties by varying the processor load. We consider the same values as depicted in Section 7.3. Simulations are performed for

Battery low level (
Furthermore, we note that EH-EDF3 cannot reach the empty state
When the energy storage capacity is doubled, EH-EDF still has the lowest number of energy storage low level (Figure 12). The average number of times the energy storage empties under EH-EDF is, respectively, 32% and 45% less than under EH-EDF

Battery low level (
7.5. Average Idle Time
The average idle time has a great impact when studying the efficiency of EH-EDF especially in systems that use the Dynamic Power Management mechanism (DPM). DPM provides efficiency only if the idle times are sufficiently long because of inherent time and energy overhead induced by state switching. Consequently, the longer is the average idle time, the lower is the impact of the energy and time overheads incurred by DPM on the overall performance.
Moreover, the length of the idle time has a great impact on the life time of the energy storage unit regardless of its type (battery or supercapacitor). Charging any storage unit is not linear and consequently the more it is paused, the more energy it recharges.
In this section, we compute the average idle time by taking two values for

Average idle time
When

Average idle time
8. Conclusions
We studied an energy harvesting sensor node which supports a set of aperiodic tasks with real-time constraints. The arrival times, deadlines, and energy demands of the tasks are not known to the node in advance. We focussed on online scheduling with no lookahead including energy production. We presented and analyzed through an experiment an idling-EDF-based scheduling algorithm called EH-EDF.
Traditional online algorithms such as EDF behave poorly because they consume the energy greedily and not adaptively. We recently proved in [11] that EDF remains the best nonidling scheduler but has a zero competitive factor for the energy harvesting model. We consequently propose several variants of EDF to derive more efficient scheduling solutions.
The experiment demonstrates that EH-EDF offers an acceptable and even good performance in a wide range of situations. We study the impact of the slack time and the threshold energy level on the performance of EH-EDF in terms of percentage of feasible task sets. We show that EH-EDF outperforms EH-EDF1, EH-EDF3, and EH-EDF
Finally, the advantage of the EH-EDF algorithm lies in the average duration of the processor idle times which is higher compared with other heuristics. As a result, leakage and overhead incurred by the implementation of DPM mechanism are avoided under EH-EDF.
The next step of our work will be to extend EH-EDF to the Dynamic Voltage and Frequency Scaling (DVFS) technology.
