Analysis of a Priority Queue with Phase-Type Service and Failures

We consider a single server queue with two types of customers. We propose a discipline of flexible priority in access that combines the features of randomization and the threshold type control. We introduce a new class of distributions, phase-type with failures (PHF) distribution, that generalizes the well-known phase-type (PH) distribution to the case when failures can occur during service of a customer. The arrival flow is described by the marked Markovian arrival process. The service time distribution is of PHF type with the parameters depending on the type of a customer. Customers of both types can be impatient. Behavior of the system is described by the multidimensional Markov chain. Problem of existence and computation of the stationary distribution of this Markov chain is discussed in brief as well as the problem of computation of the key performancemeasures of the system. Numerical examples are presented that give some insight into behavior of the system performance measures under different values of the parameters defining the strategy of customers access to service.


Introduction
In this paper, we consider a single server queueing model of information transmission system with two types of customers.Type-1 customers can be queued into the buffer having an infinite capacity.The buffer for type-2 customers has a finite capacity.Such kind of systems quite often describes behavior of various telecommunication systems where type-1 customers are interpreted as delay tolerant and type-2 customers are interpreted as loss tolerant; see, for example, [1].Existence of two types of customers causes the necessity of managing the discipline of customers access to the server.Popular disciplines are priority (preemptive or nonpreemptive) disciplines in which a priority is given to one of types and customers of another type have a chance to enter service only when the priority customers are absent in the system.
However, such disciplines are not appropriate when it is necessary to provide more fair access of customers to the server.In particular, in some real world systems, for example, the vehicular ad hoc networks (VANET) that use the IEEE 802.11p protocol, it is necessary to share the available access time between a Control Channel and Service Channels.The Control Channel is used for the periodical dissemination of control information (beaconing) and traffic safety related information event messages.The Service Channels are used to disseminate noncritical information for infotainment applications; see, for example, [2].So it is necessary to alternate access to the server by two types of customers, which cannot be achieved via the classical priority discipline.
Aiming to provide more fairness in access of customers of different type to the server, in this paper, we do not assume existence of an explicit priority given to one of the types.Instead, we suggest randomized choice of a customer for service when both queues are not empty at a service completion epoch.Priority can be given to one of types implicitly by means of fixing higher probability of a choice for service.If we set equal probabilities of the choice of customers of different types for service, in probabilistic sense, we create good conditions for frequent alternation of the type of a customer in service.However, equal probabilities 2 International Journal of Stochastic Analysis may be not reasonable when the intensities of two flows are quite different.So it is important to optimally choose the probability defining the randomized access.The problem becomes even more complicated if impatience of customers should be taken into account and customers of one type are more impatient than the customers of another type.
In the model under study, we account impatience of customers.Because type-2 customers can be dropped (lost) also due to their buffer overflow, additionally we assume that randomization does not work and type-2 customer is always chosen for service if the number of type-2 customers in the buffer exceeds some predefined threshold.To the best of our knowledge such type of mechanisms of customers access to service was not considered in the literature.
One of the popular distributions of service time in queueing literature (and information transmission time in telecommunications literature) is so-called phase-type (PH) distribution.The class of PH distributions is dense (in the sense of a weak convergence) in the set of all probability distributions of nonnegative variables.Thus, the PH distribution is very general and can be used for approximation of an arbitrary distribution; see [3].However, in real life systems during some phases of service (information transmission), the server may fail.The failure occurrence implies the loss of a customer or the necessity of complete repetition of its service or resuming service from the phase at which the failure occurred.The use of the classical PH distribution does not allow taking into account the failures during the service process effectively.In this paper, we introduce and apply extension of the PH distribution, which we call PHF (phasetype with failures) distribution, that allows taking the failures into account.
Last but not least, we consider the model with quite complicated marked Markovian arrival process (MMAP); see [4].Such arrival process of heterogeneous customers is much more complicated than the superposition of the stationary Poisson processes.But it allows taking into account the bursty correlated nature of information transmission processes in modern telecommunication networks.
The rest of the paper is organized as follows.The PHF distribution is introduced and briefly analyzed in Section 2. Mathematical model of the queueing system under study is described in Section 3. Process of the system states is defined in Section 4. Its generator as a block matrix is written down.The problem of ergodicity of this process is discussed in brief and the algorithm for computation of stationary distribution of the system states is chosen.In Section 5, expressions for computation of various performance measures of the system based on the known stationary distribution of the system states are derived.In Section 6, results of numerical experiments are presented.Section 7 concludes the paper.

Phase-Type with Failures (PHF) Distribution
In this paper, we consider the queueing model of information transmission system.We assume that errors can occur during the transmission (service of a customer), which can cause the loss of information (customer) or necessity of retransmission (repetition, in full or partial extent, of customer's service).Thus, to formally describe the service process of an arbitrary customer with account of possible errors, we introduce essential extension of well-known PH distribution; see, for example, [5].We call this new distribution PHF (phase-type with failures) distribution.In defining PH distribution, Neuts has interpreted the time having such a distribution as some sequence of random times called phases, durations of which have an exponential distribution.By analogy, we define PHF distribution as some sequence of random times called stages each of which, in turn, consists of a random number of phases.PHF distribution can characterize different positive random variables, for example, interarrival, interretrial, and service times, in some queueing system.Because in this paper we will use this distribution to model the service time in the queueing model described in the next section, for easier interpretation, we will speak here about the PHF type distribution of a service time.
The PHF type distribution of a service time is defined by the continuous-time Markov chain   ,  ≥ 0, with a finite state space {1, . . ., ,  + 1,  + 2}.The states {1, . . ., } are assumed to be transient.The initial state of the process   at the service beginning moment (which coincides with the moment of the first stage beginning) is chosen among the transient states with probabilities defined by the entries of the stochastic row vector  = ( 1 , . . .,   ).The sojourn time of the chain   in the state ,  = 1, , is exponentially distributed with the parameter   .After this time expires, with probability  ,  ,  = 1, ,   = 1,  + 2,   ̸ = , ∑ +2   =1,  ̸ =  ,  = 1, the process   transits to the state   .The intensities of the transition between transient states of the process   are defined by the subgenerator  that is defined by its entries as follows: () , = −  ,  = 1, , () ,  =    ,  ,  = 1, ,   = 1, ,   ̸ = . ( The states  + 1 and  + 2 are the absorbing states transition which corresponds to the end of the current stage of the service.The transition to the absorbing state  + 1 means the end of the stage and successful completion of customer's service.The intensities of the transition to the absorbing state +1 are defined by the entries of the column vector S 1 : The transition to the absorbing state  + 2 means the end of the stage of the service due to a failure occurrence.The intensities of the transition to the absorbing state  + 2 are defined by the entries of the column vector S 2 : Note that S 2 = −e − S 1 .After the transition to the absorbing state +2, the following three scenarios are possible: (i) with probability  1 , service of a customer is completed and this customer leaves the system permanently without successful service (is lost); (ii) with probability  2 , the next stage of International Journal of Stochastic Analysis 3 service starts and the initial state of the process   ,  ≥ 0, is again chosen among the transient states with probabilities defined by the vector ; (iii) with probability 1 −  1 −  2 , the next stage of service starts and the initial state of the process   is chosen as the state from which the transition to the absorbing state +2 occurred.In both scenarios (ii) and (iii), the intensities of transition of the process   within the set {1, . . ., } of the transient states and to the absorbing states are the same as at the first stage of service.So service of a customer finishes when either the process   transits to the absorbing state  + 1 (this customer is considered as successfully served) or the process   transits, after some stage, to the absorbing state  + 2 and scenario (i) is realized (the customer is lost).In interpretation of the service time as transmission time of some information unit (e.g., a file), scenario (ii) means the necessity of complete retransmission of the unit while scenario (iii) means its retransmission from some point where the error occurs.
Thus, the PHF distribution is defined by the set consisting of the row vector , the matrix , the column vector S 1 , and the probabilities  1 and  2 , while the classical PH distribution is defined only by the row vector  and the matrix .The pair (, ) is called in [5] an irreducible representation of PH distribution.PH distribution can be treated as the special case of PHF when  ,+2 = 0,  = 1, .By analogy with [5] we call the set (, , S 1 ,  1 ,  2 ) an irreducible representation of PHF distribution.

Lemma 1. The LST ℎ(𝑢) is defined by formula
where the column vector function h() is defined by formula where where diag{S 2 } means the diagonal matrix with the diagonal entries defined by the entries of the vector S 2 , where S 2 = −e − S 1 .
Proof of Lemma 1 is implemented based on the known probabilistic interpretation of LST.Let us assume that, independently of the system operation, some virtual stationary Poisson flow of some virtual events, sometimes called catastrophes, arrives.Let  be the intensity of this flow.
We define h() as the column vector entries, of which (h())  have the meaning of the probability that catastrophe will not arrive during the rest of the time having PHF distribution with an irreducible representation (, , S 1 ,  1 ,  2 ) conditioned on the fact that at the given moment the underlying Markov chain   of this distribution stays at the state ,  = 1, .
Using this probabilistic interpretation and formula of total probability, it is easy to derive formula from which and formula of total probability the statement of Lemma 1 immediately follows.
Remark 2. It can be noted that LST of PHF distribution with an irreducible representation (, , S 1 ,  1 ,  2 ) coincides with LST of a classical PH distribution with an irreducible representation (, A).It is well known for the classical PH distribution that its LST is easily calculated given the irreducible representation.However, the inverse problem, to restore the irreducible representation given the values of LST, is very complicated and does not have a unique solution, while, namely, the components of the irreducible representation are necessary to write down the generator of the Markov chain describing behavior of the states of some queueing system with PH service process.Analogously, the noted coincidence of LST of PHF distribution with an irreducible representation (, , S 1 ,  1 ,  2 ) with LST of a classical PH distribution with an irreducible representation (, A) does not imply that we can avoid introduction of PHF distribution and substitute this distribution by the classical PH distribution.

Corollary 3.
The moments   of PHF distribution with an irreducible representation (, , S 1 ,  1 ,  2 ) are calculated by formula In particular, the expectation is given by  1 = (−A) −1 e.
Let ℎ 1 () be LST of the distribution of the service time which is finished successfully (probability that the service time is finished successfully and no catastrophe arrives during this time) and let ℎ 2 () be LST of the distribution of the service time that is finished by a customer loss (probability that the service time is finished by a customer loss and no catastrophe arrives during this time).Lemma 4. The LSTs ℎ 1 () and ℎ 2 () are defined by formulas Proof of Lemma 4 uses similar arguments as the proof of Lemma 1.
Corollary 5.The probability   that an arbitrary service will be finished successfully and the probability   that International Journal of Stochastic Analysis an arbitrary service will be finished by a customer's loss are given by ) of an arbitrary customer conditioned on the fact that it is known that service is finished successfully (is failed) are computed as follows: (11)

Mathematical Model
We consider a single server queueing system with an infinite buffer and a finite buffer of capacity , the structure of which is presented in Figure 1.
It is reasonable to store the set of numerous parameters, which characterize the MMAP, as the entries of the square matrices  0 ,   ,  = 1, 2, defined as follows.The entry (  ) ],]  =  ]  ()  ],]  , ], ]  = 0, ,  = 1, 2, of the matrix   defines the intensity of transition of the process ]  from the state ] to the state ]  which is accompanied by arrival of type- customer.The modulus of the diagonal entry ( 0 ) ],] of the matrix  0 defines intensity of departure of the process ]  from the state ] : ],]  , ], ]  = 0, , ] ̸ = ]  , of the matrix  0 defines the intensity of transition of the process ]  from the state ] to the state ]  which is not accompanied by arrival of any customer.
The matrix (1) =  0 +  1 +  2 is the generator of the Markov chain ]  ,  ≥ 0. The average intensity of customers arrival (fundamental rate)  is defined by the formula  = ( 1 +  2 )e, where  is the row vector of the stationary probabilities of the Markov chain ]  .This vector is the unique solution to the system (1) = 0, e = 1.
Here and throughout this paper e is a column vector of appropriate size consisting of 1's, and 0 is a row vector of appropriate size consisting of zeroes.The average intensity of We assume that the service times of type-1 and type-2 customers have PHF distribution with the parameters depending on the type of a customer.Namely, we assume that parameters of PHF distribution of service time of type-,  = 1, 2, customers are given by the irreducible representation ( () ,  () , S ()  1 ,  () 1 ,  () 2 ).Let   ,  = 1, 2, be the number of transient states of underlying Markov chain of PHF service process of type- customers.
If the server is idle during an arbitrary customer arrival epoch, the customer immediately starts service.If the server is busy during an arbitrary type-1 customer arrival epoch, this customer goes to the infinite buffer.If the server is busy during an arbitrary type-2 customer arrival epoch, this customer goes to the finite buffer of capacity .If this buffer is full, the customer is lost.
We assume the following strategy of choosing the customers for service.Let some probability , 0 ≤  ≤ 1, and threshold , 0 ≤  ≤ , be fixed.If, during the service completion epoch, there are customers in both buffers and the number of type-2 customers is less than or equal to , then type-1 customer is chosen for service with probability  or type-2 customer occupies the server with the complimentary probability.If, during the service completion epoch, the number of type-2 customers is greater than , then type-2 customers are chosen for service.If one of the buffers is empty at the service completion epoch, service is provided to the customer from another buffer, if any, without randomization.Note that if  = 0 or  = 0, then type-1 customer can be chosen for service only if type-2 customers are absent in the system.This means that type-2 customers have nonpreemptive priority over type-1 customers.If  = 1, then type-2 customers are chosen for service only if the number of such customers in the buffer exceeds the value .In other words, if the number of type-2 customers in the buffer does not exceed the threshold , type-1 customers have nonpreemptive priority over type-2 customers.Thus, the considered admission strategy is essentially more flexible than the strategy with nonpreemptive priority.
The customers in the buffers are assumed to be impatient; for example, each type- customer leaves the buffer after an exponentially distributed, with the parameter   ,   ≥ 0,  = 1, 2, amount of time due to the lack of service.
Let us analyze the stochastic process defining behavior of the described queueing model.
International Journal of Stochastic Analysis 5

Process of System States and Its Stationary Distribution
Let, during the epoch ,  ≥ 0, (i)   ,   ≥ 0, be the number of type-1 customers in the buffer; (ii)   ,   ∈ {0, 1, 2}, be the state of the server (  = 0 when the server is idle,   = 1 when the server is occupied by type-1 customer, and   = 2 when the server provides service to type-2 customer); (iii)   ,   = 0, , be the number of type-2 customers in the buffer; (iv) ]  , ]  = 0, , be the state of the underlying process of the MMAP; (v)   be the state of PH service process,   = 1,    .
The Markov chain   ,  ≥ 0, has the following state space: Let us introduce the following notations: (i)  is the identity matrix and  is a zero matrix of appropriate dimension.If it is necessary, dimension of the matrix is indicated by the suffix.
(iv)  − is the square matrix of size  with all zero entries except the entries ( − ) ,−1 ,  = 1, , which are equal to 1.
(v)  − 1 is the square matrix of size  with all zero entries except the entries ( − 1 ) ,−1 ,  = 1, , which are equal to 1.
(viii) ẽ is the column vector of size  with all zero entries except the entry ẽ0 which is equal to 1.
(x) ⊗ is the symbol of the Kronecker product of matrices; see, for example, [6].
Let us enumerate the states of the Markov chain   in the lexicographic order and refer to the set of states of the chain having value  of the first components of the Markov chain as level ,  ≥ 0.
Let  be the generator of the Markov chain   ,  ≥ 0.
Using results from [7], it is possible to show that if  1 > 0, the Markov chain   is ergodic for any set of the system parameters.
It follows from [5] that the necessary and sufficient ergodicity condition of the quasi-birth-and-death process is the fulfillment of the inequality where the row vector y is the unique solution to the following system of linear algebraic equations: The ergodicity condition for the considered model is easily verified algorithmically.Finite system (20) of linear algebraic equation is solved on computer.Then, fulfillment of inequality ( 19) is checked.

(22)
It is well known that the probability vectors   ,  ≥ 0, satisfy the following system of linear algebraic equations: called equilibrium or Chapman-Kolmogorov equations.This system is infinite and the generator , generally speaking, does not possess Toeplitz-like property.So the system cannot be directly solved on computer.Such type of equations arises quite often in analysis of queues with impatient customers and retrial queueing systems.Usually in the literature they are solved by means of various truncation methods.Indeed, this system can be effectively solved by means of the numerically stable algorithm that is presented in [8].

Performance Measures of the System
Having computed the vectors of the stationary probabilities   ,  ≥ 0, it is possible to compute a variety of the performance measures of the system.The average number of customers in the system is computed by The probability  busy that the server is busy at an arbitrary moment is computed by The probability  busy- that, at an arbitrary moment, the server provides service to type- customer is computed by The probability  idle that the server is idle at an arbitrary moment is computed by The average number  type-1 buffer of type-1 customers in the buffer is computed by The average number  type-2 buffer of type-2 customers in the buffer is computed by The intensity  type- out ,  = 1,2, of the output flow of successfully served type- customers is computed by The intensity  type- failure-loss ,  = 1, 2, of the flow of type- customers that leave the system due to the failure occurrence is computed by The loss probability  type-2 ent-loss of an arbitrary type-2 customer upon arrival due to the buffer overflow is computed by The loss probability  type-1 imp-loss of an arbitrary type-1 customer due to impatience is computed by The loss probability  type-2 imp-loss of an arbitrary type-2 customer due to impatience is computed by The probability  type- failure-loss of an arbitrary type- customer loss due to a failure occurrence is computed by The probability  type- loss of an arbitrary type- customer loss is computed by

Numerical Example
In the numerical example we assume that the finite buffer capacity is  = 10.The value of the threshold  is set to be equal to 8.

International Journal of Stochastic Analysis
The MMAP arrival process has the coefficient of correlation  cor = 0.2 and the coefficient of variation  var = 12. ( The average arrival rate of this process is  = 5, the average arrival rate of type-1 customers is  1 = 3.33, and the average arrival rate of type-2 customers is  2 = 1.67.
To illustrate importance of taking into account possible failures in the service process, let us consider two cases of service processes.In the first case, coded as PH, we assume that service of the customers is modelled by two phase-type service processes.Namely, we assume that the service time of type-1 customers is defined by the vector  (1) = (0.8, 0.2) and the matrix  (1) = ( −12 9 0 −12 ).The mean service time is equal to 0.13333.The service time of type-2 customers is defined by the vector  (2) = (0.6, 0.1, 0.3) and the matrix  (2) = ( ).The mean service time is equal to 0.21582.In the second case, coded as PHF, we assume that the service times of the customers have PHF distributions with irreducible representations ( () ,  () , S ()  1 ,  () 1 ,  () 2 ) ,  = 1,2, where  () and  () ,  = 1, 2, are the same as in the first case and S (1)  1 = (2.6,11.2)  , S (2)  1 = (2.7,1.7, 7.3)  ,  on the parameter .The quite essential difference between values of the loss probability  type- loss ,  = 1, 2, for case 1 when the service time has PH distribution and case 2 when the service time has PHF distribution is worth noting, while the differences between the average service times are not so essential.For type-1 customer the average value of the service time having PH distribution is equal, as mentioned above, to 0.13333.The average value of the service time having PHF distribution is equal to 0.14143 (the probability  success that an arbitrary service will be finished successfully is equal to 0.9914).For type-2 customer the average value of the service time having PH distribution is equal, as mentioned above, to 0.21582.The average value of service time having PHF distribution is equal to 0.2307 (the probability  success that an arbitrary service will be finished successfully is equal to 0.9688).Now, let us illustrate the dependence of the main performance measures of the system on the parameters  and  that define the strategy of customers access to the server.To this end let us consider the system with PHF service time distribution of type-1 and type-2 customers defined above and vary the parameter  from 0 to 1 with step 0.01 and the parameter  from 1 to 10 with step 1.As it is seen from Figures 4 and 5, the loss probability of type-1 customers decreases and the loss probability of type-2 customers increases with growth of the parameters  and .This finding can be explained as follows.With increasing of  and , type-1 customers are more often chosen for service, so they obtain the better conditions and the probability of their loss decreases.Since type-2 customers are competing for the server with type-1 customers, their loss probability grows.However we can see the opposite trend in Figures 6  and 7: the loss probability  type-1 failure-loss increases and the loss probability  type-2 failure-loss decreases with increasing of  and .This can be explained as follows.When  and  are small, type-1 customers are rarely chosen for service and they are lost, basically, due to impatience before service.So the probability of an arbitrary type-1 customer loss due to a failure occurrence during its service is small.When the parameters  and K grow, the chance to start service for type-1 customer increases and the probability  type-1 failure-loss also increases.For type-2 customers, we see the opposite situation and the loss probability  type-2 failure-loss decreases with increasing of  and .As it is seen from Figure 8 the loss probability  type-2 ent-loss of an arbitrary type-2 customer upon arrival due to the buffer overflow essentially increases with increase of  and .Due to this fact, the probability  busy that the server is busy at an arbitrary moment that is presented in Figure 9 decreases with growth of  and .

International Journal of Stochastic Analysis
Let us introduce the value  =  1  type-1 loss This value has the meaning of an average number of customers lost in the system per unit of time and may be considered as some kind of cost criterion of quality of the system operation.It is obvious that the value  depends on the probability  and the threshold  that defines the strategy of customers access to the server; that is,  = (, ).customers can bring some profit even in terms of this trivial cost criterion.Note that variety of various optimization problems where the weighted sum of some performance measures should be minimized or maximized under restrictions imposed on the values of other performance measures can be formulated and solved based on the results of probabilistic analysis presented in this paper.

Conclusion
We analyzed a queueing model with a single server which provides service for two types of customers.The system has a finite buffer for one type of customers and an infinite one for another type.Service to customers of the same type is provided according to first in-first out discipline.If both buffers are not empty at the moment of the service completion, a type of the next customer, which will be picked up for service, is defined randomly, if the number of customers in a finite buffer does not exceed some preassigned threshold.Errors can occur during service of customers.To simplify account of these errors, which may lead to a customer loss, repeated service, or partial repeated service, notion of phasetype distribution with failures (PHF) was introduced in this paper.Customers of both types are impatient.This queueing model can be used, for example, for approximating the process of information transmission using the protocol of time division between Control Channel and Service Channels.The stationary distribution of five-dimensional Markov chain defining the dynamics of the system is computed and expressions for the key performance measures of the system are derived.Results of numerical examples illustrating effect of parameters of customer's admission strategy are presented.

MMAP T y p e - 1 T y p e - 2 PHF 1 Figure 1 :
Figure 1: Queueing system under study.
the parameter  from 0 to 1 with the step 0.01.Figures2 and 3illustrate the dependence of the loss probabilities

Figure 4 :Figure 5 :Figure 6 :
Figure 4: Dependence of the loss probability  type-1 loss on the parameters  and .

Figures 4 and 5
Figures 4 and 5 illustrate the dependence of the loss probabilities  type-1 loss and  type-2 loss on the parameters  and .Figures 6 and 7 illustrate the dependence of the loss probabilities  type-1 failure-loss and  type-2 failure-loss on the parameters  and .Figures 8 and 9 illustrate the dependence of the loss probability  type-2 ent-loss and the probability  busy on the parameters  and .As it is seen from Figures4 and 5, the loss probability of type-1 customers decreases and the loss probability of type-2 customers increases with growth of the parameters  and .This finding can be explained as follows.With increasing of  and , type-1 customers are more often chosen for service, so they obtain the better conditions and the probability of

Figure 7 :Figure 8 :Figure 9 :
Figure 7: Dependence of the loss probability  type-2 failure-loss on the parameters  and .

Figure 10 :
Figure 10: Dependence of the cost criterion (, ) on the parameters  and .