1 Introduction

Consider a queuing system (QS) with two input flows, where customers of the first flow have preemptive priority over customers of the second flow, and at the time of the end of service, a high-priority customer can drop all low-priority customers with some probability.

This phenomenon, when a customer drops other customers from the buffer when it leaves, is called a renovation. The class of systems with renovation arose as a result of the development of the ideas of QS with negative customers [1]. The difference is that negative customers are a separate type of customers and they either "kill” or push out ordinary customers when they arrive rather than leave, and they themselves do not require servicing. There is an extensive literature on systems with negative customers, a detailed overview of which can be found, for example, in [2] starting with the earliest work on the topic, or in [3] with a discussion of more recent publications. In turn, we will mention only a few works reflecting various areas of research. In particular, in [4, 5] systems with negative customers and limited sojourn times are studied, in [610] systems with negative customers and retrial calls are presented, a number of works [1116] is devoted to the study of such systems in discrete time. In addition, there are works that consider systems with group arrivals of customers, and some of them assume correlated input flows [1620]; we also note a number of publications covering the characteristics of the so-called QS with revenue [2125], and the above categories do not exclude mutual intersections and the imposition of additional conditions; for example, in [6, 13, 16, 18, 20, 26] considered systems also contain walks or vacations of devices during periods of inactivity. We also note a number of recent foreign works [2729], which contain the corresponding bibliography.

One of the first works on systems with renovation was [30], where the stationary probability distribution was obtained in terms of a generating function. In later publications [3133], a different method for finding the desired probabilities was proposed and some temporal characteristics were found. At the same time, the concept of a generalized renovation was introduced, when not all customers are dropped from the buffer, but a random number with a given distribution.

Note that a generalized renovation can be thought of as an Active Queue Management (AQM) mechanism. Such mechanisms imply a decision to deny a request for service, depending on the state of the system, in order to limit the number of customers in the queue. The simplest, but often optimal, is the threshold control strategy [34, 35]. In other cases, various stochastic algorithms are widely used, in particular RED (Random Early Detection), according to which the probability of failure increases linearly over a certain interval of the number of customers. Usually, a decision is made at the time of the arrival of the customer, but nothing prevents it from being made at the time of the withdrawal of the customer (in relation to existing or future customers). Following this approach, the work [36] compares a generalized renovation with RED-like algorithms. Key research findings on AQM can be found in [37, 38].

The stochastic dropping model considered in this work can also be considered as a variation of AQM. In particular, the model effectively limits the number of type 2 customers; for any intensity of their arrival the system remains ergodic, which can be important in the case of DDoS (Distributed Denial of Service) attacks (see below).

A classical system with two types of customers and preemptive priority was introduced in [39], which also derived, in particular, the ergodicity condition, the downtime probability, the mean and variance of the number of low-priority customers, etc. Note that the concept of renovation can be generalized to systems with priorities in many ways. We will adhere to the direction set by publications [40, 41], where it was assumed that high-priority customers (type 1), when leaving, with some probability drop all low-priority customers (type 2). Thus, type 1 customers play the role of negative customers for type 2 customers, but with the above differences.

Practical interest in the queuing systems considered above can be motivated as follows. First, such models can help analyze the behavior of computer and telecommunication systems under the conditions of data loss, which can be caused by all sorts of reasons, from simple breakdowns and optimizing work in this way to the impatience of users of such systems [40]. The drop mechanism can also be used to regulate the traffic flow and differentiated user experience policy [42, 43]. All of these possibilities can be realized within different AQM strategies.

In addition, we can talk about the analysis (monitoring) of information security threats, since network security is a rather important problem both from a theoretical point of view and from the point of view of engineering applications. There are many types of network attacks (viruses, worms, trojans, DDoS attacks) that can cause significant disruptions and severe problems in the operation of computer networks. Most of the research in this area concentrates on methods of detecting attacks and responding, and there are not many works devoted to the analytical study of this problem, despite the fact that this could contribute to an increase in knowledge about the behavior of malicious programs and, accordingly, improve the quality of assessing their impact on the system [4447].

Thus, the QS that we analyze here can emulate the operation of an information system subject to various kinds of attacks in order to disrupt its activity or gain unauthorized access to data. The system receives its usual user flow of customers (customers of type 2) but from time to time receives a conditional "viral” request (request of type 1). In case of a passive attack, the malicious application simply leaves the system. This situation can be regarded as the fact that the security system recognized the threat and processed it, preventing it from being harmful. Otherwise, when the security system failed to cope with the threat or the attack turned out to be active, this malicious customer drops the entire stream of "good” customers.

The study of the system considered in this work originated in [41], but there some results were obtainedFootnote 1 only for the special case of deterministic dropping when a request leaves (with probability one); in particular, that work derived a formula for the probability of downtime. The work [40] considered a similar system with non-preemptive priority, but it turned out to be more complex for theoretical analysis. Note that for small average servicing time of a type 2 request, the characteristics of systems with preemptive and non-preemptive priority should be similar.

Since the terminology for updating systems with priorities has not yet been adopted, we will call the model under consideration a system with stochastic dropping.

Note that this system is an intermediate case between the classic system with preemptive priority without dropping [39] and a system with deterministic dropping [41], so we can expect that its characteristics will also fall in the middle, and characteristics in extreme cases can be obtained by passing to the corresponding limit. Theoretical and numerical analysis confirms this assumption.

The paper is organized as follows: in the second section we describe the mathematical model of the QS and formulas for the distribution of the number of customers in the system; in the third section, a method for calculating the probability of system downtime is described; in the fourth, we pay the most attention to calculating the average number of type 2 customers; in the fifth, to finding the probability of servicing a customer of type 2, and in the sixth section, we give a numerical example.

2 Mathematical Model

Two types of customers flow into a single-line queuing system with an infinite buffer. The flows entering the system are Poisson with intensity λ1 for customers of type 1 and intensity λ2 for customers of type 2. Servicing times of customers have an exponential distribution with parameters μ1 and μ2 respectively. Customers of type 1 have preemptive priority compared to customers of type 2, i.e., if there are customers in the queue from both streams for servicing, a high-priority customer is selected, and a low-priority customer can be selected for servicing only if there are no customers of type 1 in the queue. In addition, if at the time of the arrival of a high-priority customer there is a customer of type 2, then its servicing is immediately interrupted and it returns to the head of the queue, and the type 1 customer arrives at the device. Customers of a given flow are served in the order of their arrival. Moreover, at the end of service, a high-priority customer on the device can either simply leave the system with probability p, or with probability q it can also drop all customers of the second type from the buffer, p + q = 1.

Operation of this QS can be described by the Markov process X(t) = {ν1(t), ν2(t)}, where ν1(t) and ν2(t) are the number of customers of the first (i) and second (j) type, with a discrete set of states X = {(ij), i ⩾ 0, j ⩾ 0} (Fig. 1).

Fig. 1
figure 1

Transition rate diagram.

The first question is regarding the ergodicity of the system. Since customers of type 2 have no effect on customers of type 1, the behavior of ν1(t) will be the same as in the corresponding MM∣1 system, with the ergodicity condition ρ1 < 1, ρi = λi/μi, i = 1, 2. At the same time, since sometimes customers of type 2 are dropped entirely (at intervals with a finite average), then ν2(t) cannot tend to infinity, regardless of ρ2. Thus, the condition for the ergodicity of the system is ρ1 < 1, and here lies a qualitative difference with the classical system [39], where the condition for ergodicity was ρ1 + ρ2 < 1. In what follows, we will assume that condition ρ1 < 1 is fulfilled by default.

We denote by pi,j, i ⩾ 0, j ⩾ 0 the stationary probability that there are i high-priority customers and j low-priority customers in the system. A stationary distribution exists and satisfies the following system of equilibrium equations:

$$({\lambda }_{1}+{\lambda }_{2}){p}_{0,0}={\mu }_{1}p{p}_{1,0}+{\mu }_{2}{p}_{0,1}+{\mu }_{1}q\mathop{\sum }\limits_{j=0}^{\infty }{p}_{1,j},$$
(1)
$$({\lambda }_{1}+{\lambda }_{2}+{\mu }_{1}){p}_{i,0}={\lambda }_{1}{p}_{i-1,0}+{\mu }_{1}p{p}_{i+1,0}+{\mu }_{1}q\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i+1,j},\quad i\geqslant 1,$$
(2)
$$({\lambda }_{1}+{\lambda }_{2}+{\mu }_{2}){p}_{0,j}={\mu }_{1}p{p}_{1,j}+{\lambda }_{2}{p}_{0,j-1}+{\mu }_{2}{p}_{0,j+1},\quad j\geqslant 1,$$
(3)
$$({\lambda }_{1}+{\lambda }_{2}+{\mu }_{1}){p}_{i,j}={\mu }_{1}p{p}_{i+1,j}+{\lambda }_{1}{p}_{i-1,j}+{\lambda }_{2}{p}_{i,j-1},\quad i,j\geqslant 1.$$
(4)

We introduce notation for marginal probabilities:

$${p}_{i,\cdot }=\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j},\quad {p}_{\cdot ,j}=\mathop{\sum }\limits_{i=0}^{\infty }{p}_{i,j},\quad i,j\geqslant 0.$$

Since customers of type 2 do not affect high-priority customers in any way, the distribution of the number of high-priority customers will correspond to the distribution of the number of customers in the QS of type MM∣1, i.e.,

$${p}_{i,\cdot }=(1-{\rho }_{1}){\rho }_{1}^{i},\quad i\geqslant 0,$$

where the ergodicity condition ρ1 < 1 must hold.

Next, we introduce the notation for the generating function

$$B(u,v)=\mathop{\sum }\limits_{i=0}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j}{u}^{i}{v}^{j}.$$
(5)

Then it holds that

$$\begin{array}{rcl}B(u,0)&=&\mathop{\sum }\limits_{i=0}^{\infty }{p}_{i,0}{u}^{i},\\ B(0,v)&=&\mathop{\sum }\limits_{j=0}^{\infty }{p}_{0,j}{v}^{j},\\ B(u,1)&=&\mathop{\sum }\limits_{i=0}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j}{u}^{i}=\mathop{\sum }\limits_{i=0}^{\infty }{p}_{i,\cdot }{u}^{i}=\frac{1-{\rho }_{1}}{1-{\rho }_{1}u},\\ B(1,v)&=&\mathop{\sum }\limits_{i=0}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j}{v}^{j}=\mathop{\sum }\limits_{j=0}^{\infty }{p}_{\cdot ,j}{v}^{j}.\end{array}$$

Now let us find an expression for the generating function. To do this, we multiply Eqs. (1)–(4) by uivj and sum over all possible values of i and j, getting

$$\begin{array}{cccc}({\lambda }_{1}+{\lambda }_{2}+{\mu }_{1})B(u,v)-{\mu }_{1}{p}_{0,0}+({\mu }_{2}-{\mu }_{1})\mathop{\sum }\limits_{j=1}^{\infty }{p}_{0,j}{v}^{j}\\ ={\mu }_{1}p{p}_{1,0}+{\mu }_{2}{p}_{0,1}+{\mu }_{1}q\frac{1}{u}\mathop{\sum }\limits_{j=0}^{\infty }{p}_{1,j}u+{\lambda }_{1}\mathop{\sum }\limits_{i=1}^{\infty }{p}_{i-1,0}{u}^{i}+{\mu }_{1}p\mathop{\sum }\limits_{i=1}^{\infty }{p}_{i+1,0}{u}^{i}\\ +{\mu }_{1}q\mathop{\sum }\limits_{i=1}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i+1,j}{u}^{i}+{\mu }_{1}p\mathop{\sum }\limits_{j=1}^{\infty }{p}_{1,j}{v}^{j}+{\lambda }_{2}\mathop{\sum }\limits_{j=1}^{\infty }{p}_{0,j-1}{v}^{j}+{\mu }_{2}\mathop{\sum }\limits_{j=1}^{\infty }{p}_{0,j+1}{v}^{j}\\ +{\mu }_{1}p\mathop{\sum }\limits_{i=1}^{\infty }\mathop{\sum }\limits_{j=1}^{\infty }{p}_{i+1,j}{u}^{i}{v}^{j}+{\lambda }_{1}\mathop{\sum }\limits_{i=1}^{\infty }\mathop{\sum }\limits_{j=1}^{\infty }{p}_{i-1,j}{u}^{i}{v}^{j}+{\lambda }_{2}\mathop{\sum }\limits_{i=1}^{\infty }\mathop{\sum }\limits_{j=1}^{\infty }{p}_{i,j-1}{u}^{i}{v}^{j}.\end{array}$$

After transformations, we get that

$$B(u,v)=\frac{\left({\mu }_{1}v(u-p)-{\mu }_{2}u(v-1)\right)B(0,v)+{\mu }_{1}qv(B(u,1)-{p}_{0,\cdot })+{\mu }_{2}{p}_{0,0}u(v-1)}{{\lambda }_{1}uv(1-u)+{\lambda }_{2}uv(1-v)+{\mu }_{1}v(u-p)}.$$
(6)

Then the distribution of the number of low-priority customers is described by the expression

$${p}_{\cdot ,j}={\left.\frac{1}{j!}\frac{{\partial }^{j}B(1,v)}{\partial {v}^{j}}\right|}_{v = 0},$$

and the distribution of the number of customers of the first and second types is given by the formula

$${p}_{i,j}={\left.\frac{1}{i!j!}\frac{{\partial }^{i+j}B(u,v)}{\partial {u}^{i}\partial {v}^{j}}\right|}_{u = v = 0}.$$

Next, we find the zeros of the denominator in (6), i.e., roots of the quadratic polynomial with respect to the variable u

$${u}_{1,2}={u}_{1,2}(v)=\frac{{\lambda }_{1}+{\lambda }_{2}(1-v)+{\mu }_{1}\pm \sqrt{{({\lambda }_{1}+{\lambda }_{2}(1-v)+{\mu }_{1})}^{2}-4{\lambda }_{1}{\mu }_{1}p}}{2{\lambda }_{1}}.$$
(7)

Let us prove that 0 < u2(v) < 1 given that ρ1 = λ1/μ1 < 1. To do this, consider the behavior of the function λ1u(1 − u) + λ2u(1 − v) + μ1(u − p) from the denominator of (6). For u = 0 we get  − μ1p < 0, for u = 1 we get λ2(1 − v) + μ1(1 − p) > 0, 0 < p < 1. Since the graph of this function is a parabola whose branches are directed downward (Fig. 2), we can conclude that the root of the quadratic polynomial lying in the interval from 0 to 1 exists and, moreover, it will be the smaller root of this polynomial.

Fig. 2
figure 2

Illustration for the statement that 0 < u2(v) < 1.

Due to the fact that the generating function B(uv) is a continuous function for uv ∈ [0, 1], when we substitute (u2v), 0 < u2 < 1, into the expression (6) the numerator must turn to zero simultaneously with the denominator. Therefore, we have

$$\left({\mu }_{1}v({u}_{2}-p)-{\mu }_{2}{u}_{2}(v-1)\right)B(0,v)+{\mu }_{1}qv(B({u}_{2},1)-{p}_{0,\cdot })+{\mu }_{2}{p}_{0,0}{u}_{2}(v-1)=0,$$

where, as we recall,

$$B({u}_{2},1)=\frac{1-{\rho }_{1}}{1-{\rho }_{1}{u}_{2}},\quad {p}_{0,\cdot }=(1-{\rho }_{1}).$$

Thus, the expression for B(0, v) becomes

$$B(0,v)=\frac{{\mu }_{1}q{\rho }_{1}{u}_{2}({\rho }_{1}-1)v+(1-{\rho }_{1}{u}_{2}){\mu }_{2}{u}_{2}(1-v){p}_{0,0}}{(1-{\rho }_{1}{u}_{2})({\mu }_{1}v({u}_{2}-p)-{\mu }_{2}{u}_{2}(v-1))},$$
(8)

and for a complete solution of the problem it remains only to find the probability of system downtime p0,0.

3 Probability of System Downtime

Consider the denominator of the expression (8). Since v ∈ [0, 1], at the extreme points of the segment the expression takes the value μ2u2 > 0 for v = 0 and for v = 1, the value μ1v(u2 − p). Let us find its sign. Due to the fact that from the denominator of (6)

$${\lambda }_{1}{u}_{2}(1-{u}_{2})+{\lambda }_{2}{u}_{2}(1-v)+{\mu }_{1}({u}_{2}-p)=0,$$

where λ1u2(1 − u2) > 0 and λ2u2(1 − v) > 0, we can conclude that μ1(u2 − p) < 0. This means that there exists v* ∈ (0, 1) such that the denominator (8) vanishes, which means that the numerator (8) must also vanish:

$${\mu }_{1}q{\rho }_{1}{u}_{2}({v}^{* })({\rho }_{1}-1){v}^{* }+(1-{\rho }_{1}{u}_{2}({v}^{* })){\mu }_{2}{u}_{2}({v}^{* })(1-{v}^{* }){p}_{0,0}=0,$$

which, taking into account 0 < u2(v) < 1, implies that

$${p}_{0,0}=\frac{{\lambda }_{1}q(1-{\rho }_{1}){v}^{* }}{{\mu }_{2}(1-{\rho }_{1}{u}_{2}({v}^{* }))(1-{v}^{* })}.$$
(9)

Knowing p0,0, we can calculate all stationary probabilities and characteristics of the system.

Now let us show that the behavior of p0,0 on both boundaries of the segment p ∈ [0, 1] corresponds to the results obtained earlier in [39, 41].

Case 1 Let p → 0; then we need to prove that

$${p}_{0,0}\to {p}_{0,0}^{(0)}=\frac{{\lambda }_{1}(1-{\rho }_{1})}{{\mu }_{2}}\frac{{z}_{2}}{1-{z}_{2}},\quad {v}^{* }\to {z}_{2},{u}_{2}\to 0,$$

where the expression for z2 is [41]

$${z}_{2}=\frac{{\lambda }_{1}+{\lambda }_{2}+{\mu }_{1}-\sqrt{{({\lambda }_{1}+{\lambda }_{2}+{\mu }_{1})}^{2}-4{\lambda }_{2}{\mu }_{2}}}{2{\lambda }_{2}}.$$
(10)

For p → 0, for any value of v it holds that u2 → 0. Therefore, to find v* we obtain the asymptotic expansion of the expression for u2 using the Taylor formula for p → 0:

$${u}_{2}=\frac{{\mu }_{1}}{{\lambda }_{1}+{\lambda }_{2}(1-v)+{\mu }_{1}}p+o(p),$$
(11)

and now

$$p-{u}_{2}=\frac{{\lambda }_{1}+{\lambda }_{2}(1-v)}{{\lambda }_{1}+{\lambda }_{2}(1-v)+{\mu }_{1}}p+o(p).$$
(12)

Next, we equate the denominator in (8) to zero and get

$$\frac{v}{1-v}=\frac{{\mu }_{2}{u}_{2}}{{\mu }_{1}(p-{u}_{2})}.$$
(13)

We substitute asymptotic expressions (11) and (12) into the right-hand side of this equality, getting

$$\frac{v}{1-v}=\frac{{\mu }_{2}}{{\lambda }_{1}+{\lambda }_{2}(1-v)}+o(1),$$
(14)

and as a result, after passing to the limit for p → 0, we obtain the equation

$${\lambda }_{2}{v}^{2}-({\lambda }_{1}+{\lambda }_{2}+{\mu }_{2})v+{\mu }_{2}=0,$$

which exactly matches the equation from [41] for computing 0 < z2 < 1. Thus, the convergence of p0,0 to \({p}_{0,0}^{(0)}\) follows automatically from v* → z2, u2 → 0.

Case 2. Let ρ1 + ρ2 < 1. Let p → 1. Then we need to prove that

$${p}_{0,0}\to {p}_{0,0}^{(1)}=1-{\rho }_{1}-{\rho }_{2},\quad {v}^{* }\to 1,{u}_{2}\to 1,$$

where the expression for \({p}_{0,0}^{(1)}\) is taken from [39]. Since p → 1, it follows that v* → 1 and u2 → 1. Let us introduce the notation ε = 1 − v, then ε → 0, q → 0. Further, using the asymptotic expansion of u2 with the Taylor formula in a similar way, we can write that

$${u}_{2}=1-\frac{{\lambda }_{2}}{{\mu }_{1}-{\lambda }_{1}}\varepsilon -\frac{{\mu }_{1}}{{\mu }_{1}-{\lambda }_{1}}q+o(\varepsilon )+o(q).$$

Then

$$p-{u}_{2}=\frac{{\lambda }_{2}}{{\mu }_{1}-{\lambda }_{1}}\varepsilon +\frac{{\lambda }_{1}}{{\mu }_{1}-{\lambda }_{1}}q+o(\varepsilon )+o(q).$$

Equality (13) for v → 1, u2 → 1, p → 1 implies that

$$1-v \sim \frac{{\mu }_{1}}{{\mu }_{2}}(p-{u}_{2}),$$

i.e., for εq → 0

$$\varepsilon \sim \frac{{\mu }_{1}}{{\mu }_{2}}\left(\frac{{\lambda }_{2}}{{\mu }_{1}-{\lambda }_{1}}\varepsilon +\frac{{\lambda }_{1}}{{\mu }_{1}-{\lambda }_{1}}q\right),$$

and therefore

$$\varepsilon \sim \frac{{\lambda }_{1}{\mu }_{1}}{{\mu }_{1}{\mu }_{1}-{\lambda }_{1}{\mu }_{2}-{\lambda }_{2}{\mu }_{1}}q.$$

Then

$${p}_{0,0} \sim \frac{{\lambda }_{1}q}{{\mu }_{2}\varepsilon }\to \frac{{\mu }_{1}{\mu }_{2}-{\lambda }_{1}{\mu }_{2}-{\lambda }_{2}{\mu }_{1}}{{\mu }_{1}{\mu }_{2}}=1-{\rho }_{1}-{\rho }_{2}={p}_{0,0}^{(1)},$$

which corresponds to the classic result from [39].

4 Average Number of Type 2 Customers in the System

The average number of low-priority customers in the system is

$${N}_{2}=\mathop{\sum }\limits_{j=0}^{\infty }j{p}_{\cdot ,j}={\left.\frac{\partial B(1,v)}{\partial v}\right|}_{v = 1}.$$

After the appropriate transformations, we get

$${\left.\frac{\partial B(1,v)}{\partial v}\right|}_{v = 1}={\left.\frac{\partial B(0,v)}{\partial v}\right|}_{v = 1}+\frac{{\lambda }_{2}{\mu }_{1}+{\lambda }_{1}{\mu }_{2}-{\mu }_{1}{\mu }_{2}(1-{p}_{0,0})}{{\mu }_{1}^{2}q},$$

where

$$\begin{array}{cccc}{\left.\frac{\partial B(0,v)}{\partial v}\right|}_{v = 1}=\frac{{u^{\prime} }_{2}(1){\lambda }_{1}q(1-{\rho }_{1})+{\lambda }_{1}{u}_{2}(1)q(1-{\rho }_{1})+{\mu }_{2}{u}_{2}(1)(1-{\rho }_{1}{u}_{2}(1)){p}_{0,0}}{{\mu }_{1}(1-{\rho }_{1}{u}_{2}(1))(p-{u}_{2}(1))}\\ -\frac{{\lambda }_{1}{u}_{2}(1)q(1-{\rho }_{1})[{\mu }_{1}(p-{u}_{2}(1))+{\mu }_{2}{u}_{2}(1)-{u^{\prime} }_{2}(1){\mu }_{1}]}{{\mu }_{1}^{2}(1-{\rho }_{1}{u}_{2}(1)){(p-{u}_{2}(1))}^{2}}+\frac{{u^{\prime} }_{2}(1){\lambda }_{1}^{2}{u}_{2}(1)q(1-{\rho }_{1})}{{\mu }_{1}^{2}{(1-{\rho }_{1}{u}_{2}(1))}^{2}(p-{u}_{2}(1))},\\ {u}_{2}(1)=\frac{{\lambda }_{1}+{\mu }_{1}-\sqrt{{({\lambda }_{1}+{\mu }_{1})}^{2}-4{\lambda }_{1}{\mu }_{1}p}}{2{\lambda }_{1}},\\ {u^{\prime} }_{2}(1)={\left.\frac{\partial {u}_{2}(v)}{\partial v}\right|}_{v = 1}=\frac{1}{2{\lambda }_{1}}\left(\frac{{\lambda }_{2}({\lambda }_{1}+{\mu }_{1})}{\sqrt{{({\lambda }_{1}+{\mu }_{1})}^{2}-4{\lambda }_{1}{\mu }_{1}p}}-{\lambda }_{2}\right).\end{array}$$

The average sojourn time in the system for a low-priority customer can be calculated using Little’s formula, i.e., it holds that

$${N}_{2}={\lambda }_{2}{v}_{2},$$

where v2 is the average sojourn time of a type 2 customer in the system, and then

$${v}_{2}=\frac{{N}_{2}}{{\lambda }_{2}}={w}_{2}+\frac{1}{{\mu }_{2}},$$

which means that the average sojourn time for a low-priority customer in the queue is

$${w}_{2}={v}_{2}-\frac{1}{{\mu }_{2}}.$$

The average number of high-priority customers in the system, the average sojourn time of high-priority customer in the queue and in the system is determined using well-known formulas for the MM∣1 QS since they are not influenced by customers of the second type.

5 Probability of Service for a Type 2 Customer

Now let us determine the probability of servicing a low-priority customer. Note that this is not an easy task, since the fate of a customer depends not only on the state of the system at the time of its arrival, but also on further development of events.

To do this, we introduce the value si,j, the probability that a type 2 customer will be serviced if there are i high-priority and j low-priority customers in front of it (taking into account the order on the device).

The following situations are possible (Fig. 3):

  1. 1)

    if there are i customers of the first type and j customers of the second type in the system before a low-priority customer, then with probability λ1/(λ1 + μ1) a new priority customer can enter the system and take the place in front of the considered low-priority one (not necessarily immediately in front of it), i.e., there will now be (i + 1) high-priority customers, or with probability μ1/(λ1 + μ1) the first customer can be serviced and at the same time with probability p it will simply leave the system without dropping low-priority customers, then there will by i − 1 high-priority customers before the second type customer (Fig. 3a);

  2. 2)

    if there are only j of the second type in the system before a low-priority customer, then with probability λ1/(λ1 + μ2) a priority customer can enter the system and take place before the considered low-priority customer, or with probability μ2/(λ1 + μ2) a customer of type 2 can be serviced (Fig. 3b);

  3. 3)

    if there are no other customers in the system before the low-priority customer, then with probability λ1/(λ1 + μ2) a priority customer can enter the system and take the place in front of the considered low-priority customer, or with probability μ2/(λ1 + μ2) a customer of the second type will be serviced successfully.

Note that the arrival of new low-priority customers in the system does not in any way affect the servicing of low-priority customers already in the system; therefore, these events are not taken into account anywhere. Let us compose the system of equations

$${s}_{i,j}=\frac{{\lambda }_{1}}{{\lambda }_{1}+{\mu }_{1}}{s}_{i+1,j}+\frac{{\mu }_{1}p}{{\lambda }_{1}+{\mu }_{1}}{s}_{i-1,j},\quad i\geqslant 1,j\geqslant 0,$$
(15)
$${s}_{0,j}=\frac{{\lambda }_{1}}{{\lambda }_{1}+{\mu }_{2}}{s}_{1,j}+\frac{{\mu }_{2}}{{\lambda }_{1}+{\mu }_{2}}{s}_{0,j-1},\quad j\geqslant 1,$$
(16)
$${s}_{0,0}=\frac{{\lambda }_{1}}{{\lambda }_{1}+{\mu }_{2}}{s}_{1,0}+\frac{{\mu }_{2}}{{\lambda }_{1}+{\mu }_{2}}.$$
(17)

We will look for a solution (15) in the form

$${s}_{i,j}={\gamma }^{i}{s}_{0,j},\quad i\geqslant 1,j\geqslant 0,$$
(18)

then by substituting (18) into (15) for i = 1 we can write that

$$\gamma =\frac{{\lambda }_{1}}{{\lambda }_{1}+{\mu }_{1}}{\gamma }^{2}+\frac{{\mu }_{1}p}{{\lambda }_{1}+{\mu }_{1}},$$

i.e., we get a quadratic equation with respect to the variable γ

$${\lambda }_{1}{\gamma }^{2}-({\lambda }_{1}+{\mu }_{1})\gamma +{\mu }_{1}p=0.$$

The solution to the equation is

$${\gamma }_{1,2}=\frac{{\lambda }_{1}+{\mu }_{1}\pm \sqrt{{({\lambda }_{1}+{\mu }_{1})}^{2}-4{\lambda }_{1}{\mu }_{1}p}}{2{\lambda }_{1}}.$$

We choose a root in the range from 0 to 1, i.e., γ2. Thus, we get that

$${s}_{i,j}={\gamma }_{2}^{i}{s}_{0,j},\quad j\geqslant 0.$$
(19)

Now we substitute the resulting solution for si,j into (16), from which we can express s0,j as

$${s}_{0,j}=\frac{{\mu }_{2}}{{\lambda }_{1}(1-{\gamma }_{2})+{\mu }_{2}}{s}_{0,j-1},\quad j\geqslant 1.$$

Next, we substitute (19) for i = 1 and j = 0 into (17), which will allow us to express the probability of s0,0 explicitly:

$${s}_{0,0}=\frac{{\mu }_{2}}{{\lambda }_{1}(1-{\gamma }_{2})+{\mu }_{2}}.$$

Hence,

$${s}_{0,j}={\delta }^{j+1},\quad j\geqslant 0,$$
(20)

where

$$\delta =\frac{{\mu }_{2}}{{\lambda }_{1}(1-{\gamma }_{2})+{\mu }_{2}}.$$

Thus, we obtain the formula for the required probabilities

$${s}_{i,j}={\gamma }_{2}^{i}{\delta }^{j+1},\quad i,j\geqslant 0.$$

Now, having determined the values of si,j, we can express the probability of servicing a low-priority customer

$${p}^{(serv)}=\mathop{\sum }\limits_{i=0}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j}{s}_{i,j}=\delta \mathop{\sum }\limits_{i=0}^{\infty }\mathop{\sum }\limits_{j=0}^{\infty }{p}_{i,j}{\gamma }_{2}^{i}{\delta }^{j}=\delta B({\gamma }_{2},\delta ),$$

where B(γ2δ) is defined by the expression for the generating function (5).

Fig. 3
figure 3

Possible changes in QS states while awaiting a low-priority customer.

Note that for p → 1 we have γ2 → 1, δ → 1 and p(serv) → 1, which is consistent with p(serv) = 1 in the classical system [39]. On the other hand, for p → 0 we have γ2 → 0, δ → μ2/(λ1 + μ2) and

$${p}^{(serv)}\to \frac{{\mu }_{2}}{{\lambda }_{1}+{\mu }_{2}}B\left(0,\frac{{\mu }_{2}}{{\lambda }_{1}+{\mu }_{2}}\right),$$

which is the correct result in the special case q = 1 (deterministic dropping) considered in [41].

6 Numerical Example

Let us illustrate the behavior of the average number of low-priority customers in the system and the probability of their servicing, as well as the probability of downtime, depending on the value of the probability p. Let λ1 = 1, λ2 = 2, μ1 = 3, μ2 = 4.

As we can see from the plots (Fig. 4) and the table, the average number of low-priority customers in the system increases with an increase in p, and the probability p0,0 itself decreases. Moreover, we note that the probability of downtime in the classical QS without the possibility of dropping low-priority customers, calculated by the formula from [39]

$${p}_{0,0}^{(1)}=1-{\rho }_{1}-{\rho }_{2},\quad {\rho }_{i}={\lambda }_{i}/{\mu }_{i},\quad i=1,2,$$

is equal to 0.16667 (or 1/6), and the average number of low-priority customers in the same classical system, described by the formula from [39]

$${N}_{2}^{(1)}=\frac{{\lambda }_{2}({\mu }_{1}({\mu }_{1}-{\lambda }_{1})+{\lambda }_{1}{\mu }_{2})}{({\mu }_{1}-{\lambda }_{1})({\mu }_{1}{\mu }_{2}-{\lambda }_{1}{\mu }_{2}-{\lambda }_{2}{\mu }_{1})}=\frac{{\rho }_{2}}{1-{\rho }_{1}-{\rho }_{2}}\left(1+\frac{{\mu }_{2}{\rho }_{1}}{{\mu }_{1}(1-{\rho }_{1})}\right),$$

is exactly 5. Thus, as the probability of dropping customers of the second type q approaches zero, the values N2 and p0,0 tend to the corresponding values \({N}_{2}^{(1)}\) and \({p}_{0,0}^{(1)}\) for the classical system with no dropping, as expected. On the other hand, from [41] we know the probability of downtime at p = 0, which turns out to be equal to \({p}_{0,0}^{(0)}\approx 0.426925\), which is also consistent with the table. As for the probability of servicing customers of the second type p(serv), it naturally tends to one as p grows (Fig. 5).

Fig. 4
figure 4

Dependencies: (a) the probability of system downtime on the probability p; (b) average number of low-priority customers in the system on the probability p; λ1 = 1, λ2 = 2, μ1 = 3, μ2 = 4.

Fig. 5
figure 5

Dependence of the probability of servicing a low-priority customer p(serv) on the probability p; λ1 = 1, λ2 = 2, μ1 = 3, μ2 = 4.

Table 1 Values of p0,0, N2 and p(serv) depending on the probability p; λ1 = 1, λ2 = 2, μ1 = 3, μ2 = 4

7 Conclusion

In this work we consider a QS with preemptive priority of type 1 customers over type 2 customers and stochastic dropping. We have derived and presented expressions for calculating the stationary probabilities of the system, probability of downtime, probability of servicing a low-priority customer (in terms of the generating function), and a formula for the average number of customers of the second type. We have compared our results with previously known for extreme cases and showed that they are obtained by the corresponding passage to the limit.