## 2 Mathematical Model  
We consider a single-server queueing system with an infinite buffer, the structure of which is presented in Figure 1.  
The arrival of two types of customers is defined by the _MMAP_ (see [16]), which is the transparent generalization of the well-known _MAP_ (Markov Arrival Process) (see, e.g., [17; 18; 19]) to the case of heterogeneous customers. This process is defined by the irreducible continuous-time Markov chain \(\
u_{t}\), \(t\geq 0\), having a finite state space \(\{1,2,...,W\}\) and the matrices \(D_{0},\ D_{1},\ D_{2}\) such that the matrix \(D_{r}\) consists of the intensities of transitions of the chain \(\
u_{t}\) that are accompanied by the arrival of the type-\(r\) customer, \(r=1,2\). The non-diagonal entries of the matrix \(D_{0}\) define the intensity of the corresponding transition of the chain \(\
u_{t}\) without the generation of customers, and the modules of the negative diagonal entries define the rates of the exit of the process \(\
u_{t}\) from the corresponding states. The matrix \(D(1)=D_{0}+D_{1}+D_{2}\) is the generator of the Markov chain \(\
u_{t}\). The average intensity of customers' arrival (fundamental rate) \(\lambda\) is defined by the formula \(\lambda=\mathbf{\theta}(D_{1}+D_{2})\mathbf{e}\), where \(\mathbf{\theta}\) is the row vector of the stationary probabilities of the Markov chain \(\
u_{t}\). This vector is the unique solution to the system \(\mathbf{\theta}D(1)=\mathbf{0},\ \mathbf{\theta}\mathbf{e}=1\). Here and throughout this paper, \(\mathbf{e}\) is a column vector of appropriate size consisting of ones, and \(\mathbf{0}\) is a row vector of appropriate size consisting of zeroes. The average intensity of type-\(r\) customers' arrival \(\lambda_{r}\) is defined by the formula \(\lambda_{r}=\mathbf{\theta}\,D_{r}\mathbf{e},\ \ r=1,\ 2\). A more detailed description of the _MMAP_ can be found, e.g., in [20]. Upon arrival, type-\(r\) customers are placed into the \(r\)th storage. The first and the second storages have the finite capacities \(K\) and \(R\), correspondingly. Each type-\(r\) customer transfers from the storage to the infinite buffer after a random time that is exponentially distributed with the parameter \(\gamma_{r},\ \gamma_{r}\geq 0,\ r=1,2\). We assume that Type-1 customers have a priority over Type-2 customers. This priority is achieved due to the higher rate of transfer from the storage to the buffer. Thus, we assume \(\gamma_{1}>\gamma_{2}\). To avoid starvation of the server and improve the performance of the system, we assume the following. If at a service completion moment, the buffer is empty, but the first storage is not empty,  
Figure 1: Queueing system under study. MMAP, Marked Markov Arrival Process; PH, Phase-Type. the Type-1 customer is immediately picked up from the storage and starts service. If this storage is empty, but the second storage is not empty, the Type-2 customer is picked up from this storage and starts service. If both storages, as well as the buffer are empty, the server stays idle until the first arrival of a customer of any type. This customer immediately starts service without visiting a storage. The customers staying in the \(r\)th storage are assumed to be impatient. Each type-\(r\) customer leaves the corresponding storage (is lost) after an exponentially distributed with the parameter \(\alpha_{r},\ \alpha_{r}\geq 0,\ r=1,2\), amount of time. After entering the infinite buffer, the customers are assumed to become identical. The service time of an arbitrary customer has a \(PH\) distribution with the irreducible representation \((\beta,S)\). This service time can be interpreted as the time until the underlying Markov process \(m_{t},t\geq 0\), with a finite set \(\{1,\ldots,M\}\) of the transient states and the absorbing state \(M+1\), reaches the state \(M+1\) conditional on the fact that the initial state of this process is selected among the transient states with the probabilities given by the entries of the stochastic row vector \(\beta\).