On Time-to-Buffer Overflow Distribution in a Single-Machine Discrete-Time System with Finite Capacity

A model of a single-machine production system with finite magazine capacity is investigated. The input flow of jobs is organized according to geometric distribution of interarrival times, while processing times are assumed to be generally distributed. The closed-form formula for the generating function of the time to the first buffer overflow distribution conditioned by the initial buffer state is found. The analytical approach based on the idea of embedded Markov chain, the formula of total probability and linear algebra is applied. The corresponding result for next buffer overflows is also given. Numerical examples are attached as well.


Introduction
The occurrence of a buffer overflow is a typical problem that arises in mass service systems where the accumulation of unprocessed elements is bounded. Of course, the increase in the number of requests that are waiting for service depends on the processing speed, the intensity of the input stream, as well as the number of service stations that can work (process tasks) in parallel. The phenomenon of a buffer overflow usually has a negative impact on the quality of service (QoS), because it involves the loss of a number of potential new customers (tasks, jobs, packets, etc.) that do not have a place where they could wait for service and, consequently, resign, or it is connected with the necessity to propose an alternative service path (redirection to another service station or to another service system), which generates additional costs.
In particular, examples of practical operating systems in which a buffer storage overflow phenomenon can occur are given below: • a production line, in which there are accumulating buffers of finite capacities between consecutive processing stations; a buffer overflow at one of the stations usually suspends or significantly slows down the service in the preceding stations; • buffers accumulating data packets incoming to the packet network node (e.g. IP packets in the Internet routers) have finite capacities (counted in bytes); a buffer overflow results in sending feedback to the source emitting the packets, which makes the decision on their retransmission (in accordance with the TCP/IP protocol); • on communication routes with a sequence of successive traffic lights as the "buffer" can be treated the section of the route between two successive traffic lights; • the phenomenon of a buffer overflow also occurs in the case of the organization of parking spaces, e.g. near large shopping centers: full parking (accumulating "buffer") results in the need for the driver to look for another parking space (there is a redirection of the customer or its loss).
The application of queueing theory in the modeling of practical systems in which a large number of customers is processed is well known. In recent years, stochastic characteristics of systems in which the service is limited in some way, which is connected with the use of, for example, a specific mechanism of the input traffic control, are particularly intensively studied. An example of such type of a mechanism affecting the system throughput is the use of a storage buffer with finite capacity. Moreover, an alternative to the classical approach of queueing systems analysis with a continuous time parameter is the use of discrete time, in which the time axis is divided into the so-called slots, indexed with consecutive natural numbers. This type of approach is sometimes much more desirable from the practical point of view. In production systems or logistic networks, the state of a magazine or a specific accumulating buffer is monitored once a day or at regular time intervals.
In books [3] and [21] one can find the overview of results for stochastic characteristics of different-type queueing models with discrete time parameter. The selection of methods and techniques, and some applications of discretetime stochastic models can be found in [9]. The exact approach for buffer overflow calculations based on martingales is proposed in [2]. The representation for the distribution of the time to buffer overflow in a queueing model with autocorrelated input stream can be found e.g. in [5] and [6], where the cases of single and batch arrivals are considered, respectively. One can find some other analytical results for the problem of buffer overflow and loss of customers during this time period e.g. in [8] and [18]. In particular, in [8] the formula for the joint transform of the busy period and numbers of customers successfully served and lost during the busy period is obtained in the model described by phase-type distributions. Similarly, in [18] the representation for the distribution of the number of buffer overflows during one busy period is found for the system with Markovian arrival stream. Analytical results for the cumulative distribution function of the time to the first buffer overflow can be found e.g. in [13] and [14], where the multiple vacation policy and the control mechanism based on setup and closedown times are considered, respectively. The model of a production line with unreliable machine is investigated in [15]. In [12] the distribution of the time to buffer overflow is analyzed in the case of a model with server working vacations. In [20] the representation for the mean time to reach the fixed level in the M/G/1-type queue with infinite buffer is obtained. Similar characteristic for the corresponding finite-buffer queue is studied in [11], where the closed-form representation of the distribution of the time to start a crowded period (to hit the predetermined level) is derived. In [16] (see also [7]) the first overflow time in the GI/G/1/N -type queue is studied via diffusion approximation. Obviously, the time to the first buffer overflow coincides with the first passage time from the fixed initial state to state N. In [4] the representation for the probability generating function of the time to the first buffer overflow is obtained for the Geo/Geo/1/N -type model with arrival and service rates dependent on the number of jobs accumulated in the system. The result is given in terms of roots of the characteristic equation of a certain functional matrix. The result form [4] is generalized in [19] for the case of phase-type distributed interarrival and service times.
In the paper the production system with one processing station is modeled using the Geo/G/1/B-type queue. Using the analytical approach based on the idea of embedded Markov chain and the formula of the total probability, a system of equations is constructed for the distribution of the time to the first buffer overflow, conditioned by the initial state of the accumulating buffer. The solution of the corresponding system written for generating function is found in a compact form using the algebraic potential method introduced by Korolyuk in [17]. So, in consequence, the obtained result generalizes the one derived in [4] for the case of generally-distributed service times. Moreover, in relation to [11] and [20], the discrete-time model is investigated, so instead of Poisson arrival process a binomial process is considered. Analytical results are given in terms of a certain additional sequence (called in [17] a potential). Successive terms of this sequence can be obtained recursively (however, such a procedure gives usually high computational complexity) or by using the Maclaurin expansion. The latter possibility is used in numerical examples.
The remaining part of the article is organized as follows. The next Section 2 presents the exact mathematical description of the considered model and states the basic facts about the binomial process (continuous analogue of the Poisson process) characterizing the input traffic. In Section 3, using the formula of the total probability and the idea of embedded Markov chain, a system of equations for the conditional distribution of the time to the first buffer overflow and a corresponding system written for generating functions are obtained. The solution of the latter system is found in Section 4, where the appropriate result for the subsequent buffer overflow periods is also given. Section 5 contains numerical examples illustrating theoretical results, while the last Section 6 contains a brief summary and conclusions.

Description of the model
We deal with a discrete-time model of a production line with a single processing machine, modeled by a Geo/G/1/B-type queue. So, according to the well-known Kendall notation, it is assumed that the stream of incoming jobs is governed by a binomial process in that successive interarrival times are independent random variables with the common geometric distribution with parameter a ∈ (0, 1), namely In the considered model service (processing) times are assumed to be generally distributed, where b k denotes the probability that the service duration of a single customer equals k slots, where ∞ k=1 b k = 1. The capacity of accumulating buffer is equal to B − 1 places, so the maximal system state is B, that is reached in the case of the buffer being saturated and the service machine being busy with processing. In the case the arriving job finds the system in state B, it leaves the system without processing. The classical FIFO service discipline is assumed.
We also accept the situation in that at the same time slot both the arrival and service completion occur. In such a case it does not matter whether the arrival precedes the departure (Arrival First (AF) scheme) or the opposite (Departure First (DF) scheme), since the characteristic being analyzed is independent on it.

Equations for conditional time-to-buffer overflow distribution
In this section, by using the paradigm of embedded Markov chain and the total probability law, we establish the system of equations for the conditional distribution of the time to the first buffer overflow and, next, we write the corresponding system for appropriate generating functions. The binomial arrival process is a discrete-time analogue of the Poisson one. From the point of view of the further analysis, it is important to express the probability p i (j) that up to fixed time moment i ∈ {1, 2, ...} exactly j ∈ {0, ..., i} customers will arrive to the system. Let us observe that, denoting by θ k the kth interarrival time, we get The sum of independent and identically distributed geometric random variables has negative binomial distribution, so we obtain where i ∈ {1, 2, ...} and j ∈ {0, ..., i}. Let us denote by β 1 = β the time (counting from the initial epoch 0) to the start of the first buffer overflow period, so where X n stands for the number of customers (jobs, packets, etc.) present in the system at time n including the one in service (if any).
Introduce the following notation: where n ∈ {0, ..., N − 1} and k ∈ N. Assume, firstly, that the accumulating buffer is empty at the starting moment, so X 0 = 0. Note that then the following equation is true: Indeed, if the first arrival occurs at time i ≤ k − 1, then at this time the operation of the system "renews" with one job present and the time for the buffer overflow initial moment, to exceed or to be equal to, shortens to k − i (the first summand on the right side of (3.3)). If the first job enters the system at time k or later, then {β ≥ k} with probability one (the second summand). Let us consider now the case at which X 0 ≥ 1 and assume that, despite to the presence of a number of jobs in the accumulating buffer before the opening of the system, the processing (with the distribution described by the sequence (b k )) begins at time 0. The memoryless property of geometric distribution of interarrival times implies that consecutive departure moments are Markov epochs in the evolution of the system. Namely, the subsequence (X kn ), k ∈ N, where k j is the jth departure epoch in the evolution of the system, is a Markov chain, called an embedded one (see e.g. [3], [21]). In consequence, applying the formula of total probability with respect to the first departure moment after 0, we can write the following system of equations: Indeed, the first summand on the right side of (3.4) presents the situation in that the first service completes at the moment i ≤ k − 1, so at the Markov moment i the system state is n + j − 1, where j denotes the number of arrivals up to time i − 1 if the epoch k is not the next arrival moment, and is n + j otherwise. If the first processing completes exactly at time i = k, then, if only up to the time k − 1 the number of arrivals does not exceed B − n − 1, the random event {β ≥ k} occurs with probability one. Otherwise, the probability of {β ≥ k} equals zero (compare the second summand on the right side of (3.4)). The last summand on the right side of (3.4) relates to the case in that the first customer leaves the system after time k.
Let us transform the system (3.3)-(3.4) to the corresponding one written for generating functions. So, define

then (3.3) gives
then, introducing the following functional sequences: where |z| < 1 and δ i,j stands for the Kronecker delta function, we obtain from (3.4) where 1 ≤ n ≤ B − 1. Observe that, defining, we can rewrite (3.6) in the following way: where 1 ≤ n ≤ B − 1.

Compact-form solution
In this section, we obtain the solution of the system (3.5), (3.7) in terms of a certain functional sequence connected with the given sequence (u k (z)). Let us take into consideration the following infinite-size system of linear equations with known coefficients τ n and σ n and with unknowns x 2 , x 3 , ... : n−2 j=−1 τ j+1 x n−j − x n = σ n , n ≥ 2. (4.1) In [17] one can find the in-depth analysis of such type systems according to the study of the so-called random walks continuous from the right. It is given in [10] that each solution of (4.1) can be stated as where c ∈ R and successive terms of the sequence (κ k ) ∞ k=0 (called the potential in [17]) can be obtained by using two various approaches. The first one is a recursive way in that we have κ 0 = 0, κ 1 = (τ 0 ) −1 and for k ≥ 2 The alternative approach is based on the formula (see [17]) where for |z| < 1 we define Using next the Maclaurin power expansion we find where k ≥ 0. Introducing the following substitution: we can rewrite the system of equations (3.5), (3.7) in the following form: Let us note that (4.4) has the same shape as (4.1) with the difference that unknowns v n (z) and coefficients u n (z) and φ n (z) are now dependent on the variable z. However, referring to (4.2), we can represent v n (z) in the following way, having in mind that now c and κ n will also be functions of z : v n (z) = c(z) · κ n−1 (z) + n k=2 κ n−k (z)φ k (z), n ≥ 2. (4.7) Another observation is the fact that the number of equations in (4.4) is finite in comparing to (4.1). In such a case the equation (4.6) can be used to evaluate c(z) in the explicit form. Substituting n = 1 into (4.4) and using (4.5), we obtain Hence, due to the fact that (4.7) written for n = 2 has the form Now, applying (4.7) in (4.6) and referring to (4.5) and (4.8), we get As a consequence we can eliminate c(z) as follows: where and Referring now to (4.7) and having in mind (4.5) and (4.9), we obtain Taking into consideration (4.3) we can formulate the following main theorem: Theorem 1. The probability generating function β n (z) of the (tail) conditional distribution of the time β to the first buffer overflow in the Geo/G/1/B-type queueing model can be represented in the following way: where |z| < 1, n ∈ {0, ..., B − 2}, and (compare (4.8)) The following corollary is obvious: The mean time E n β to the first buffer overflow conditioned by the initial buffer state n ∈ {0, ..., B − 1} can be computed as Let us consider now next buffer overflows. Denote by β (r) , r ≥ 2, the time to the initialization of the rth buffer overflow period, counting from the completion epoch of the (r − 1)th buffer overflow. Since the number of jobs present in the system at the completion epoch of each buffer overflow period equals B − 1, then the following corollary is obvious: Corollary 1. For r ≥ 2 and |z| < 1 the following representation is true: In consequence, the mean time to the rth buffer overflow (r ≥ 2) equals Eβ (r) = β B−1 (1).

Numerical examples
In this section, we present numerical results illustrating theoretical formulae obtained above. The main goal of this section is to investigate and visualize the impact of key "input" system parameters (like the changing of the arrival rate, service speed and initial state of the accumulating buffer) on the probabilistic behaviour of the time to buffer overflow.
To find the values of probabilities β n (k) for fixed n and successive k s we can use multiple differentiation of the right side of the formula (4.10) or (4.11). However, quite often we can meet some problems with symbolic or numerical differentiation. Thus, in the paper, we apply the algorithm of numerical inversion of the generating function proposed in [1], which is based on Cauchy integral formula and trapezoidal rule for numerical integration.
k=0 z k f k , then we approximate the values f k in the following way: where c j (k, l, r) def = l−1 n=0 e −πin/l F (re πi(n+lj)/lk ) and typical values of parameters are l = 1 and r = (0.0001) 1/k .
Note that the numerical inversion of continuous and discrete transforms may result in poor accuracy for small values of the argument.
Let us consider a single-machine production system modeled via the Geo/G/1/B-type queueing system with finite buffer capacity and assume that B = 6. We study three different cases according to the service time: geometrically distributed service time, deterministic (constant) one and the bounded discrete distribution of the service time. To compare the impact of the shape of the processing time distribution on the probabilistic behaviour of the time to buffer overflow, we take into consideration the appropriate distributions with the same means.  Let us begin with investigation of the impact of arrival intensity. Assume firstly that the service time is geometrically distributed with parameter b = 0.5, so b k = 1/2 k , where k ≥ 1 (mean service time equals 2). In Figure 1 we visualize the probabilities P{β ≥ k | X 0 = 3} for k = 1, . . . , 10, and three different values of the parameter a of geometric distribution of interarrival times: a = 0.2, 0.5 and 0.8, corresponding to three different offered loads of the considered system: = 0.4, 1.0 and 1.6, respectively. For example, the probabilities P{β ≥ 5 | X 0 = 3} take on the following values: 0.9958, 0.9345 and 0.7363 for = 0.4, 1.0 and 1.6, respectively. So, for the case of = 1.6 (overloaded system) in comparison to the case ρ = 1.0 the decrease of the value of probability is essential (about 21%).
For the case of constant (deterministic) service times equal to 2 the appropriate results are presented in Figure 2. The conclusion is similar. The "cyclic" behaviour of the curves is connected with constant service time equal to 2.
Finally, in Figure 3 we visualize results for the case of the service time with the same mean 2, distributed as follows:  The results are obtained for geometric service distribution with parameter b = 0.5 and three different values of the parameter of geometric distribution of interarrival times, namely a = 0.2, 0.5 and 0.8 (corresponding to Figure 4, Figure 5 and Figure 6, respectively). Evidently, as one can observe, the smaller the number of jobs accumulated in the buffer before the opening of the system, the greater the probability that the time to the first buffer overflow will exceed the concrete value k. Let us note that if the buffer is almost saturated (n = 5), the probability is essentially smaller than in two remaining cases (n = 1 and 3).
Lastly, in Table 1 the results for the mean time to the first buffer overflow are presented (for the same geometric distributions of interarrival and service times as in Figures 4-6 ). Obviously, corresponding values decrease as the number of jobs accumulated in the buffer initially increases, however the difference between values obtained for different s is very large.

Conclusions
In the paper a model of a single-server production system with finite buffer capacity is investigated. Using the approach based on queueing theory, the probability distribution of the time to the first buffer overflow is studied. By using the method utilizing the idea of embedded Markov chain and the notion of the potential proposed by Korolyuk, the closed-form representation for the probability generating function of this distribution is derived. Moreover, corresponding results for next buffer overflow periods and for their means are obtained. Numerical analysis of sensitivity of the distribution of the time to the buffer overflow on key operating system parameters is attached.