DeepAI

# D/M/1 Queue: Policies and Control

Equilibrium G/M/1-FIFO waiting times are exponentially distributed, as first proved by Smith (1953). For other client-sorting policies, such generality is not feasible. Assume that interarrival times are constant. Symbolics for the D/M/1-LIFO density are completely known; numerics for D/M/1-SIRO arise via an unpublished recursion due to Burke (1967). Consider a weighted sum of two costs, one from keeping clients waiting for treatment and the other from having the server idle. With this in mind, what is the optimal interarrival time and how does this depend on the choice of policy?

08/10/2016

### Optimal routing in two-queue polling systems

We consider a polling system with two queues, exhaustive service, no swi...
01/07/2022

### Multi-Model Federated Learning

Federated learning is a form of distributed learning with the key challe...
08/21/2022

### M/D/1 Queues with LIFO and SIRO Policies

While symbolics for the equilibrium M/D/1-LIFO waiting time density are ...
10/15/2017

### Game-Theoretic Pricing and Selection with Fading Channels

We consider pricing and selection with fading channels in a Stackelberg ...
05/04/2021

### Two-Stage Facility Location Games with Strategic Clients and Facilities

We consider non-cooperative facility location games where both facilitie...
12/10/2021

### A General "Power-of-d" Dispatching Framework for Heterogeneous Systems

Intelligent dispatching is crucial to obtaining low response times in la...
02/20/2020

### Queueing Subject To Action-Dependent Server Performance: Utilization Rate Reduction

We consider a discrete-time system comprising a first-come-first-served ...

## 1 Fifo

Let

denote the waiting time in the queue (prior to service).  Under equilibrium (steady-state) conditions, the probability density function

of has Laplace transform [3, 4, 5, 6]

 F(s)=limε→0+∞∫−εexp(−sx)f(x)dx=1−ζ0+ζ0μ(1−ζ0)s+μ(1−ζ0)=Falt(s)+1−ζ0

and initial value [7]

 f(0+)=lims→1⋅∞sFalt(s)=μζ0(1−ζ0).

Consequently

 f(x)=(1−ζ0)δ(x)+μζ0(1−ζ0)exp(−μ(1−ζ0)x).

In fact, exponentiality holds more generally for non-constant interarrival times, proved by Smith [3]

. Moments are

 mean=−F′(0)=ζ0μ(1−ζ0),variance=F′′(0)−F′(0)2=ζ02−ζ0μ2(1−ζ0)2

giving and respectively when .  If sampling is restricted only to , then [8]

 mean>0=1μ(1−ζ0),% variance>0=1μ2(1−ζ0)2

giving and respectively.

Let denote the number of patients in the system (both queue and service).  Under equilibrium, with , we have [9]

 ~f(ℓ)=P{Lsys=ℓ}=(1−ζ0)ζℓ0,ℓ=0,1,2,3,…;
 mean=ζ01−ζ0,% variance=ζ0(1−ζ0)2

giving and respectively.  Geometricity holds more generally for non-constant interarrival times.  It is remarkable that classical distributions occur within G/M/1 universally but not within even M/D/1 specifically.

## 2 Lifo

The probability density function of has Laplace transform

 F(s)=limε→0+∞∫−εexp(−sx)f(x)dx=1−ζ0+ζ0μ−μζ(s)s+μ−μζ(s)=Falt(s)+1−ζ0

and the inverse Laplace transform of is

 θ(x)=∞∑k=1e−k/ρ(k/ρ)k−1k!δ(x−ak).

With regard to symmetry and , we see that play the roles of in [2], but an extra factor is also present, i.e., the correspondence is not perfect.  From

 (1−ζ0)s+μ[1−ζ(s)](1−ζ0+ζ0)=sF(s)+μF(s)[1−ζ(s)]

we have

 (1−ζ0)s+μ(1−F(s))[1−ζ(s)]=sF(s),

i.e.,

 F(s)=1−ζ0+μ(1−F(s))[1s−ζ(s)s]

hence

 f(x) =(1−ζ0)δ(x)+κ+μx∫0(δ(t)−f(t))⎡⎢⎣1−x−t∫0θ(u)du⎤⎥⎦dt =(1−ζ0)δ(x)+μζ0+μ⎡⎢⎣1−x∫0θ(u)du⎤⎥⎦−μx∫0f(t)⎡⎢⎣1−x−t∫0θ(u)du⎤⎥⎦dt.

The indicated condition is true by the initial value theorem [7]:

 limε→0+f(ε)=lims→1⋅∞sFalt(s).

Differentiating, we obtain

 f′(x) =μ[0−θ(x)]−μf(x)[1−0]−μx∫0f(t)[0−θ(x−t)]dt =−μθ(x)−μf(x)+μx∫0f(t)θ(x−t)dt =−μθ(x)−μf(x)+μx∫0f(t)∞∑k=1e−k/ρ(k/ρ)k−1k!δ(x−t−ak)dt =−μθ(x)−μf(x)+μ∞∑k=1e−k/ρ(k/ρ)k−1k!x∫0f(t)δ(x−t−ak)dt =−μθ(x)−μf(x)+μ∞∑k=1e−k/ρ(k/ρ)k−1k!f(x−ak).

For ,

 f′(x)=−μf(x),f(0+)=μζ0

implies

 f(x)=μζ0e−μx.

Note that for each because, if a client arrives at the same moment the server becomes available, the client is taken immediately (by LIFO) and there is no waiting. Note also .  For ,

 f′(x) =−μf(x)+μe−1/ρ⋅μζ0e−μ(x−a) =−μf(x)+μ2ζ0e−μx

coupled with implies

 f(x)=μ2ζ0(x−a)e−μx.

For ,

 f′(x) =−μf(x)+μe−1/ρ⋅μ2ζ0(x−2a)e−μ(x−a)+μe−2/ρ2/ρ2!⋅μζ0e−μ(x−2a) =−μf(x)+μ3ζ0(x−2a)e−μx+(μ2ζ0)(μa)e−μx =−μf(x)+μ3ζ0(x−a)e−μx

coupled with implies

 f(x)=12μ3ζ0x(x−2a)e−μx.

More generally, for , we obtain

 f(x)=1k!μk+1ζ0xk−1(x−ka)e−μx

and thus the waiting time density for LIFO is completely understood.  Wishart [6] evidently holds priority in discovering this formula, building upon work by Conolly [10]. Stitching the fragments together gives the LIFO density function pictured in Figure 1, for parameter values and ; hence and .

Moments of for LIFO are [6]

 mean=−F′(0)=ζ0μ(1−ζ0),variance=F′′(0)−F′(0)2=ζ02−ζ0−2μζ′0μ2(1−ζ0)2

giving and respectively.  The mean of for FIFO is the same as that for LIFO; the variance for FIFO is smaller.  If sampling is restricted only to , then [8, 11, 12, 13]

 mean>0=1μ(1−ζ0),% variance>0=1−2μζ′0μ2(1−ζ0)2

giving and respectively.  The variance expression reported in [14] contains an apparent error.

## 3 Siro

The probability density function of has Laplace transform [8]

 F(s)=1−ζ0+ζ0Φ(s)=Falt(s)+1−ζ0

where

 Φ(s)=B(s,ζ0)−ζ0∫ζ(s)exp⎛⎜⎝−ζ0∫udvv−e−a(μ+s−μv)⎞⎟⎠∂B∂u(s,u)du,
 B(s,z)=μ(1−ζ0)1−z1−exp[−a(s+μ−μz)]s+μ−μz.

The integral underlying is intractable; our symbolic approach for FIFO & LIFO seems inapplicable for SIRO.

We therefore turn to a numeric approach.  An unpublished memorandum written in 1967 by Burke (the same author as of [15]) has regrettably been lost, although summaries are found in [16, 17].  Rosenlund [18] provided an especially clear algorithm for D/M/1 to follow.  Since our interest is in densities, we differentiate his initial expression with respect to , i.e.,

 ddx(xj+1−re−x)=(j+1−r−x)xj−re−x.

Define recursively

 hj,0(x)=j+1∑r=1rj+1(j+1−r−x)xj−r(j+1−r)!e−x,j=0,1,2,…;
 hj,k(x)=j+1∑r=1rj+1(1/ρ)j+1−r(j+1−r)!e−1/ρhr,k−1(x),j=0,1,2,… and k=1,2,3,….\vskip6.0ptplus2.0ptminus2.0pt

We consequently have

 f(x)=(1−ζ0)δ(x)+ζ0g(x)

where

 g(x)=−μ(1−ζ0)∞∑j=0ζj0hj,⌊λx⌋(μx−⌊λx⌋ρ),x≥0.

For example, if , then

 f(x)=μ(1−ζ0)1∫1−ζ0e−μxttdt=μ(1−ζ0)[E(μ(1−ζ0)x)−E(μx)]

where is the exponential integral.  This corresponds to the leftmost curvilinear arc in Figure 2, surmounting the interval .  Verification that the Laplace transform of is equal to remains open.

It is known (by other techniques) that the mean of for SIRO is the same as that for FIFO and LIFO; the corresponding variance is between the two extremes [8, 18]:

 ζ04−2ζ0−4μζ′0+μζ0ζ′0μ2(1−ζ0)2(2−μζ′0)

giving .  If sampling is restricted only to , then the variance is

 2−3μζ′0μ2(1−ζ0)2(2−μζ′0)

giving .

## 4 Idle Period

We are concerned here with successive periods of server activity and inactivity.  The left-hand subinterval of is busy (since a new client has just arrived) and its right-hand complement is idle.  It is possible that the idle period is empty.  Jansson [19] proved that, under FIFO and equilibrium, the idle period length has probability density function

 ζ0δ(x)+μζ0(1−ζ0)exp(μ(1−ζ0)x),0≤x

Moments are

 mean=1λ−1μ=(1−ρ)a,variance=1+ζ0−2aμζ0μ2(1−ζ0)

giving and respectively when .  The analysis of a busy period is more complicated, in part because it may span multiple adjacent intervals , but this issue is not pertinent for our study here.

Each client is associated with both a waiting time and an idle period length .  An expression for the bivariate density is available [19].  We report merely the cross-covariance

 (1−ζ0)e−aμμ2ζ0+aζ0μ(1−ζ0)−1μ2(1−ζ0)

and cross-correlation when

.  Again, the proof is valid under FIFO and equilibrium.  What is remarkable is that these results (marginal density and joint moments) appear via simulation to be the same under LIFO and SIRO as well.  Likewise, the distribution of

(what we called in Section 1) seems to be invariant upon change in policy.  Justification would be good to see someday.

## 5 Minimal Cost

The expression “queue control” may seem redundant because queues are themselves a method of control [20].  They exist to accommodate client demands on a service provider.  A control, however, exists to ensure that costs remain sustainable.  We wish to minimize cost as a function of , for fixed , where cost is a -weighted sum of the mean idle period and the mean waiting time [19]:

 C=(1−c)(a−1μ)+cζ0μ(1−ζ0).

The derivative of with respect to will be written as , which should not be confused with our earlier usage of the same symbol (the derivative of with respect to , evaluated at ).  From

 ζ0=−1aμω(−aμe−aμ)

we deduce

 (μζ0)′ =1a2ω(−aμe−aμ)−1aω′(−aμe−aμ)(−μe−aμ+aμ2e−aμ) =1a2ω(−aμe−aμ)−1aω(−aμe−aμ)(−aμe−aμ)[1+ω(−aμe−aμ)](−μ)(1−aμ)e−aμ =ω(−aμe−aμ)a2[1−1−aμ1+ω(−aμe−aμ)]=ω(−aμe−aμ)a2aμ+ω(−aμe−aμ)1+ω(−aμe−aμ) =−μζ0aaμ−aμζ01−aμζ0=−μ2ζ0(1−ζ0)1−aμζ0

thus

 (ζ01−ζ0)′ =ζ′01−ζ0−ζ0(1−ζ0)2(−ζ′0) =[11−ζ0+ζ0(1−ζ0)2](−μζ0(1−ζ0)1−aμζ0) =−1−ζ0+ζ0(1−ζ0)2μζ0(1−ζ0)1−aμζ0=−μζ0(1−ζ0)(1−aμζ0)

thus

 C′=(1−c)−cζ0(1−ζ0)(1−aμζ0)=0

when

 c1−c=(1−ζ0)(1−aμζ0)ζ0=1−ζ0−ζ0⋅aμ(1−ζ0)ζ0.

It is additionally required [19] that .  From

 ζ0=exp(−aμ(1−ζ0)),%i.e.,aμ(1−ζ0)=−ln(ζ0)

we obtain

 c1−c=1−ζ0+ζ0⋅ln(ζ0)ζ0

hence

 ζ0=−1¯ω[−exp(−11−c)]

where is “the” secondary branch of the Lambert omega:

 ¯ω(s)e¯ω(s)=s,−1≥¯ω(x)∈R \ ∀ x∈[−1/e,0),∃ branch cut for x≤0.

For example, if and , then and .  In words, if mean client waiting times are weighted the same as mean server idle periods, i.e., , then in terms of cost, the interarrival time is far from optimal, but is close.

If server idle periods are weighted more heavily than client waiting times, e.g., , then .  If instead client waiting times are weighted more heavily than server idle periods, e.g., , then .  This is consistent with intuition.  Compressed interarrival times lead to less idleness but longer waits; expansive interarrival times lead to shorter waits but more idleness.  Balancing these conflicting priorities makes life interesting.

To clarify: there exist countably infinite branches of the Lambert omega, but only two ( and ) that assume real values on , one increasing and the other decreasing.  All other branches are complex-valued with nonzero imaginary parts.  Our notation is unorthodox, as is referring to as “the” secondary branch.  In Mathematica, the function ProductLog[k,x] gives for & , respectively.  Alternative notation and , proposed somewhat by [21], is intended to suggest “upper branch” and “lower branch”.

We have omitted discussion of the variance of

.  From the aforementioned joint distribution of idle period and waiting time

[19], it would be possible to minimize cost as a function of , for fixed , where cost is the median of a

-weighted sum of idle period and waiting time.  Solving this revised optimization problem could be advantageous because the median is more a robust estimator of centrality than the mean.  We wonder too about the proper choice of

and whether a sum (rather than a product, say) is necessarily best.  More recent work appears in [22, 23, 24, 25, 26].  Processes with constant interarrival times and exponential server queues are fundamental, as proved in [27].

With as before (constant for , ), define [5, 8, 28, 29]

 Δn(x)={11−ζ0+n∑j=1(nj)Qj(x)1−e−ajxn(1−e−ajx)−jn(1−ζ0)−j}−1,
 mn=Δn(μ/n)μ(1−ζ0)2,pn=1−Δn(μ/n)1−ζ0

where is a positive integer and

 Qj(x)=j∏i=11−e−aixe−aix.

For example, , and .  More generally, is the expected waiting time in a D/M/ queue with slow servers (more precisely, each server working with rate only when busy) and is the probability of zero wait.  With , we have

 m2=0.16901950...,p2=0.70448039...;
 m3=0.12647170...,p3=0.77887245...;
 m4=0.09744181...,p4=0.82962932...;
 m5=0.07648770...,p5=0.89364299...;

i.e., slow servers outperform one fast server, relative to average waiting time.  The sum of idle periods over all servers would however be potentially significant; the mean of would be crucial in minimizing total cost as a function of , for fixed .

## 7 Acknowledgements

Stig Rosenlund and Robert Cooper were so kind in answering several of my questions. I am grateful to innumerable software developers.  Mathematica routines NDSolve for delay-differential equations and InverseLaplaceTransform (for Mma version ) assisted in numerically confirming many results.  R steadfastly remains my favorite statistical programming language.

## References

• [1] S. Finch, M/G/1-FIFO queue with uniform service times, arXiv:2206.11108.
• [2] S. Finch, M/D/1 queues with LIFO and SIRO policies, arXiv:2208.09980.
• [3] W. L. Smith, On the distribution of queueing times, Proc. Cambridge Philos. Soc. 49 (1953) 449–461; MR0054870.
• [4] F. Pollaczek, Sur une généralisation de la théorie des attentes, C. R. Acad. Sci. Paris 236 (1953) 578–580; MR0053432.
• [5]

D. G. Kendall, Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain,

Annals Math. Statistics 24 (1953) 338–354; MR0056231.
• [6] D. M. G. Wishart, Queuing systems in which the discipline is “last-come, first-served”, Operations Res. 8 (1960) 591–599; MR0125646.
• [7] J. L. Schiff, The Laplace Transform: Theory and Applications, Springer-Verlag, 1999, pp. 88–89; MR1716143.
• [8] L. Takács, Delay distributions for simple trunk groups with recurrent input and exponential service times, Bell System Tech. J. 41 (1962) 311–320; MR0132609.
• [9] U. N. Bhat, An Introduction to Queueing Theory. Modeling and Analysis in Applications, Birkhäuser, 2008, pp. 98–111; MR2449481.
• [10] B. Conolly, The busy period in relation to the queueing process GI/M/1, Biometrika 46 (1959) 246–251; MR0102864.
• [11] N. U. Prabhu, Stochastic Storage Processes. Queues, Insurance Risk, Dams, and Data Communication, 2 ed., Springer-Verlag, 1998, pp. 78–81; MR1492990.
• [12] N. Hadidi and B. Conolly, On the reduction of congestion, Stat. Res. Rep. n. 6, Institute of Math., Univ. of Oslo (1969).
• [13] B. Conolly and N. Hadidi, A comparison of the operational features of conventional queues with a self-regulating system, J. Royal Statist. Soc. Ser. C 18 (1969) 41–53; MR0242286.
• [14] B. Conolly, Lecture Notes on Queueing Systems, Ellis Horwood Ltd., 1975; pp. 68–69, 78–82; MR0410973.
• [15] P. J. Burke, Equilibrium delay distribution for one channel with constant holding time, Poisson input and random service, Bell System Tech. J. 38 (1959) 1021–1031; MR0107313.
• [16] G. M. Carter and R. B. Cooper, Queues with service in random order, Operations Res. 20 (1972) 389–405.
• [17] R. B. Cooper, Introduction to Queueing Theory, 2 ed., North-Holland, 1981, pp. 275–280; MR0636094.
• [18] S. I. Rosenlund, The random order service G/M/m queue, Naval Res. Logist. Quart. 27 (1980) 207–215; MR0574048.
• [19] B. Jansson, Choosing a good appointment system – A study of queues of the type , Operations Res. 14 (1966) 292–312; MR0189835.
• [20] R. F. Dailey, Queue Control for Multiple Sequential Requests, Ph.D. thesis, Ohio State Univ., 1984.
• [21] R. Roy and F. W. J. Olver, Lambert -Function, NIST Digital Library of Mathematical Functions
• [22] C. Geiszler, A numerical procedure for the selection of the constant interarrival time to a single server queue, Comp. & Math. with Appl. 7 (1981) 537–546.
• [23] C. D. Pegden and M. Rosenshine, Scheduling arrivals to queues, Comput. Oper. Res. 17 (1990) 343–348; MR1053002.
• [24] W. E. Stein and M. J. Côté, Scheduling arrivals to a queue, Comput. Oper. Res. 21 (1994) 607–614.
• [25] E. Hyytiä, G. Magnússon and R. Righter, Controlling queues with constant interarrival times, Proc. 31 International Teletraffic Congress (ITC), ed. R. R. Mazumdar and G. Dán, IEEE, 2019, pp. 19–27.
• [26] S. Choi, Sangdo and W. E. Wilhelm, Sequencing in an appointment system with deterministic arrivals and non-identical exponential service times, Comput. Oper. Res. 117 (2020) 104901; MR4062943.
• [27] B. Hajek, The proof of a folk theorem on queueing delay with applications to routing in networks, J. Assoc. Comput. Mach. 30 (1983) 834–851; MR0819133.
• [28] L. Takács, Introduction to the Theory of Queues, Oxford Univ. Press, 1962, pp. 147–158; MR0133880.
• [29] A. O. Allen, Probability, Statistics, and Queueing Theory, 2 ed., Academic Press, 1990, pp. 321–324, 698–699; MR1075410.  Steven Finch MIT Sloan School of Management Cambridge, MA, USA steven_finch@harvard.edu