<<

2019 57th Annual Allerton Conference on Communication, Control, and (Allerton) Allerton Park and Retreat Center Monticello,Timely IL, USA, September Cloud 24-27, Computing:2019 Preemption and Waiting

Ahmed Arafa1, Roy D. Yates2, and H. Vincent Poor1

1Electrical Engineering Department, Princeton University 2Department of Electrical and Computer Engineering, Rutgers University

Abstract— The notion of timely status updating is investigated in the context of . Measurements of a time- scheduler varying of interest are acquired by a sensor node, and measurements uploads cloud uploaded to a cloud server to undergo some required computa- Tx tions. These computations have random service times that are sensor server independent and identically distributed across different uploads. monitor After the computations are done, the results are delivered to a updates monitor, constituting an update. The goal is to keep the monitor continuously fed with fresh updates over time, which is assessed by an age-of-information (AoI) metric. A scheduler is employed to optimize the measurement acquisition times. Following an Fig. 1. A scheduler decides on when to acquire new measurements by the update, an idle waiting period may be imposed by the scheduler sensor and send them to the cloud server by the transmitter. The server updates the system’s monitor after it completes the required computations. before acquiring a new measurement. The scheduler also has the capability to preempt a measurement in progress if its service ones is viable for AoI minimization in various settings. This time grows above a certain cutoff time, and upload a fresher is mainly owing to the nature of AoI that promotes sending measurement in its place. Focusing on stationary deterministic policies, in which waiting times are deterministic functions of the fresh updates. This is discussed in a queuing framework in instantaneous AoI and the cutoff time is fixed for all uploads, [15]–[17], and more recently in [18] that also extends to it is shown that the optimal waiting policy that minimizes the the case of multiple sources. Different from [15]–[18] that long term average AoI has a threshold structure, in which a new focus on exponential service times, the work in [19] considers measurement is uploaded following an update only if the AoI general service time distributions for multiple Poisson sources grows above a certain threshold that is a function of the service time distribution and the cutoff time. The optimal cutoff is then with preemption. Preemption for general arrival and service found for standard and shifted exponential service times. While time distributions, for a single source, has been recently it has been previously reported that waiting before updating can studied in [20]. Reference [21] characterizes settings for which be beneficial for AoI, it is shown in this work that preemption preemption is age-minimal, subject to energy harvesting con- of late updates can be even more beneficial. straints with Poisson arrivals (of both energy and updates) and I.INTRODUCTION exponential service times. The studies in [22], [23] investigate a similar tradeoff, under different system models, namely, We consider the problem of timely computing. The setting that while preemption lets the system work with the freshest is motivated by some applications in which monitoring a time- information, it leads to restarting service from the beginning. varying process of interest can be computationally demanding. Thus, a decision has to be made on whether to drop the newly Hence, instead of extracting useful information from local arriving updates or switch to them via preemption. Recently, data measurements acquired by sensor nodes, measurements in the context of computing, AoI analysis has been carried are uploaded to a cloud server that can handle heavy-duty out through various tandem queuing models in [24]–[27], and computation tasks, and send them back in the form of updates. through a -specific age metric in [28]. The notion of Computation times, however, are random, and the process sending timely measurements to the cloud has been discussed may have already changed by the time they are done. We in the context of gaming in [29]. therefore investigate the benefits of preempting an upload in In this paper we investigate the tradeoff in [22], [23] in a fresher progress and replacing it by a new, , one. Such fresh- cloud computing setting. Different from [22], [23], however, age-of-information ness/timeliness is assessed by the (AoI), we consider a generate-at-will model, in which measurement defined as the time elapsed since the latest received update. times are controlled by a scheduler. Each measurement is up- Lots of work pertaining to AoI minimization have appeared loaded to a cloud server to undergo some computations before in the recent literature, with frameworks that include queuing, being sent back as an update. The scheduler has the ability optimization and , energy harvesting, remote esti- to preempt a measurement in service if its computation time mation, and coding, see, e.g., [1]–[14]. Of particular relevance is larger than a certain cutoff time and upload a fresher one to our work are those in [15]–[23], which show that the notion instead. After an update is eventually received, the acquisition of preemption of updates in service and replacing them by new of a new measurement may be scheduled after an idle waiting This research was supported in part by the National Science Foundation period. We note that due to preemption, the optimal waiting under Grants CCF-0939370, CCF-1513915 and CCF-1717041. policy derived in [3] does not apply in our setting.

978-1-7281-3151-1/19/$31.00 ©2019 IEEE 528 Focusing on stationary deterministic policies, in which AoI cutoff times are constant and waiting times are function of the Qi instantaneous AoI, we show that optimal waiting has a thresh- old structure. Specifically, a new measurement is uploaded, following an update, only if the AoI grows above a certain threshold that is a function of the cutoff time and the service ... time distribution. Such function is given in closed-form. We ... also provide a necessary and sufficient condition on the Yi 1 − optimality of zero-wait policies, in which a new measurement Yi = Xi,3 is uploaded just-in-time as an update is received. When zero- time W X X X wait is not optimal, we provide a a relatively simple method i i,1 i,2 i,3 of evaluating the long term average AoI through a bisection Ti search. We then discuss the evaluation of the optimal cutoff Fig. 2. AoI evolution example in the ith epoch. Red lines denote preemptions time explicitly under exponential service times. Finally, we and the green line denotes completed service. In this example Ni = 3. compare the proposed preemption and waiting scheme to three baselines: no preemption and zero-waiting; no preemption and at the cloud server denoted as the service time. Service times optimal waiting, the scheme proposed in [3]; and optimal of different measurements are independent and identically preemption and zero-waiting. While it is demonstrated that distributed (i.i.d.) according to the distribution of a random our proposed scheme perfoms best, our results also show that, variable X. Depending on the application or the task being depending on the system parameters, the optimal preemption considered, the server may incur a constant delay before the and zero-waiting policy can actually beat the no preemption actual computation starts. Let us denote such time by c ∈ R+, and optimal waiting policy. This sheds light on the fact that, which is the largest constant such that in some situations, working with fresh measurements provides X ≥ c a.s. (2) the highest gains in terms of AoI. This is without loss of generality since X ≥ 0 a.s.1 Motivated II.SYSTEM MODELAND PROBLEM FORMULATION by freshness, the scheduler is capable of preempting the We consider a system comprised of a sensor, a scheduler, current upload in service if its service time surpasses a certain a transmitter, a cloud computing server and a monitor. The cutoff time. Thus, an update will reach the monitor only if its overall goal is to keep the system’s monitor continuously fed service ends within the cutoff time. Following a preemption, with fresh status updates pertaining to a physical phenomenon a new measurement is taken and uploaded immediately. Fol- of interest. Such updates, however, require some heavy-duty lowing an update delivery, however, the scheduler may wait computations on the raw data measurements acquired by the for some idle time before uploading a new measurement. sensor that need to be carried out by the cloud computing We denote by the ith epoch the time in between the server. Therefore, in order for a status update to reach the reception of the (i − 1)th and the ith updates. The ith epoch 2 monitor, the following series of events need to occur. First, the starts with age Yi−1 and ends with age Yi. A waiting period of scheduler decides on when to acquire a new data measurement Wi time units occurs at the start of the epoch, through which by the sensor, and send (upload) it to the server by the the server is idle. After that, the first measurement in the epoch transmitter. The server then undertakes the computations and is acquired and uploaded to the server. Note that, depending on feeds back the end result to the monitor in the form of an the preemption policy, there can be multiple uploads during a update. Hence, the goal is to design a scheduling policy such single epoch. We denote by Ni the number of uploads during that these updates reach the monitor in a timely manner. A the ith epoch, with Ni ≥ 1, and Ni −1 denoting the number of depiction of the system model considered is shown in Fig. 1. preemptions. Let Xi,j denote the service time of the jth upload Hereafter, we will refer to data sent to the server by uploads, during the ith epoch, 1 ≤ j ≤ Ni. Note that Xi,j’s are i.i.d and data received from the server by updates. ∼ X. Now observe that only the Xi,Ni service time period Uploads are time-stamped so that when updates eventually concludes with an update sent back to the monitor, and all reach the monitor, the system knows when their corresponding other service time periods end with a preemption. Therefore, measurements were acquired. We use an AoI metric to assess the ith epoch ends with age the timeliness of updates at the monitor. This is defined as Yi = Xi,Ni . (3) a(t) = t − u(t), (1) We denote by Ti the server’s busy period in the ith epoch, where u(t) is the time stamp of the latest update that has defined as reached the monitor. T X + X + ··· + X . (4) To minimize the AoI, measurements are uploaded to the i , i,1 i,2 i,Ni cloud server right away after being acquired by the sensor. 1One might consider the constant c a necessary overhead to initiate service We assume that upload transmission times are negligible. at the cloud server for each measurement. 2 However, each measurement consumes a computational time We assume that the first epoch starts with some given age Y0 at time 0.

529 Lastly, let Li denote the ith epoch length given by Lemma 1 In the optimal solution of problem (11), all cutoff functions are equivalent. That is, Li = Wi + Ti. (5) γ (a ) ≡ γ (a ) , ∀j, (12) In Fig. 2, we show an example sample path of how the AoI j j j may evolve during the ith epoch. From the figure, the area for some γ : R+ → [c, ∞]. under the AoI curve during the ith epoch, Qi, is given by

1 2 Proof: Let the optimal cutoff function γ1(·) be given. Note Qi = Yi−1Li + Li . (6) 2 that the system is idle before the first upload. Thus, γ1(a1) We are interested in minimizing the long term average AoI. represents the optimal cutoff time for the AoI to evolve starting It is clear that such quantity depends on the choices of the from an idle state at age a1. Now assume that the first upload cutoff and waiting times that the scheduler makes. Let γi,j is preempted after γ1(a1), whence the age becomes a2 = a1 + denote the cutoff time after which the jth upload in the ith γ1(a1). Observe that the system becomes instantly idle right epoch is preempted. In other words, given γi,j, the scheduler before the second upload occurs. Since service times are i.i.d., preempts the jth upload in the ith epoch if Xi,j grows above therefore γ2(a2) should also represent the optimal cutoff time γi,j time units. Clearly, for the AoI to evolve starting from an idle state at age a2. This shows that γ2(a2) = γ1(a2) must hold, otherwise γ1(·) would γi,j ≥ c (7) not be optimal. Similar arguments follow for γj(·), j ≥ 3. Therefore, all cutoff functions are equivalent. must hold ∀i, j in view of (2). The set {γi,j} now constitutes  a cutoff policy, while the set {Wi} denotes a waiting policy. In the sequel, we further focus on the case in which the (·) Let π denote a scheduling policy {Wi, γi,j}. The goal is to cutoff function γ is a constant. That is, with a slight abuse solve the following problem: of notation, Pn i=1 E [Qi] γ (aj) = γ, ∀j, (13) min lim sup n , (8) π P [ ] n→∞ i=1 E Li for some γ ≥ c. We call this the γ-cutoff policy. Considering where E [·] is the expectation operator. such policy is motivated by the fact that service times are i.i.d.; it also sets a fixed maximum value of γ on the starting AoI III.STATIONARY DETERMINISTIC POLICIES of each epoch. Observe that the optimal policy π∗ that solves problem (8) Now let the following quantities be (re)defined for the epoch  may be such that the waiting and cutoff times of the ith epoch in consideration: Y is the starting AoI; W = w Y is the depend on the history of events, e.g., AoI evolution, number waiting time after it starts; T is the server’s busy period; of preemptions, service time realizations, before, and during, Xj is the jth upload service time; N is the total number the ith epoch. To alleviate the difficulty of tracking all such of uploads; and Y is the ending AoI. Observe that under a history, and motivated by the fact that service times are i.i.d., γ-cutoff policy, given N = n, X1 = ··· = Xn−1 = γ and we focus on policies that are characterized by the following Xn = Y ≤ γ a.s. Also observe that the function w(·) is two main features: 1) the waiting time Wi in the ith epoch is now restricted to the domain [0, γ], and that Y and Y are given by a deterministic function of the starting AoI Yi−1, i.i.d ∼ Y . To evaluate the distribution of the age Y , let us define p , P (X ≤ γ), where P (·) is the probability measure. Wi , w (Yi−1) , (9) Therefore the probability distribution function (PDF) of Y is given by for some function w : R+ → R+; and 2) the cutoff times {γi,j} in the ith epoch are given by deterministic functions of ( fX (y) p , c ≤ y ≤ γ the instantaneous AoI, fY (y) = , (14) 0, otherwise γ γ (a ) , (10) i,j , j i,j 3 where fX (·) denotes the PDF of the service time X. for some function γj : R+ → [c, ∞], ∀j, with ai,j denoting We note that problem (11) is structurally different from the the AoI just before the jth upload occurs in the ith epoch. setting considered in [3]. There, an epoch could only consist Let Πs denote the set of policies that abide by the above of one packet in service until it finishes, and hence the AoI at structure. Note that any π ∈ Πs induces stationary distribu- the end of the epoch relates to that packet’s acquisition time. tions Qi ∼ Q and Li ∼ L for all epochs. Therefore, under In our setting, owing to the preemption capability, there can be Πs, problem (8) reduces to multiple uploads in a single epoch, and hence the AoI at the E [Q] end of the epoch does not necessarily relate to the first upload min . (11) time. The optimal waiting policy derived in [3], therefore, does π∈Πs E [L] not apply in our setting. Problem (11) is an optimization problem over a single epoch. In the sequel, we drop the index i for convenience. We now 3We focus on continuous random variables, and assume that γ and the have the following lemma: distribution of X are such that p > 0.

530 Solving problem (11) is tantamount to characterizing the To solve the above problem, we follow Dinkelbach’s approach optimal waiting function w∗ (·) and the optimal cutoff time [30] and introduce the following auxiliary problem for some γ∗. In the next sections, we do so sequentially as follows: we fixed parameter λ ≥ 0: first characterize w∗ (·) for a fixed value of γ, and then we ∗ g(λ) , min E [Q] − λE [L] determine γ for specific service time distributions. w(·)

IV. THRESHOLD WAITING POLICY s.t. w(t) ≥ 0, c ≤ t ≤ γ. (21) In this section, we evaluate the optimal waiting policy One can show that g(λ) is decreasing in λ, and that the optimal for fixed cutoff time γ. The main result is that the optimal solution of problem (20) is given by λ∗ that solves g(λ∗) = 0 waiting policy exhibits a threshold structure, in which a new [30]. By monotonicity of g(·), λ∗ can be found by, e.g., a upload occurs only if the AoI grows above a certain threshold bisection search. Focusing on problem (21), we introduce the that depends on the service time distribution and the fixed following Lagrangian [31]: cutoff time. Toward showing that, we need to evaluate some Z γ expressions first. We start with L = E [Q] − λE [L] − w(τ)η(τ)dτ, (22) c n−1 P (N = n) = (1 − p) p, n ≥ 1, (15) where η(·) is a Lagrange multiplier. Substituting (17) and (19) i.e., N is a geometric random variable with parameter p. It above, and after some rearrangements we get is useful to note that [ ] = 1 and  2 = 2−p . Using Z γ   E N p E N p2 1 2 iterated expectations, we now have L = (τ + E [T ] − λ) w(τ) + w (τ) fY (τ)dτ c 2 ∞ 1 Z γ X + Y  [T ] + T 2 − λ [T ] − w(τ)η(τ)dτ. E [T ] = P (N = n) E [X1 + X2 + ··· + Xn] E E E E 2 c n=1 (23) ∞ X = P (N = n) ((n − 1)γ + E [Y ]) Now taking the (functional) derivative of L with respect to n=1 w(t), c ≤ t ≤ γ, and equating to 0 we have 1  = − 1 γ + E [Y ] . (16) (t + [T ] − λ + w∗(t)) f (t) − η(t) = 0. (24) p E Y Thus, the expected epoch length is given by Rearranging the above, we get that

  ∗ η(t) E [L] = E w Y + E [T ] , (17) w (t) = λ − E [T ] − t + . (25) fY (t) with [ ] given by (16). Proceeding similarly, we have E T We note that there are different methods through which one ∞ can conclude that the optimal waiting policy satisfies (25).  2 X h 2i E T = P (N = n) E (X1 + X2 + ··· + Xn) These are discussed in Appendix D for completeness. Now n=1 ∞ using complementary slackness [31], (25) further gives X 2 2  2 ∗ + = P (N = n) (n − 1) γ + 2(n − 1)γE [Y ] + E Y w (t) = [λ − E [T ] − t] , c ≤ t ≤ γ, (26) n=1     where [·]+ max(· 0). This makes the AoI right after the 2 − p 2 2 1  2 , , = − + 1 γ + 2 − 1 γE [Y ] + E Y . p2 p p waiting period, when the first measurement in the epoch gets (18) uploaded, equal to ∗ We now have t + w (t) = max{t, λ − E [T ]}, (27) 1 h 2i ∗ [Q] = Y w Y  + T  + w Y  + T  which comes directly from the fact that w (t) > 0 if and E E 2E only if (iff) λ − E [T ] > t. Observe that the value of t, the     1  2  =E Y w Y + E Y E [T ] + E w Y realization of Y , represents the AoI at the beginning of the 2 epoch. Hence, one could interpret the optimal waiting policy 1 + w Y  [T ] + T 2 , (19) as a threshold policy, in which the first measurement in the E E 2E epoch gets uploaded only if the AoI grows above λ − E [T ].  2 with E [T ] and E T given by (16) and (18), respectively, To have an operational significance, however, the threshold and the second equality follows by independence of Y and T . λ − E [T ] must be positive. The next lemma verifies that this To find the optimal w∗(·), we need to solve the following is indeed the case. The proof is in Appendix A. functional optimization problem: ∗ E [Q] Lemma 2 The optimal solution of problem (20), λ , satisfies min λ∗ > [T ]. w(·) E [L] E s.t. w(t) ≥ 0, c ≤ t ≤ γ. (20) Observe that while Lemma 2 shows that the threshold

531 ∗ w∗(t) Lemma 4 The optimal solution of problem (20), λ , satisfies γ ≥ λ∗ − E [T ].

In summary, to find the optimal AoI for fixed γ one should λ E[T ] c ∗ = ∗ − − start by examining (28). If it holds, then λ λzw in (29). Else, using Corollary 1 and Lemma 4, one has the following bounds on the optimal AoI: λ E[T ] ∗ − E [T ] + c < λ ≤ E [T ] + γ, (30) c ∗ ∗ γ1 γ2 t which facilitates evaluating λ that solves g(λ ) = 0 using a bisection search in the interval (E [T ] + c, E [T ] + γ]. ∗ Fig. 3. The optimal waiting policy versus time. We show two example choices Now it remains to choose the best γ that minimizes λ . We of γ in red. For γ1, we always wait before uploading a new measurement discuss this in the next section. following an update, while for γ2 it depends on the value of t. Lemma 4 shows that the situation of γ1 cannot be optimal. V. OPTIMAL γ-CUTOFF POLICY is positive, a zero-wait policy can still be optimal if the It is not direct to get a closed-form expression of the optimal ∗ in terms of for general service time distributions. In threshold’s value is no larger than c. The next lemma quantifies λ γ this relationship. The proof is in Appendix B. fact, even for specific distributions this can also be a difficult task. In this section, our goal is to provide some insight on Lemma 3 A zero-wait policy, in which ∗( ) = 0, ∀ ∈ [ ], how the service time distribution can affect the choice of the w t t c, γ ∗ is optimal for problem (20) iff optimal cutoff γ . To avoid confusion, let the optimal AoI as a function of the cutoff value, derived in Section IV, be denoted   1 1 2 1  2 ∗ ( ) ∗∗ ∗ ( ∗) 2 p − 1 γ + 2 E Y by λ γ , and define λ , λ γ . Our approach will be as   ≤ c. (28) follows: we will first fix γ ≥ c and evaluate λ∗ (γ) as discussed 1 ∗ p − 1 γ + E [Y ] toward the end of Section IV; and then we will evaluate γ that minimizes λ∗ (γ), i.e., achieves λ∗∗, numerically. The optimal AoI under a zero-wait policy is directly given We will consider an exponential service time distribution by substituting w∗(t) = 0, ∀t in (17) and (19) to get with c = 0 along with its shifted version with c > 0. Clearly, ∗ E [Q] the zero-wait policy is not optimal for distributions with c = 0, λzw = E [L] as inferred from the inequality (28). In this case, λ∗ (γ) can be   1  2 E Y E [T ] + E T evaluated by a bisection search using the bounds in (30). On = 2 ∗ [ ] the other hand, for c > 0, λ (γ) is given in closed-form by E T ∗ 1  2 λzw in (29) for values of γ that satisfy (28), and is evaluated 2 E T = E [Y ] + , (29) by a bisection search using the bounds in (30) otherwise. As E [T ] we will see, in some situations evaluating γ∗ will be a direct where the subscript zw stands for zero-wait. consequence of evaluating the bounds in (30). Now that we established a necessary and sufficient condition for the optimality of a zero-wait policy in Lemma 3, we A. Standard Exponential proceed by investigating the case in which the inequality 5 condition in (28) does not hold. First, an immediate corollary Let X ∼ exp(1). Since c = 0, we aim at evaluating the follows in this case. bounds in (30). Toward that, one can directly compute the following quantities: ∗ Corollary 1 The optimal solution of problem (20), λ , satis- p =1 − e−γ , (31) fies λ∗ > [T ] + c iff (28) does not hold. E 1 − (1 + γ) e−γ E [Y ] = . (32) Now observe that for γ < λ∗−E [T ], one would always wait 1 − e−γ before uploading a new measurement following an update, and This directly gives E [T ] = 1, and hence that for γ ≥ λ∗ − [T ], it depends on the realization of Y E ∗ (the value of t) as indicated in (26). We illustrate this behavior 1 < λ (γ) ≤ 1 + γ, (33) in Fig. 3, and settle this issue in the next lemma by showing upon which one can see that ∗ is infinitesimal. As mentioned 4 γ that the situation of γ1 in Fig. 3 cannot be optimal. We note before, this is one instance where evaluating the bounds in (30) that the result of the lemma holds regardless of whether (28) directly gives γ∗. Therefore, in this case, λ∗∗ can be made holds or not. The proof is in Appendix C. arbitrarily close to 1 by choosing γ∗ arbitrarily close to 0. 4We note that Fig. 3 is only explanatory and that in reality the choice of 5 γ also affects the values of λ∗ and E [T ]. One can always choose a time unit such that the service rate is unity.

532 B. Shifted Exponential 8

We now focus on the shifted version of the above, in which 7

−(x−c) fX (x) = e , x ≥ c > 0. (34) 6

Based on this, for γ ≥ c, one can directly compute 5

p =1 − e−(γ−c), (35) 4 −(γ−c) 1 + c − (1 + γ) e 3 [ ] = (36) E Y −(γ−c) , 1 − e 2 2 2 −(γ−c)  2 2 + 2c + c − 2 + 2γ + γ e E Y = . (37) 1 1 − e−(γ−c) 0 Upon substituting all the above in (28) and simplifying, we 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 get that the zero-wait policy is optimal iff 1 1 − c2 ≤ (1 + γ − c) e−(γ−c). (38) Fig. 4. Optimal AoI and cutoff values versus c for exponential service 2 times. The vertical line denotes the critical value of c = √2, after which the zero-wait policy is optimal. Observe√ that the above is satisfied for all values of γ ≥ c if c ≥ 2. Next, note that (1 + γ − c) e−(γ−c) is decreasing in γ, and has a maximum value of 1 when γ = c. This shows 5 that there exists a unique ¯( ) that satisfies the above γ c >√ c 4.5 inequality with equality√ if c < 2. Thus, the inequality is 4 satisfied for c < 2 iff γ ≤ γ¯(c). Based on the above,√ the zero-wait policy√ is optimal in the following cases: 1) c ≥ 2, 3.5 or 2) c < 2 and γ ≤ γ¯(c). On the other hand the zero-wait √ 3 policy is not optimal if c < 2 and γ > γ¯(c). ∗ In Fig. 4, we plot the optimal cutoff γ and the correspond- 2.5 ing AoI λ∗ versus c. We also show γ¯(c) on the figure to √ 2 indicate whether zero-wait is optimal for c < 2. We see 1.5 from the figure that√ the zero-wait policy is not optimal for ∗ all values of c < 2 since γ > γ¯(c); it is only optimal for 1 √ 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 c ≥ √ 2. Note that γ¯(c) is not defined (and not needed) for c ≥ 2, and is therefore not shown on the figure. In Fig. 5, we compare the optimal policy derived in this Fig. 5. Comparing the optimal policy to other bench marks versus c for paper to other benchmarks. The first is the vanilla version of exponential service times. status updating, denoted no cutoff & zero-wait, in which an has been shown that it is optimal to upload a new measurement upload is never preempted, and a new upload takes place once to the server following an update only if the AoI grows above a an update is received. The second is also a zero-wait policy certain threshold. Implications of such preemption and waiting yet with optimizing the cutoff value, denoted optimal cutoff & policies have been discussed for exponential service time zero-wait. The third is that of [3], denoted no cutoff & optimal distributions, along with comparison with other benchmarks. wait, in which the waiting time is optimized and uploads are never preempted. We see that our policy beats all benchmarks, APPENDIX especially for small values of c. Another interesting note is A. Proof of Lemma 2 that for for c 0.25, optimizing the cutoff turns out to be / We show this by contradiction. Assume that λ∗ ≤ [T ]. better, age-wise, than optimizing the waiting time. Indeed, the E Then this would necessarily mean that w∗(t) = 0, ∀t, and optimal cutoff & zero-wait policy beats the no cutoff & optimal hence (cf. (29)) wait policy of [3] for c / 0.25.   1  2 E Y E [T ] + E T λ∗ = 2 VI.CONCLUSION E [T ]   1  2 A cloud computing status updating system has been con- 1 2 E T = E [T ] − − 1 γ + , (39) sidered, in which computations are carried out on raw data p E [T ] measurements uploaded to a cloud server, and then returned where (39) follows by (16). Now for λ∗ to be no larger than in the form of updates to a monitor. Using an AoI metric, it [T ], it must hold that has been shown that preemption of late updates, whose service E 1  2 times exceed a certain cutoff time, and replacing them by E T 1  2 ≤ − 1 γ. (40) fresher measurements can enhance the overall AoI. Further, it E [T ] p

533 2   h 2i Using (16) and (18), the above is tantamount to having = (λ − E [T ]) − 2 (λ − E [T ]) E Y + E Y .     (49) 1 2 − p 2 2 1 1  2 − + 1 γ + − 1 γE [Y ] + E Y 2 p2 p p 2 Substituting (45), (48) and (49) in (19) we get  2   1 2 1   h 2i   ≤ − 1 γ + − 1 γE [Y ] , (41) E [Q] = (λ − E [T ]) E Y − E Y + E Y E [T ] p p 1 1 h 2i which, upon some direct algebraic rearrangements, is equiva- + (λ − [T ])2 − (λ − [T ]) Y  + Y 2 E E E 2E lent to having 1 + λ − [T ] − Y  [T ] + T 2 1 1  1 E E E 2E − 1 2 +  2 ≤ 0 γ E Y , (42) 1 h 2i 1 2 p 2 = − Y + (λ − [T ])2 2E 2 E which is a clear contradiction. 1 + (λ − [T ]) [T ] + T 2 B. Proof of Lemma 3 E E 2E ∗ 1 2 1  2 1 2 1 h 2i In view of (26), a zero-wait policy is optimal iff λ ≤ = λ + E T − (E [T ]) − E Y . (50) E [T ] + c. Proceeding as in Appendix A, this is tantamount to 2 2 2 2 adding c to the right hand side (RHS) of (40), or equivalently The above can be further simplified by noting that using (16) adding cE [T ] to the RHSs of (41) and (42). Thus, a zero-wait and (18) we have policy is optimal iff  2 2 E T − (E [T ]) 1  1  2 1  2       − 1 γ + E Y 2 1 2 1   h 2i 2 p 2 = − 1 − 1 γ + 2 − 1 γE Y + E Y ≤ c. (43) p p p E [T ]  2   1 2 1    2 Substituting (16) above directly gives (28). − − 1 γ − 2 − 1 γE Y − E Y p p C. Proof of Lemma 4   1 1 2 h 2i  2 First, if (28) holds, then by Corollary 1 λ∗ ≤ [T ] + c ≤ = − 1 γ + E Y − E Y E p p [T ] + γ. E 1 − p h 2i 2 We now show the result of the lemma when (28) does not 2   = 2 γ + E Y − E Y , (51) hold. We show this by contradiction. Assume that γ < λ∗ − p E [T ]. Under that assumption, it holds by (26) that which, upon substituting in (50) finally gives ∗ 1 2 1 − p 2 1  2 w (t) = λ − E [T ] − t, c ≤ t ≤ γ, (44) E [Q] = λ + γ − E Y . (52) 2 2p2 2 i.e., w∗(t) > 0, ∀t ∈ [c, γ]. Therefore, Z γ   Now using (46) and (52) we have E w Y = (λ − E [T ] − τ) fY (τ)dτ c   g(λ) =E [Q] − λE [L] =λ − E [T ] − E Y . (45) 1 2 1 − p 2 1  2   = − λ + γ − E Y + λE Y . (53) Our goal now is to evaluate the value of λ∗ by solving 2 2p2 2 ( ∗) = 0 [ ] + g λ , and show that it cannot be larger than E T Thus, solving g(λ∗) = 0 is equivalent to solving γ, thereby reaching a contradiction. Toward that, we start by using the above to evaluate ∗ 2   ∗  2 1 − p 2 (λ ) − 2E Y λ + E Y − γ = 0. (54) p2 [L] = w Y  + [T ] = λ − Y  . (46) E E E E The above equation has two solutions, but only one of them Since E [L] ≥ 0, it must hold that the optimal λ∗ satisfies is valid due to the inequality in (47). This is given by √ ∗   λ ≥ Y . (47) ∗   1 − p E λ = E Y + γ. (55) p This simple observation will prove to be useful later on. Next, we have ∗ Z γ It now remains to check whether γ < λ − E [T ] holds.   fY (τ) E Y w Y = τ (λ − E [T ] − τ) dτ Using (16), we have c p √   h 2i ∗ 1 − p 1 − p = (λ − [T ]) Y − Y , (48) λ − E [T ] = γ − γ, (56) E E E p p and which√ is clearly no larger than γ since the quantity Z γ f (τ) 1−p−(1−p) is no larger than 1 for all values of p. This gives  2  = ( − [ ] − )2 Y p E w Y λ E T τ dτ a contradiction and concludes the proof. c p

534 D. Different Methods for Deriving (25) [4] R. Talak, S. Karaman, and E. Modiano. Optimizing information freshness in wireless networks under general interference constraints. The method included in the main text to derive (25) involves In Proc. MobiHoc, June 2018. a calculus of variations approach mainly through leverag- [5] B. Zhou and W. Saad. Optimal sampling and updating for minimizing ing the Euler-Lagrange equation and equating the functional age of information in the internet of things. In Proc. IEEE Globecom, December 2018. derivative to 0 [32]. In this appendix we discuss two alternate [6] M. Zhang, A. Arafa, J. Huang, and H. V. Poor. How to price fresh data. methods to derive (25). In Proc. WiOpt, June 2019. [7] M. Bastopcu and S. Ulukus. Minimizing age of information with soft The first method, and quite the simplest one, is by complet- updates. J. Commun. Netw., 21(3):233–243, June 2019. ing the square in the Lagrangian in (23). Specifically, (23) can [8] B. Buyukates, A. Soysal, and S. Ulukus. Age of information in multihop be rewritten equivalently as multicast networks. J. Commun. Netw., 21(3):256–267, June 2019. [9] X. Wu, J. Yang, and J. Wu. Optimal status update for age of information Z γ 1  η(τ) 2 minimization with an energy harvesting source. IEEE Trans. Green L = w(τ) + τ + E [T ] − λ − fY (τ)dτ Commun. Netw., 2(1):193–204, March 2018. c 2 fY (τ) [10] A. Arafa, J. Yang, S. Ulukus, and H. V. Poor. Age-minimal transmission Z γ 1  ( ) 2 for energy harvesting sensors with finite batteries: Online policies. IEEE η τ Trans. Inf. Theory. To appear. Available Online: arXiv:1806.07271. − τ + E [T ] − λ − fY (τ)dτ c 2 fY (τ) [11] B. T. Bacinoglu, Y. Sun, E. Uysal-Biyikoglu, and V. Mutlu. Achieving the age-energy tradeoff with a finite-battery energy harvesting source.   1  2 + E Y E [T ] + E T − λE [T ] , (57) In Proc. IEEE ISIT, June 2018. 2 [12] T. Z. Ornee and Y. Sun. Sampling for remote estimation through queues: which is minimized iff the first integrand is set to 0 ∀τ, which Age of information and beyond. In Proc. WiOpt, June 2019. [13] R. D. Yates, E. Najm, E. Soljanin, and J. Zhong. Timely updates over exactly gives (25). an erasure channel. In Proc. IEEE ISIT, June 2017. The second method is by using the result in [32, Ch. 7 [14] A. Arafa, K. Banawan, K. Seddik, and H. V. Poor. On timely channel Th. 1] to conclude that L (w) is minimized at w∗ only if coding with hybrid ARQ. In Proc. IEEE Globecom, December 2019. Available Online: arXiv:1905.03238. [15] S. K. Kaul, R. D. Yates, and M. Gruteser. Status updates through queues. ∂ ∗ L (w + αh) = 0, (58) In Proc. CISS, March 2012. ∂α α=0 [16] M. Costa, M. Codreanu, and A. Ephremides. On the age of information in status update systems with packet management. IEEE Trans. Inf. for any h(·): R+ → R+. Taking h(τ) , δ(τ − t), for some Theory, 62(4):1897–1910, April 2016. t ∈ [c, γ], where δ(·) is the Dirac delta function, we get that [17] K. Chen and L. Huang. Age-of-information in the presence of error. In Proc. IEEE ISIT, June 2016. for fixed α [18] R. D. Yates and S. K. Kaul. The age of information: Real-time status Z γ  updating by multiple sources. IEEE Trans. Inf. Theory, 65(3):1807– 1 2 L(w + αh)= (τ + E [T ] − λ) w(τ) + w (τ) fY (τ)dτ 1827, March 2019. c 2 [19] E. Najm and E. Telatar. Status updates in a multi-stream M/G/1/1 Z γ preemptive queue. In Proc. IEEE Infocom, April 2018. + α (t + E [T ] − λ) fY (t) δ(τ − t)dτ [20] A. Soysal and S. Ulukus. Age of information in G/G/1/1 systems: Age c expressions, bounds, special cases, and optimization. Available Online: Z γ 1 2 arXiv:1905.13743. + (w(τ) + αδ(τ − t)) fY (τ)dτ [21] S. Farazi, A. G. Klein, and D. R. Brown III. Age of information in 2 c energy harvesting status update systems: When to preempt in service? 1 In Proc. IEEE ISIT, June 2018. + Y  [T ] + T 2 − λ [T ] E E 2E E [22] V. Kavitha abd E. Altman and I. Saha. Controlling packet drops to Z γ Z γ improve freshness of information. Available Online: arXiv:1807.09325. − w(τ)η(τ)dτ − αη(t) δ(τ − t)dτ. [23] B. Wang, S. Feng, and J. Yang. When to preempt? age of information c c minimization under link capacity constraint. J. Commun. Netw., 2019. (59) To appear. [24] C. Xu, H. H. Yang, X. Wang, and T. Q. S. Quek. On peak age of Therefore, upon using R γ δ(τ − t)dτ = 1, we have information in data preprocessing enabled IoT networks. In Proc. IEEE c WCNC, April 2019. ∂L (w + αh) [25] Q. Kuang, J. Gong, X. Chen, and X. Ma. Age-of-information for = (t + E [T ] − λ) fY (t) − η(t) computation-intensive messages in mobile edge computing. Available ∂α Online: arXiv:1901.01854. Z γ [26] J. Gong, Q. Kuang, X. Chen, and X. Ma. Reducing age-of-information + (w(τ) + αδ(τ − t)) δ(τ − t)fY (τ)dτ. for computation-intensive messages via packet replacement. Available c Online: arXiv:1901.04654. (60) [27] P. Zou, O. Ozel, and S. Subramaniam. Trading off computa- tion with transmission in status update systems. Available Online: Setting α = 0 in the above and using (58), (25) is directly arXiv:1907.00928. reached after rearranging. [28] X. Song, X. Qin, Y. Tao, B. Liu, and P. Zhang. Age based task scheduling and computation offloading in mobile-edge computing sys- REFERENCES tems. Available Online: arXiv:1905.11570. [29] R. D. Yates, M. Tavan, Y. Hu, and D. Raychaudhuri. Timely cloud [1] S. K. Kaul, R. D. Yates, and M. Gruteser. Real-time status: How often gaming. In Proc. IEEE Infocom, May 2017. should one update? In Proc. IEEE Infocom, March 2012. [30] W. Dinkelbach. On nonlinear fractional programming. Management [2] C. Kam, S. Kompella, and A. Ephremides. Age of information under Science, 13(7):492–498, 1967. random updates. In Proc. IEEE ISIT, July 2013. [31] S. P. Boyd and L. Vandenberghe. Convex Optimization. Cambridge [3] Y. Sun, E. Uysal-Biyikoglu, R. D. Yates, C. E. Koksal, and N. B. Shroff. University Press, 2004. Update or wait: How to keep your data fresh. IEEE Trans. Inf. Theory, [32] D. G. Luenberger. Optimization by Vector Space Methods. John Wiley 63(11):7492–7508, November 2017. & Sons, 1997.

535