Stationary Distribution of Waiting Time in MAP/G/1/N Queueing System with LIFO Service Discipline

. In this paper, we consider single server queueing system with a ﬁnite buﬀer, MAP input and independent generally distributed service times. Customers are selected for the service in accordance with the LIFO (Last In – First Out) service discipline. It is well known that stationary distribution of the number of customers in such a system coincides with the corresponding distribution in the system with FIFO (First In – First Out) discipline which has been studied in the literature early. In the present research we focus on investigating the stationary distribution of waiting (sojourn) time in the system.


Introduction
Queueing systems with inversive service discipline (Last-in-First-out, LIFO) can be used to describe the data processing in many real systems. LIFO discipline is used in cases when the last data written into the structure of data must be removed or processed first. A useful analogy with the office worker is: a person can only work with one page at a time, so a new document is added to a folder on the top of the stack of the previous documents. By analogy, in a computer we also have limitations such as the width of the data bus and every time the system can manipulate with only one memory cell. Abstract mechanism of the LIFO is used in calculations realized in the real structures of data in the form of a stack, which is obviously related to a "pack of paper", a "pile of plates", and so on. The term LIFO emphasizes that in the process of list processing and temporary storage of a limited set of data the last written data must be processed first.
LIFO service discipline can be considered as the opposed one to the ordered FIFO service discipline. Queueing systems with FIFO service discipline are most popular among researches because the corresponding real systems are more common. The second reason for popularity of FIFO discipline is the fact that distributions of the queue length in the systems with FIFO and LIFO disciplines are the same. It allows sometimes to get the desired results for a queue with LIFO discipline using the results of investigation of the corresponding queue with FIFO discipline which is generally easier to study.
However, the distributions of waiting (sojourn) time in the queues with FIFO and LIFO are different. For queueing system with stationary Poisson flow, an infinite buffer and LIFO service discipline the stationary distribution of the waiting (sojourn) time has been obtained early, see, for example, [9]. But we do not know results concerning the distribution of waiting (sojourn) time for the analogous system with a finite buffer, and even much less results for the system with a finite buffer and the input flow different from the stationary Poisson one.
Both disciplines, FIFO and LIFO, are widely used in modern telecommunication and computer networks. E.g., comparison of these discipline (with variants of tail-drop and front-drop of packets) in application to modelling the delivering of live multimedia streaming over ad hoc networks is given in [11]. Application of LIFO discipline in multihop networks is discussed in [7].
The flows in modern telecommunication and computer networks can considerably differ from a stationary Poisson one. In particular, they do not possess the basic property of a stationary Poisson flow -memoryless property. Therefore, in the past decade and more queueing systems with correlated flows have a great interest among researchers in the field of telecommunications and queuing theory. At the present time, the most popular mathematical model of such flows is a Markovian Arrival Process.
In this paper we consider single server queueing system with a finite buffer, M AP input and generally distributed service time. Customers are selected for the service in accordance with LIFO service discipline. As in was mentioned above, the stationary distribution of the number of customers in such a system coincides with the corresponding distribution in the system with FIFO discipline which has been studied in [2], [3], [4]. In the present research, we focus on investigating the stationary distribution of waiting (sojourn) time of an arbitrary customer admitted into the system and arbitrary customer.

Model description
We consider a single server queueing system with a finite buffer of size N and LIFO service discipline. Customers arrive into the system in accordance with a Markovian Arrival Process (M AP ). The M AP is defined by the underlying process ν t , t ≥ 0, which is an irreducible continuous-time Markov chain with finite state space {0, . . . , W }, and the (W + 1) × (W + 1) matrices D 0 and D 1 . The entries of the matrix D 0 define the rates of the process ν t , t ≥ 0, transitions which are accompanied by generating a customer while non-diagonal entries of the matrix D 0 describe the rates of the process ν t , t ≥ 0, transitions which are not accompanied by generating a customer. The matrices D 0 and D 1 can be defined by their matrix generating function D(z) = D 0 + D 1 z, |z| ≤ 1. The matrix D(1) is an infinitesimal generator of the process ν t , t ≥ 0. The intensity (fundamental rate) of the M AP is defined as where θ is the unique solution of the system θD(1) = 0, θe = 1, and the intensity of batch arrivals is defined as λ b = θ(−D 0 )e. Here and in the sequel e(0) is a column (row) vector of appropriate size consisting of 1's (0's). The coefficient of variation, c var , of intervals between batch arrivals is given by the coefficient of correlation, c cor , of intervals between successive batch arrivals is calculated as var . Let p ν,ν (k, t) be the probability that k customers arrive in the M AP during the interval (0, t) and the state of the underlying process ν t of the M AP at the moment t is ν given that ν 0 = ν. Denote Then, the matrices P (k, t) are defined as the coefficients of the matrix expansion For more information about the M AP see, e.g., [8].
The successive service times of customers are independent random variables with general distribution B(t), Laplace-Stieltjes transform As it was noted above, in the literature there are no results regarding such important performance measure of the system under study as waiting time. This paper is devoted to finding the Laplace-Stieltjes transform of the stationary distribution of the waiting time in such a system.

Laplace-Stieltjes Transform of the Stationary Distribution of Waiting Time
Let us introduce the following notation: • Π n,ν,ν (t) be the probability that the length of the busy period generated by a customer, which goes to the service leaving n customers in the buffer, is less than t and at the end of this period the M AP is in the state ν under condition that at the beginning of the busy period the M AP was in the state ν, n = 0, N , ν, ν = 0, W ; • Π n (s) = (π n,ν,ν (s)) ν,ν =0,W ; • W n,ν,ν (t) be the probability that the waiting time of a customer, which sees n customers in the system at the arrival moment, is less than t and at the end of the waiting time the M AP is in the state ν under condition that at the arrival moment the M AP was in the state ν, n = 0, N , ν, ν = 0, W ; Lemma 1. The matrices Π n (s) of LST s of distribution of the length of the busy period generated by a customer, which goes to the service leaving n customers in the buffer, are calculated by the formulas of backward recursion where I is the identity matrix. When it is needed, the dimension of the matrix is indicated as its suffix.
Proof. The proof is based on the probabilistic interpretation of the Laplace-Stieltjes transform. We assume that, independently on the system operation, the stationary Poisson input of so called catastrophes arrives. Let s, s > 0, be the rate of this flow.
Then Π n (s) is a matrix probability that during the busy period generated by a tagged customer, which goes to the service leaving n customers in the buffer, a catastrophe does not arrive.
First, consider n = N −1. Let us calculate Π N −1 (s) using the total probability formula. To this end, consider two cases: a) during the service time of the tagged customer no customers arrive at the system and b) during the service time of the tagged customer one or more customers arrive at the system.
In case a) the busy period under consideration ends at the service completion epoch. The matrix probability that during the service time no customers arrive at the system and a catastrophe does not arrive is equal to ∞ 0 e −sx e D0x dB(x).
In case b) the length of the busy period under consideration (L tag ) can be represented as a sum of two independent random variables: service time of the tagged customer and the length of busy period generated by youngest customer arrived at the system during the service time (L youn ).
A matrix probability that during the service time one or more customers arrive at the system and a catastrophe does not arrive is equal to The distribution of the random variable L youn is the same as the distribution of L tag . From this it follows that a matrix probability that during the period L youn a catastrophe does not occur is equal to Π N −1 (s). Then a matrix probability that during the service time of the tagged customer one or more customers arrive at the system and a catastrophe does not arrive during the busy period L tag is equal to the product From all has been said and the total probability formula it follows that the matrix LST Π N −1 (s) is calculated as The similar arguments lead to the following relation: Using notation of Lemma 1 and introducing the value n = N − i, we obtain from (3) formula (1). Now we are able to derive the LST of the distribution of the waiting time of a customer admitted into the system. Lemma 2. The matrix W n (s) of LST s of distributions of waiting time of a customer, which sees n customers in the system at the arrival moment is calculates as follows: B(t) is a distribution function of residual service time, Proof. We should prove formula (4) for 1 ≤ n ≤ N . Let an arriving (tagged) customer finds n > 0 customer in the system. It means that one customer is in the service and the rest n − 1 customers stay in the buffer. Suppose that during the residual service time k customers arrive at the system, k = 0, N − n. Then all these customers will be admitted into the system.
Using the probabilistic interpretation of the Laplace-Stieltjes transform, we interpret ∞ 0 e −sx P (k, x)dB(x) as a matrix probability that k customers arrive at the system and during the residual service time a catastrophe does not arrive. Then, at the end of the current service, n + k customers stay in the buffer. A customer which came last (the kth customer) will go to the service first. This customer leaves n + k − 1 customers in the buffer and initializes busy period generated by this customer. By Lemma 1, LST s of distributions of busy period generated by the customer are given by the matrix Π k+n−1 (s). After that, the (k − 1)th customer arrived during residual service time will go to the service. LST s of distributions of busy period generated by this customer are given by the matrix Π k+n−2 (s).
The similar reasoning lead to the conclusion that the tagged customer will go to the service, i.e. his/her waiting time is over, when the busy period generated by the first customer arrived at the system during the residual service time ends. This first customer, entering the service, leaves in the buffer n customers and distribution of the busy period, generated by this customer, has matrix LST Π n (s).
Since busy periods, generated by k customers arrived at the system during the residual service time and placed in the buffer in front of our tagged customer, are independent random variables then their sum has a distribution with the matrix LST Π k+n−1 (s)Π k+n−2 (s) . . . Π n (s). During the residual service time, k customers can be admitted into the buffer, where k = 0, N − n. This explains presence of the sum over k in the first term on the right side of (4).
The second term on the right side (4) corresponds to the case when during the residual service time more than N −n customers arrive at the system. The matrix probability that during the residual service time more than N − n customers arrive at the system and a catastrophe does not occur is equal to . Further arguments are similar to those in the derivation of the first term on the right side of (4) and lead to the corresponding expression on the right side of (4).
Introduce the notation for the joint stationary distribution of the number of customers in the system and state of the underlying process of the M AP at an arbitrary time: p i (1), . . . , p i (W )), i = 0, N + 1.
As it was mentioned before, the stationary distribution p i , i = 0, N + 1, can be calculated as the stationary distribution of the system M AP/G/1 with FIFO service discipline. The corresponding result is presented in [2], [3]. Then, we can calculate the LST w(s) using the following theorem. Theorem 1. The LST w(s) of the distribution of the waiting time of an arbitrary customer admitted into the system is calculated as Proof of the theorem follows from the total probability formula. Corollary 1. The LSTw(s) of the distribution of the waiting time of an arbitrary customer is calculated as where the probability P loss of an arbitrary customer loss is computed as Corollary 2. The rth moment of the waiting time of an arbitrary customer admitted into the system is calculated as 4 Calculation of the matrices Y n (s) andỸ n (s) In the numerical implementation of formulas (1), (4) the problem of computing the matrices Y k (s) andỸ k (s) defined by (2) and (5) arises. First, we consider the problem of calculating the matrices Y k (s). In general, the elements of integration, matrices P (k, t), k ≥ 0, are not computed in explicit form, so to calculate these matrices, a procedure based on uniformization of the matrix exponent can be used. Such a procedure is described, e.g., in [6], [8]. In our case, we use this procedure with minor modification, and obtain the following formula for the calculation of the matrices Y n (s): where γ j (s) = n , n ≥ 0, j ≥ 0, are computed using the recurrent formula given in [6], [8].
Calculation of the matrices Y n (s), n ≥ 0, is greatly simplified when the service time has Phase type (PH) distribution. Class of such distributions is sufficiently general and is dense in the set of nonnegative distributions, see, e.g., [1] and [10]. The reader can find the definition and properties of PH distribution e.g., in [10]. Here we suppose that the reader is generally conversant with definition and properties of PH distribution and suggest that service time has PH distribution with an irreducible representation (g, G) where g is a stochastic M -size row vector and G is a matrix of size M which has the property of a sub-generator. Then the distribution function B(t) has the following form: Substituting in (2) the expression for B(t) and using the mixed product rule, we have where ⊗ is a symbol of Kronecker product of matrices, see [5]. Now we try to calculate the integral in (7). For n = 0, we have P (0, x) = e D0x and we obtain the following formula where ⊕ is a symbol of Kronecker sum of matrices, see [5].
To calculate the integrals for n > 0, we use the formula for integration by parts and the well known from the theory of M AP s the matrix differential equations: Then the following relations take place Denote Using this notation, after some algebra we derive from (10) the following recursive formula for calculating the matrices F k (s) : with boundary condition (8).
Having the matrices F n (s) been calculated, we are able to calculate the required matrices Y k (s) by formula (7) which takes the form Now we focus on calculating the matricesỸ k (s), k ≥ 0, introduced in (5). We will show that, for arbitrary distribution function B(t) such that B(0) = 0, these matrices can be calculated via the matrices Y k (s) defined by formula (13).
Using integration by parts, we have whence it follows that Note that Then it follows from (14), (15) that Let now n > 0. Using integration by parts, we have

Conclusion
In this paper, we derived the Laplace-Stieltjes transform w(s) of the stationary distribution of the waiting time in the queueing system M AP/G/1/N with LIFO service discipline. Since the waiting time and service time are the independent random variables, the Laplace-Stieltjes transform v(s) of sojourn time in the system can by trivially calculated using the formula v(s) = w(s)β(s). Using the formulas for the Laplace-Stieltjes transform, we can calculate the expectation and the higher order moments of the waiting time and the sojourn time in the system. The results can be used for optimization of resource and buffer space management and admission control in telecommunication networks, e.g., ad hoc networks with finite buffers and in multihop networks with end-to-end deadlineconstrained traffic with reliability requirements, and for performance evaluation and capacity planning of various real data structures where the last written data must be processed first.