{'fraction_non_alphanumeric': 0.03644995980707395, 'fraction_numerical': 0.009445337620578777, 'mean_word_length': 4.4443380743982495, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On The Age Of Information In Status Update Systems With Packet Management

We consider a communication system in which status updates arrive at a source node, and should be transmitted through a network to the intended destination node. The status updates are samples of a random process under observation, transmitted as packets, which also contain the time stamp to identify when the sample was generated. The age of the information available to the destination node is the time elapsed since the last received update was generated. In this paper, we model the source-destination link using queuing theory, and we assume that the time it takes to successfully transmit a packet to the destination is an exponentially distributed service time. We analyze the age of information in the case that the source node has the capability to manage the arriving samples, possibly discarding packets in order to avoid wasting network resources with the transmission of stale information. In addition to characterizing the average age, we propose a new metric, called peak age, which provides information about the maximum value of the age, achieved immediately before receiving an update.


I. INTRODUCTION
Numerous applications of communication networks require the transmission of information about the state of a process of interest between a source and a destination. This is the case, for example, in sensor networks, where sensor nodes report the observations to a central processor, to monitor health or environment conditions [1], [2]. Another example is the use of a feedback channel to report side information in communication networks [3], [4]. In these applications, the timeliness of the transmitted message is an important and often critical objective, since an outdated message may lose its value. Hence, a theory of age of information is useful to optimize communication systems when the receiver has interest in fresh information. This work is a contribution to the initial efforts in this direction.
We focus on applications of communication networks in which a random process is observed, and samples are made available to a source node at random times. The samples are transmitted in order to update the value of the process known at the destination node. For that reason, the transmitted messages are also called status updates.
Status updates are transmitted as packets, containing information about one or more variables of interest, and the time of generation of the sample. Typically, it takes a random time until the packet is successfully delivered through the network. If the most recently received update carries the time stamp U(t), which characterizes the instant of generation of the update, then the status update age, or simply age, is defined as the random process ∆(t) = t − U(t) [5]. Hence, the age is the time elapsed since the last received packet was generated.
In this work, we model the source-destination link as a single-server queue, and consider a particular aspect in the transmission of status updates, namely the packet management at the source node. We assume that the source receives random updates, but some of the packets may be discarded even before being transmitted through the network. Part of the results have been presented in [6].
We consider three policies for packet management: (i) discard every packet that finds the server busy, (ii) keep a single packet waiting for transmission, and discard any additional packets that find the system full upon arrival, and (iii) keep a single packet waiting for transmission, replacing it upon arrival of a more up-to-date packet.
The average age is calculated for each of the three policies, and we compare the results with a scheme without packet management. One remark is that the packet management policies are adequate if the objective is to inform the destination about the most recent value of the process of interest, as we do not consider any cost associated with discarding samples. There may be applications where the availability of multiple consecutive samples is also desirable, even at the cost of a larger associated age, for example, if an estimation is performed at the destination node. This interesting trade-off is out of the scope of this paper.
In addition to the analysis of the average age, we propose a new metric, called peak age, which provides information about the maximum value of age achieved immediately prior the reception of an update. The peak age can be used to characterize the timeliness of information transmitted through a network, instead of the average age, with the advantage of a more simple formulation, and a complete description of its probability distribution. Another motivation to define the peak age is its relationship with the probability that the age exceeds a threshold, which is relevant to design systems with a guarantee that the information available at the destination is fresh at any given time.

A. Related Work
The age of information was formalized as a metric of interest in the context of vehicular ad-hoc networks in [7] and [8]. In [7], the authors address the problem of congestion control in large vehicular networks, proposing a rate control algorithm to minimize the age of information throughout the system. The effect of piggybacking messages throughout the vehicular network was investigated in [8], and shown to be effective in reducing the age of information.
Simple network models based on queuing theory have been used in [5], [9], and [10], aiming to understand more fundamental characteristics of the process describing the age of information. The average age has been investigated in [5], considering randomly generated samples arriving according to a Poisson process, transmitted between a single source-destination pair, using a first-come-first-served (FCFS) discipline. With the simplifying assumption that the time it takes for a sample to be transmitted is exponentially distributed, and assuming that all samples wait in a queue for transmission, the authors model the system as an M/M/1 queue. The average age for the M/D/1 and D/M/1 models is also calculated in [5], illustrating the cases with deterministic service time and periodic sampling, respectively. The case with multiple sources was studied in [9]. The main result is that optimizing the system for timely updates is not the same as maximizing throughput, nor it is the same as minimizing delay. The work in [10] is more closely related to ours. The authors have analyzed the case with last-come-first-served (LCFS) queue discipline, and have shown that this transmission discipline achieves a lower bound for the average age when the arrival rate is very large. In this work, we show that the same lower bound can be achieved with first-come-first-served (FCFS) discipline and packet management policies.
The transmission of status updates through a network cloud was investigated in [11], where the authors calculate the average age, considering that all packets are transmitted immediately after generation, and some packets are rendered obsolete, due to the random service times in the network. This model corresponds to the extreme case of an infinite number of servers, and it presents a case in which resources are wasted transmitting all the available samples. In [12], the authors discuss the case with only two servers, accounting for both the effect of queuing and the possibility that packets are received out of order, wasting network resources. The packet management schemes proposed in this work prevent the transmission of outdated messages and the consequential waste of network resources. t Process of interest H(t) Figure 1. Transmission of status updates through queuing system.

B. Organization
The formal definition of age of information, the proposed packet management policies, and the corresponding system models are described in section II. In section III, we describe the two metrics for age of information investigated in this paper, namely the average age and the peak age. The analytic results for average age and peak age are discussed in section IV, in subsections dedicated to each of the three packet management schemes. Numerical results are presented in section V, and final remarks in section VI.
II. PROBLEM STATEMENT AND SYSTEM MODEL Consider a communication link with one source-destination pair. A random process H(t) is observed, and the status of this process is available to the source node at random time instants. The destination node has interest in timely information about the status of the process H(t), but this information is not available instantaneously, since it has to be transmitted from the source through a link with limited resources. The source node obtains samples of the random process of interest H(t), and transmits status updates in the form of packets, containing the information about the status of the process, and the time instant that the sample was generated. We denote the time stamps with t k , and each status update message contains the information {H(t k ), t k }.
The transmission of status update messages will be studied using queuing theory, and we illustrate the system in Figure 1. We represent the random process of interest H(t), which is observed in different time instants t k , k = 1, 2, . . .. Each observation becomes immediately available to the source node as a packet containing {H(t k ), t k }. Hence, t k is also regarded as the arrival time of the packet to the source node. The arrival process is modeled as a Poisson process of rate λ, and each packet may be stored in a finite capacity buffer, if space is available, or discarded according to the packet management scheme. The transmission of a packet takes a random amount of time, which depends on channel conditions such as fading, and network conditions such as congestion. As a simplifying assumption, we consider that the time for transmission of a packet is exponentially distributed, with mean 1/µ. The adopted queue models have a single server, and packets are transmitted using a first-come-first-served (FCFS) policy. In the destination, we are interested in characterizing the timeliness of the information available about the process H(t).
The timeliness of the information about the process of interest can be characterized by the age of information [5], which we define below.
Definition 1: Age of Information Let H(t) be a random process of interest. Let status update messages be packets containing the information {H(t k ), t k }, k = 1, 2, . . ., to be transmitted in a source-destination link. Denote with t ′ k the corresponding time instants at which the status update messages arrive at the destination.
At a time instant s, we define the index of the most recently received update and define the time stamp of the most recently received update Finally, we define the age of information as the random process ∆(s) := s − U(s).
As mentioned in section I-A, the characterization of average age for status update systems using queuing theory has been considered before, but most previous work assumed the transmission of all generated packets. In this work, we consider that the source node can discard some of the arriving packets, in a process that is referred to as packet management. We compare three policies of packet management: (i) assume that samples which arrive while a packet is being transmitted are discarded, and the ones that find the source node idle are immediately transmitted to the destination. In this case, no packets are kept in a queue waiting for transmission. Assuming a Poisson arrival process, FCFS policy, and exponentially distributed service time, this scheme is modeled as an M/M/1/1 queue, where the last entry in the Kendall notation refers to the total capacity of the queuing system, which is a single packet in service; (ii) assume that a single packet may be kept in queue, waiting for transmission if the server is busy transmitting another packet. If the server is idle, the service starts immediately. Under the assumptions of Poisson arrivals, and exponential service times, this second model of packet management can be studied as an M/M/1/2 queue. Here the total capacity of the queuing system is one packet in service and one packet in queue; (iii) The third packet management policy also assumes that a single packet may be kept in the buffer waiting for transmission. We propose that packets waiting for transmission are replaced upon arrival of a more up-to-date packet. Keeping the other assumptions, we can model this proposed system as a modified M/M/1/2 queue, identified as an M/M/1/2* queue. This is a peculiar queuing model, for which some of the classic results from queuing theory, such as Little's result [13,Chapter 2], fail to apply.
In order to understand more about the process ∆(t), defined in (3), we depict in Figure 2 examples of sample paths for each of the models described in (i)-(iii). The age of information at the destination node increases linearly with time. Upon reception of a new status update, the age is reset to the difference of the current time instant and the time stamp of the received update. Recall that t k denotes the time instant the kth packet was generated, and t ′ k the time instant that this packet completes service. We identify with T k the time spent in the system, defined as Figure 2(a) illustrates the case (i) of an M/M/1/1 queue, and the packets arriving at times t ⋆ and t ⋆⋆ are discarded, since the server was found busy upon arrival. A sample path example for the case (ii) is shown in Figure 2(b), which considers an M/M/1/2 queue model. In this model, there is a single buffer space, and packets that find the server busy and the buffer occupied are discarded, as illustrated for a packet arriving at time t ⋆ . Figure 2(c) presents an example of the evolution of age with the policy described in item (iii), modeled as an M/M/1/2* queue. No packets are blocked from entering the queue. If a new packet arrives while the system is full, the packet waiting is discarded. In the illustration, the packet that arrived at time t ⋆ spends some time in the buffer, but it is substituted when a new packet arrives at time t 4 . The transmission of this last packet begins when the server becomes available, at time t ′ 3 . Notation: the subindex k will be used to refer to successfully transmitted packets only. We will not identify the time of arrival of discarded packets. As an example, consider the sample path illustrated in Figure 2(a). The fourth and fifth packets to arrive are discarded. In this case, the fourth transmitted packet was the sixth packet to arrive, but we use index k = 4, arrival time t 4 , and departure time t ′ 4 . We identify the fourth peak with A 4 , and the area of the fourth trapezoid with Q 4 . In general we will write A k , Q k , Y k , T k to refer to quantities associated with the kth transmitted packet.

Time
Age ∆(t) We identify examples of the time in the system T k , the interdeparture time Y k , the peaks A k , and the areas of geometric forms Q k , which will be used in the characterization of the age throughout this paper. Figure 2, we present in this section two metrics that can be used to characterize the age of information, namely the average age and the peak age.

A. Average Age
Assuming ergodicity of the process ∆(t), the average age can be calculated using a time average. Consider an observation interval (0, τ ). The time average age is The integration in (4) can be interpreted as the area under the curve for ∆(t). Observing Figure 2, note that the area can be calculated as the sum of disjoint geometric parts with areas identified by Q k , k = 1, 2, . . . N(τ ), with N(τ ) as defined in (1). In the case that τ > t ′ N (τ ) , there will also be a partial area to be added in the end, which we will denote withQ. Summing all the areas, we write the time average age as The average age is calculated as we take the length of the observation interval to infinity The ratio of the number of transmitted packets by the length of the interval converges to the rate of transmitted packets, referred to as the effective arrival rate. We define Definition 2: Effective Arrival Rate Also, as τ → ∞, the number of transmitted packets grows to infinity, N(τ ) → ∞. Due to the ergodicity of Q k , the average age can be calculated as To calculate the area, Q k , we take the area of the bigger isosceles triangle with sides T k−1 + Y k , and subtract the area of the smaller triangle with sides T k . The average area is where the second equality follows from the fact that T k−1 and T k are identically distributed.

B. Peak Age
Depending on the application, it may be necessary to characterize the maximum value of the age of information, immediately before an update is received. It may also be desirable to optimize the system so that the age remains below a threshold with a certain probability.
With that motivation, we propose an alternative metric to the average age, obtained observing the peak values in the sawtooth curve. The peak age provides information about the worst case age, and its expected value can be easily calculated in many cases of interest.
Observe the example sample paths shown in Figure 2. Consider the peak corresponding to the kth successfully received packet. The value of age in the peak is denoted with A k . We present the definition of peak age below.
Definition 3: Peak Age Let T k−1 be the time in the system for the previously transmitted packet, and Y k be the interdeparture time, or the time elapsed between service completion of the (k − 1)th packet and service completion of the kth packet. The value of age achieved immediately before receiving the kth update is called peak age, and defined as IV. CHARACTERIZING AVERAGE AGE AND PEAK AGE FOR SELECTED QUEUING MODELS In this section we characterize the average age and the peak age for each of the three queuing models mentioned in (i)-(iii). We start with a discussion about the interdependence between the variables T k−1 and Y k . For the peak age we are interested in the distribution of their sum, while for the calculations of the average age, we need to obtain the expected values in (9).
Using queuing system models, we are able to characterize both the time in the system and the interdeparture times but, in general, these two random variables are not independent and we do not have information about the joint distribution. Nonetheless, it is possible to describe an event such that T k−1 and Y k are conditionally independent.
Let ψ be the event that a packet left behind an empty system upon departure. Under the assumption of Poisson arrivals, the time until the next arrival is exponentially distributed with parameter λ, due to the memoryless property of interarrival times. The arriving packet will be served immediately, and the service time is assumed to be exponentially distributed with parameter µ. The interarrival and service times are independent, and they are also independent from the time in the system of the packet that just left.
We denote withψ the complement event that the system is not empty upon departure, i.e. there was at least one packet waiting in queue. In this case, the packet waiting in queue starts service immediately, and the time until the next departure is simply a service time, which is independent of the time in the system for the packet previously served.
For queuing systems with single, as opposed to batch, arrivals, the probability of leaving the system empty upon departure is equal to the steady state probability that the system is empty [14,Chapter 5]. The steady state distribution is particular to each queuing model, and will be presented later in this section.
The variables T k−1 and Y k are conditionally independent, given the event ψ that the (k − 1)th packet leaves behind an empty system upon departure. While the conditional distribution of the time in the system depends on the selected queuing model, the conditional distribution of the interdeparture time can already be stated here. It is given by the convolution of the distributions of two exponential random variables, with parameters λ and µ, which yields We also have that f (y|ψ) = µ exp(−µy).
The expectation of the product, E[T k−1 Y k ], to be used in (9), will be calculated later in this section for each of the queuing models, using nested expectations, as For each queuing model investigated in this paper, we will describe the probability distribution of the peak age by first conditioning on the event ψ. The conditional probability density function is then obtained as the convolution of the conditional density functions for T k−1 and Y k , which we represent as Similarly, we obtain the conditional distribution given the eventψ, and then write the probability distribution of the peak age using In what follows, each subsection describes in detail the calculations of average age and peak age for the selected queuing models, namely the M/M/1/1, M/M/1/2, and M/M/1/2* models. For each model, we need to describe the steady state distribution of the number of packets in the system, in order to calculate P(ψ). We also need to characterize the distribution of the time in the system, in order to calculate the expectation in (17) and the distribution of the peak age.
A. M/M/1/1 Queue 1) Preliminary Calculations: An M/M/1/1 queue can be described using a two-state Markov chain, with each state representing the server as idle or busy. We denote with p 0 the probability of an empty system, and p 1 is the probability of one packet in the system. Analyzing the two-state Markov chain, it is straightforward to obtain [13, Chapter 3] In the case of an M/M/1/1 queue, a packet is accepted in the system only if the server is idle. The effective arrival rate will be denoted with λ e , and we have λ e = λ(1 − p 1 ). The time in the system for transmitted packets is equal to the service time, which is assumed to be exponentially distributed with mean 1/µ. The average number of packets in the system is E[N] = 0p 0 + 1p 1 .
2) Average Age: Recall that ψ represents the event that a transmitted packet left behind an empty system upon departure. In the M/M/1/1 model, this is a certain event, since there is only one packet at a time in the system. In this model, the time in the system for transmitted packets is independent of the interdeparture time. Using this fact in (9), together with (12) and (13), the average age for the M/M/1/1 model is calculated as The limit as the arrival rate goes to infinity is which is equal to the lower bound for the average age among all first-come-first-served (FCFS) systems with a single server [10]. In other words, regarding the average age, this scheme is asymptotically optimal in this class of models.
3) Peak Age: For the peak age, the probability density function is given by the convolution of an exponential distribution for the service time with the distribution of the interdeparture times shown in (11). As a result, we have The complementary cumulative distribution function, which describes the probability that the peak age surpasses a threshold, is described as The average peak age for the M/M/1/1 model can be obtained integrating (24). It can also be calculated easily, observing that , as in (12). As a result,

B. M/M/1/2 Queue 1) Preliminary Calculations:
The M/M/1/2 queue can be described by a Markov chain with three states, that represent an empty system, a single packet being served, or a packet in service with a packet waiting in the buffer. Let ρ := λ/µ. The analysis of the three-state Markov chain yields the steady state probabilities [13, Chapter 3] Once we have the steady state distribution, we can calculate P(ψ), which is equal to the steady state probability that the system is empty [14,Chapter 5]. We normalize the probabilities and write A packet is accepted in the system as long as the system is not full. Therefore, the effective arrival rate is λ e = λ(1 − p 2 ).
We can already calculate the first term of E[Q k ] using (13), (16), together with (27) and (28), and we have Next we need to characterize the time in the system for the transmitted packets, and also its conditional distribution, given the event ψ. The time in the system can be written as T k−1 = W k−1 + S k−1 , where W k−1 is a random variable representing the waiting time, and S k−1 represents the service time.
The waiting time is zero if the system is found idle upon arrival. Due to the PASTA property (Poisson Arrivals See Time Averages) [14,Chapter 3], the probability that the system is found idle upon arrival is equal to the steady state probability that the system is idle. If the system is found busy upon arrival, the waiting time is the remaining service time, which is exponentially distributed with parameter µ, due to the memoryless property of service times. Note that the waiting time is independent of future arrivals, hence independent of the event ψ. For the waiting time of a transmitted packet, we have The average waiting time can be obtained integrating (30), or using Little's result [13, Chapter 2] applied to the average number of packets in the buffer, E[N q ] = 1p 2 , and using the effective arrival rate, which yields For the time in the system, we can condition on the state found upon arrival (idle or busy), separating the cases with and without waiting. For transmitted packets we have where the second equality follows from the fact that, given that the server was found busy upon arrival, W k−1 and S k−1 are two independent random variables, each exponentially distributed with parameter µ. The average time in the system can be calculated integrating the result in (32). It is also straightforward to obtain the average time in the system using (31) and adding the average service time. Alternatively, it can be calculated using Little's result with the average total number of packets in the system, E[N] = 0p 0 + 1p 1 + 2p 2 , and the effective arrival rate, which yields We also need the conditional distribution f (t|ψ) of the time in the system given the event ψ. We note that the (k − 1)th transmitted packet leaves the system idle upon departure if and only if zero arrivals occur while the (k − 1)th transmitted packet is being served. Let f (s) be the probability density function of the service time. We define the probability P(ψ|S k−1 = s) by requiring that for every measurable set A ⊂ [0, ∞), we have The conditional distribution of service time, given that no arrivals occur is calculated as with the conditional expectation For the conditional distribution of the time in the system, we use the results in (30) and (35) to write with conditional expectation We follow similar steps conditioning on the complement eventψ. The system is left behind with another packet waiting for transmission if and only if at least one arrival occurs during the service time of the (k−1)th transmitted packet. The conditional distribution of the service time given the eventψ is calculated similarly to (35) and yields with the resulting conditional expectation For the time in the system, we write indicating that the probability distribution in this case is the result of a convolution of two exponential distributions with parameter µ. The conditional expectation is 2) Average Age: Using the probabilities for the events ψ andψ as described in (27), and (28), together with the conditional expectations calculated in (12), and (15) for Y k , and in (40) and (44) for T k−1 we can finally calculate the expected value of the product T k−1 Y k , to be used in the calculations of the average age. We have We write the average age for the M/M/1/2 model using (29) and (45) as The limit as the arrival rate goes to infinity is which is much larger than the case modeled as M/M/1/1. Intuitively, for very large arrival rates, keeping a packet in the buffer is not advantageous, because the information ages while waiting in queue, and it is better to wait for a new packet to arrive instead of keeping one in the buffer.
3) Peak Age: The probability distribution of the peak age is calculated conditioning on the events ψ andψ. In this case, T k−1 and Y k are conditionally independent random variables, and the distribution of their sum can be obtained using the convolution of their individual conditional probability density functions. Using the probability distributions described in (11), (14), (39), and (43), we finally obtain and the distribution of the peak age is the mixture, as described in (19), using the probabilities in (27) and (28). The complementary cumulative distribution function which describes the probability that the peak age surpasses a threshold is The expected value of the peak age can be calculated directly as

C. M/M/1/2* Queue 1) Preliminary Calculations:
The M/M/1/2* is a peculiar queue model, in which the packet waiting in queue is replaced if a new packet arrives. Regarding the number of packets in the system, this model behaves exactly as the M/M/1/2 queue. That is because a replacement only occurs when an arriving packet finds the system full, so the replacement results in a packet being discarded. Intuitively, discarding the packet that just arrived or the packet that was already in the buffer does not change the number of packets in the system. As a result, the M/M/1/2* queue can be described with a three-state Markov chain, and the steady state probabilities in (26) still hold. The average total number of packets in the system is E[N] = 0p 0 + 1p 1 + 2p 2 , and the effective arrival rate is λ e = (1 − p 2 )λ, as in the M/M/1/2 model. The first term in the calculation of E[Q k ] , which is E[Y 2 k ]/2 also remains the same as calculated in (29) for the M/M/1/2 model. It remains to characterize the time in the system for transmitted packets. In the M/M/1/2* model, some packets leave the system after spending some time waiting in the buffer, while other packets end up being transmitted. As a result, Little's result fails to apply to the packets in the buffer. In order to characterize the time in the system for transmitted packets, let T (without any index) be the time in the system for any packet, which may or may not be discarded. Let P(T > t) describe the probability that a packet stays in the system for a time longer than t. Conditioning on the state of the server upon arrival (idle or busy), and on the event that the packet is transmitted (tx) or dropped (drop), we calculate P(T > t) = P(idle)P(T > t|idle) +P(busy, tx)P(T > t|busy, tx) +P(busy, drop)P(T > t|busy, drop).
In what follows, we present the main arguments to calculate each term in (52). An arriving packet finds the server idle with probability P(idle) = p 0 , due to the PASTA property (Poisson Arrivals See Time Averages) [14,Chapter 3]. In this case, the packet is served immediately, and P(T > t|idle) = e −µt .
A packet finds the server busy with probability P(busy) = 1 − p 0 . According to the packet management scheme, it will be admitted in the system, but it will be transmitted if and only if no other arrival occurs while the service in progress is not completed. Let R represent a remaining service time, with probability density function f (r), and let φ be the event that no other packet arrives during the remaining service. We define the probability P(φ|R = r) by requiring that for every measurable set A ⊂ [0, ∞), we have The probability of transmission, given that the server was busy upon arrival is calculated as As a result, The time in the system for a transmitted packet can be written as the sum of waiting and service times, T = W + S. Conditioned on the event {busy, tx}, the waiting time is distributed as the conditional distribution of the remaining service, given the event φ, calculated as Hence, conditioned on the event {busy, tx}, W is exponentially distributed with parameter (λ + µ). The conditional probability density function of the time in the system is given by the convolution of the individual densities, since W and S are independent. The corresponding complementary cumulative distribution function we are looking for is If the packet finds the server busy and is dropped while waiting, the time it spends in the system is exactly the time until the next arrival, to be denoted with X, which is exponentially distributed with parameter λ, conditioned on the event that the next arrival occurs before the end of the service in progress R. As a result, the conditional distribution can be calculated as P(T > t|busy, drop) = P(X > t|X < R) = P(X > t, X < R) P(X < R) Finally, using the arguments above, we rewrite (52) as P(T > t) = p 0 exp(−µt) From (59), we also have and the expected value The expected value of the waiting time for a transmitted packet is calculated using (56) to be 2) Average Age: The average age for the M/M/1/2* queue is calculated similarly to the M/M/1/2 model. We write the conditional expectations for T k−1 using the equality T k−1 = W k−1 + S k−1 , with (36) and (42) for the expected service time, with expected waiting time for a transmitted packet is given in (62). The resulting conditional expectations for T k−1 are Using (63) and (64) , together with the probabilities for the events ψ andψ as described in (27), and (28), and with the conditional expectations calculated in (12), and (15) for Y k , we obtain the expectation of the product T k−1 Y k , in the case of an M/M/1/2* model, We write the average age for the M/M/1/2* model using (29) and (65) as The limit as the arrival rate goes to infinity is indicating that the model with packet replacement behaves as the model without buffer (M/M/1/1) in the limit. Intuitively, as the arrival rate goes to infinity, a fresh packet will always be available for transmission in both models. The M/M/1/2* model is asymptotically optimal, as the M/M/1/1, but for finite arrival rates and a fixed service rate, the packet replacement provides better performance with respect to the average age, as will be illustrated in section V.

3) Peak Age:
We present the conditional distribution of the peak age, given the events ψ andψ. The probability density function is obtained as the convolution of the conditional distributions for T k−1 and Y k , since these variables are conditionally independent. The distribution of the peak age is the mixture, as described in (19), using the probabilities in (27) and (28).
We also present the conditional complementary cumulative distribution, to describe the probability that the peak age surpasses a threshold. In the case of the M/M/1/2* model we have The average peak age can be obtained integrating the complementary cumulative distribution, or summing the expected values for T k−1 and Y k . As a final result,

V. NUMERICAL RESULTS
In this section, we illustrate the results for average age and peak age with numerical examples. Unless otherwise stated, we assume unitary service rate (µ = 1). When µ = 1, and the x-axis has the arrival rate λ, it can be regarded as the channel utilization ρ = λ/µ. In addition to the analytical formulations, some figures present simulation points, obtained from a discrete-event simulator that we have built in MATLAB. The simulation results are presented as circular markers in the curves, and corroborate the analytical results. Figure 3 illustrates the average age for the three queuing models with packet management. The packet replacement scheme yields the smallest average age. For example, when λ = 0.6, packet replacement promotes a reduction of average age of approximately 5% in comparison to the other models. The average age is decreasing with the channel utilization inside the observed range 0 < ρ ≤ 1.5. Figure 4 provides a comparison of the average age with packet management modeled as an M/M/1/2* queue and the case without packet management, modeled as an M/M/1 queue, in which every packet that finds the server busy is stored in a buffer for later transmission. The average age for the M/M/1 model was presented in [5] to be When λ ≪ µ, the dominant effect is the large interarrival time and the two models have similar behavior because they are idle for a large fraction of time. As the arrival rate λ increases, the dominant effect in the M/M/1 system is the queuing time which approaches infinity as the arrival rate approaches the service rate. As a result, the average age increases to infinity as the arrival rate approaches the service rate. This effect is eliminated with the packet management scheme, which promotes significant improvement in the average age, particularly for ρ > 0.5. Figure 5 shows the average age versus the service rate, with fixed arrival rate λ = 0.5. In all cases the M/M/1/2* promotes the smallest average age, but the schemes have a common limit value as µ goes to infinity, which is 1/λ. That is, for very small service times, the average age is limited by the interarrival times.
The complementary cumulative distribution function for the peak age is presented in Figure 6. We consider a service rate µ = 1, with arrival rates λ = 0.5 and λ = 1.3. The probability that the peak age is larger than a given threshold a can be reduced with larger arrival rates for all three schemes. Comparing the two groups of curves, we also note that the M/M/1/2* model produces the best peak age results for arrival rates below and above the service rate. The M/M/1/2 model presents the second best results for small arrival rates, but for large arrival rates the M/M/1/1 model performs better than the M/M/1/2 with respect to the peak age. Figure 7 illustrates the average peak age for the three queuing models. It corroborates the conclusion that keeping a packet in the buffer is preferable in the case of small arrival rates, while discarding all the packets that find the server busy could be adopted for very large arrival rates (λ > µ). The M/M/1/2* model with packet replacement presents the best results, and is the most adequate model for applications that require the age of information available to the receiver to be below a certain threshold. That is the case when the outdated information looses its value due to small correlation with the current state of the process under observation.

VI. FINAL REMARKS
The concept of age of information is relevant to any system concerned with the timeliness of information. This is the case when an action is taken based on available information, but the information loses its value with time. The characterization of age of information is still incipient, and the investigation of simple models remains important to understand its impact on the performance of communication systems.
This work provides contributions to the initial steps in the characterization of age in communication systems that transmit status update messages. We have considered that the source node can manage the samples of a process of interest, deciding to discard or to transmit status updates to the destination. We observe that package management with packet replacement in the buffer promotes smaller average age, when compared to schemes without replacement. The proposed scheme is asymptotically optimal, achieving a lower bound for average age while avoiding the waste of network resources in the transmission of stale information.
In addition to the average age, we proposed a new metric, called peak age. The peak age is a suitable metric to characterize the age of information in applications that impose a threshold on the value of age. The peak age has the advantage of a more simple mathematical formulation, which will certainly benefit future investigations regarding the optimization of a network with respect to the timeliness of the transmitted information.