Clairvoyance and online scheduling in real-time ... - Springer Link

11 downloads 11086 Views 379KB Size Report
Oct 12, 2013 - Keywords Energy harvesting · Online scheduling · Optimality · Clairvoyance ... We recently proved in Chetto and Queudet (2013) that EDF is still the best non- .... Audrey Queudet graduated in Computer Engineering at Polytechnic ... PhD degree in computer science from the University of Nantes in 2006.
Real-Time Syst (2014) 50:179–184 DOI 10.1007/s11241-013-9193-1

Clairvoyance and online scheduling in real-time energy harvesting systems Maryline Chetto · Audrey Queudet

Published online: 12 October 2013 © Springer Science+Business Media New York 2013

Abstract Real-time energy harvesting systems are designed using a microprocessor, a rechargeable energy storage unit and an energy harvester. The theoretical analysis shows that an optimal solution to the underlying online scheduling problem requires time lookahead which can be incompatible with the common stochastic nature of ambient energy. Keywords Energy harvesting · Online scheduling · Optimality · Clairvoyance 1 Introduction Several technologies for environmental energy harvesting have been demonstrated including solar and vibrational energies and many others are being developed (Priya and Inman 2009). Batteries or supercapacitors can be used for energy storage. In this paper, we consider a Real-Time Energy Harvesting (RTEH) system in which jobs have to meet deadlines. We consider underloaded settings i.e. there exists at least one valid schedule for the job set with the given energy source and energy storage unit. A scheduling algorithm is clairvoyant if it has an a priori knowledge of both the jobs arriving in the system and the entire profile of energy produced by the source. In this paper, we show that no non-clairvoyant online algorithm is optimal. Hence, the most common non-idling on-line priority scheduling algorithms such as Earliest Deadline First (EDF) (Liu and Layland 1973) are not competitive anymore for RTEH systems. We recently proved in Chetto and Queudet (2013) that EDF is still the best nonidling scheduler. With possible lookahead, an online algorithm is time lookahead-ld if ld is the length of time segment that the scheduler can foresee at any time (Coleman and Mao 2002). We show that optimality can be achieved by a lookahead-D online

B

M. Chetto ( ) · A. Queudet IRCCyN Institute, University of Nantes, Nantes, France e-mail: [email protected]

180

Real-Time Syst (2014) 50:179–184

scheduler with an interval limited to the longest relative job deadline D. Remarkably, Moser et al. (2007) and Chetto (2013) provided lookahead-D algorithms which achieve optimality. The rest of the paper is organized as follows. The model is presented in Sect. 2. Optimality analysis successively under non-clairvoyance and time lookahead hypotheses for online scheduling is described in Sect. 3. We review related work in Sect. 4. Section 5 provides discussion and conclusion.

2 System architecture The target energy harvesting system consists of one processing element, an energy source module and an energy storage module. The processing element supports only one operating frequency. It consumes negligible energy when it does not execute jobs. A four-tuple (ri , Ci , Ei , di ) for a real-time job τi gives its release time, worst case execution time, worst case energy consumption and absolute deadline respectively. D denotes the longest relative job deadline. A job can be preempted and later resumed, at no time or energy cost. We assume that each job consumes energy with arbitrary power consumption rate. Let Ep (t) be the total energy produced over [0, t] by the power source. It incorporates all losses caused by power conversion and charging process. The energy produced on [t1 , t2 ) is denoted Ep (t1 , t2 ). The energy produced by the harvester in any unit of time never exceeds the energy consumed in one unit of time (i.e. all the jobs are discharging). The total energy consumed by jobs from 0 to t is denoted Ec (t). Our system uses an ideal energy storage unit with a nominal capacity E. The energy level at time t is denoted E(t). The stored energy may be used at any time later and does not leak any energy over time.

3 Optimality analysis We prove that energy shortage (i.e. the situation where the available energy is not sufficient to execute all future released jobs timely, unless to make the processor idle for a while) should be imperatively anticipated to avoid a deadline missing. In other terms, optimal scheduling requires clairvoyance and idling capabilities. Theorem 1 Optimal non-clairvoyant online scheduling algorithm cannot exist for the RTEH model. Proof We just need to give an example illustrating that a valid schedule cannot be produced by any online algorithm (idling or non-idling) although a valid schedule exists. Note that for simplicity and without loss of generality, we may assume hereafter that jobs consume energy with constant power given by Ei /Ci . Let us consider job τ1 given by (r1 = 0, C1 = 1, E1 = 1, d1 = 3). We assume that E(0) = 3. The profile of the energy source is such that: Ep (0, 2) = 0 and Ep (2, 3) = 1. At time 0, there are two scheduling possibilities: to execute τ1 or to let the processor idle.

Real-Time Syst (2014) 50:179–184

181

Fig. 1 Illustration of non-optimality due to (a) energy constraints and (b) time constraints

Case 1 (see Fig. 1(a)): We consider an online algorithm such as EDF which is nonidling and consequently schedules τ1 . At time 1, τ1 completes successfully and the energy in the storage is 2 energy units. We assume that job τ2 arrives, with the following parameters: r2 = 1, C2 = 1, E2 = 3, d2 = 2. As the energy consumption of τ2 is equal to 3, τ2 stops before completing execution because of no sufficient energy in the storage unit. However, a valid schedule could be obtained as follows: Interval [0, 1] is let idle although τ1 is ready for execution. Then, the energy in the storage unit at time 1 is 3 energy units. τ2 executes successfully and completes at time 2 where the energy in the storage unit falls to zero. However, as the energy produced over [2, 3] is 1 energy unit, job τ1 can be executed and completes at time 3. Case 2 (see Fig. 1(b)): We decide to let the processor idle in the interval [0, 1]. The energy in the storage unit at time 1 is 3 energy units. We assume that job τ2 arrives, with the following parameters: r2 = 1, C2 = 2, E2 = 3, d2 = 3. Whatever the priority order, it is impossible to execute until completion both τ1 and τ2 before common deadline at time 3. However, a valid schedule could be obtained as follows: At time 1, τ1 completes when τ2 is released and the energy in the storage unit is 2 energy units. At time 2, the available energy is now 0.5 and due to energy production over [2, 3], τ2 completes at time 3.  What the previous example shows is that lookahead does help. We now prove that energy shortage should be anticipated enough early by the scheduler to avoid a deadline missing. Theorem 2 No online time lookahead-ld scheduling algorithm is optimal for the RTEH model if ld < D. Proof We consider an arbitrary online algorithm A and two jobs τ0 and τ1 such that r0 = 0, d0 = D, r1 = D − 2α, d1 = D − α where 0 < α < D can be arbitrarily small (see Fig. 2). The optimal scheduler OP T foresees D time units and produces a valid

182

Real-Time Syst (2014) 50:179–184

Fig. 2 (a) Arbitrary online algorithm A versus (b) Optimal online algorithm OP T

schedule. A foresees less than D time units and cannot foresee the arrival of τ1 at time D − 2α for a sufficiently small enough α. We prove that A cannot produce a valid schedule. We assume that E0 = E1 , C0 = C1 = α, E(0) = E0 , Ep (0, d1 ) = 0 and Ep (d1 , D) = E0 . A starts τ0 at time 0. τ0 completes at time α. But A misses τ1 since the energy storage is exhausted until d1 . OP T completes both jobs: The amount of energy available between 0 and d1 given by E(0) + Ep (0, d1 ) is strictly equal to the energy requirement of τ1 . OP T lets the processor idle until time r1 . τ1 completes successfully at d1 . Then τ0 executes successfully between d1 and D. Assume that the only job τ0 ready to be executed at a given time is one with the longest relative deadline, namely D. So, an optimal solution could be obtained only if clairvoyance is at least D time units.  Theorem 2 establishes a lower bound on the clairvoyance interval required by any optimal scheduler. The longest relative job deadline appears as a key parameter of the application. It will help to determine how to characterize the ambient energy since it is necessary to match the prediction capabilities.

4 Related works EDF is no longer optimal and non-competitive for the RTEH model and it turns out to be the best non-idling scheduler (Chetto and Queudet 2013). The Lazy Scheduling algorithm, namely LSA, provides an optimal solution with time lookahead-D on the energy incoming (Moser et al. 2007). The energy demand of a job and its actual execution time are assumed to behave proportional. With respect to our model, every job τi satisfies Ei = K.Ci where K represents the processing power. Actually, instantaneous power consumed by jobs varies along time depending on circuitry and devices required by their execution. This observation motivates the study for our general model.

Real-Time Syst (2014) 50:179–184

183

5 Conclusion A large number of RTEH systems operate in a cyclic basis where jobs execute repeatedly (e.g. for sensing) with predictable arrival times and deadlines. When the energy source is uncontrolled and unstable, the central issue is: Do the existing predictive models for the harvester allow of lookahead with accuracy and acceptable overhead for at least the longest relative job deadline of the application? When the incoming ambient energy or the job arrivals have a pure stochastic nature, only a non-clairvoyant online algorithm could compute a necessarily sub-optimal solution. In that case, non-conservative EDF remains an attractive scheduler owing to easy implementation and no need for estimating the stored and/or harvested energy. We are currently working on performing a competitive analysis in order to study the impact of partial clairvoyance. This work relies on the comprehensive study provided by Devadas et al. (2010) which presented a competitive analysis of online realtime schedulers for energy-constrained environments.

References Chetto M (2013) Optimal scheduling for real-time jobs in energy harvesting computing systems. Technical report, IRCCyN Institute, University of Nantes, France Chetto M, Queudet A (2013) A note on EDF scheduling for real-time energy harvesting systems. IEEE Trans Comput, http://doi.ieeecomputersociety.org/10.1109/TC.2013.21 Coleman B, Mao W (2002) Lookahead scheduling in a real-time context. In: Proceedings of the sixth international conference on computer science and informatics, Durham, NC, USA, pp 205–209 Devadas V, Li F, Aydin H (2010) Competitive analysis of online real-time scheduling algorithms under hard energy constraint. Real-Time Syst 46(1):88–120 Liu C-L, Layland J-W (1973) Scheduling algorithms for multiprogramming in a hard real-time environment. J Assoc Comput Mach 20(1):46–61 Moser C, Brunelli D, Thiele L, Benini L (2007) Real-time scheduling for energy harvesting sensor nodes. Real-Time Syst 37(3):233–260 Priya S, Inman D-J (2009) Energy harvesting technologies. Springer, New York

Maryline Chetto received the degree of Docteur de 3ième cycle in control engineering and the degree of Habilitée à Diriger des Recherches in Computer Science from the University of Nantes, France, in 1984 and 1993, respectively. From 1984 to 1985, she held the position of Assistant professor of Computer Science at the University of Rennes, while her research was with the Institut de Recherche en Informatique et Systèmes Aléatoires, Rennes. In 1986, she returned to Nantes and is currently a Full Professor with the Institute of Technology of the University of Nantes. She is conducting her research at IRCCyN Institute in the Real Time Systems Group. She has published more than 100 journal articles and conference papers in the area of real-time operating systems. Her current research interests include scheduling and power management for real-time energy harvesting applications.

184

Real-Time Syst (2014) 50:179–184 Audrey Queudet graduated in Computer Engineering at Polytechnic School of the University of Nantes (France), in 2002. She received her PhD degree in computer science from the University of Nantes in 2006. From October 2006 to August 2007, she was a post-doctoral researcher at Polytechnic University of Valencia in Spain. Since September 2007, she is an Associate Professor at the University of Nantes and is conducting her research at IRCCyN institute, Nantes, France. Her research interests include real-time scheduling theory, aperiodic service mechanisms, quality of service scheduling, non-blocking synchronization protocols based on transactional memory, and Linux-based real-time operating systems and applications.