M/M/1 queue explained

In queueing theory, a discipline within the mathematical theory of probability, an M/M/1 queue represents the queue length in a system having a single server, where arrivals are determined by a Poisson process and job service times have an exponential distribution. The model name is written in Kendall's notation. The model is the most elementary of queueing models[1] and an attractive object of study as closed-form expressions can be obtained for many metrics of interest in this model. An extension of this model with more than one server is the M/M/c queue.

Model definition

An M/M/1 queue is a stochastic process whose state space is the set where the value corresponds to the number of customers in the system, including any currently in service.

The model can be described as a continuous time Markov chain with transition rate matrix

Q=\begin{pmatrix} &λ\\ \mu&-(\mu)&λ\\ &\mu&-(\mu)&λ\\ &&\mu&-(\mu)&λ&\\ &&&&\ddots \end{pmatrix}

on the state space . This is the same continuous time Markov chain as in a birth–death process. The state space diagram for this chain is as below.

Stationary analysis

The model is considered stable only if λ < μ. If, on average, arrivals happen faster than service completions the queue will grow indefinitely long and the system will not have a stationary distribution. The stationary distribution is the limiting distribution for large values of t.

Various performance measures can be computed explicitly for the M/M/1 queue. We write ρ = λ/μ for the utilization of the buffer and require ρ < 1 for the queue to be stable. ρ represents the average proportion of time which the server is occupied.

The probability that the stationary process is in state i (contains i customers, including those in service) is[2]

i.
\pi
i=(1-\rho)\rho

Average number of customers in the system

We see that the number of customers in the system is geometrically distributed with parameter 1 − ρ. Thus the average number of customers in the system is ρ/(1 − ρ) and the variance of number of customers in the system is ρ/(1 − ρ)2. This result holds for any work conserving service regime, such as processor sharing.[3]

Busy period of server

The busy period is the time period measured between the instant a customer arrives to an empty system until the instant a customer departs leaving behind an empty system. The busy period has probability density function[4] [5] [6] [7]

f(t)=\begin{cases} 1
t\sqrt{\rho
}e^I_1(2t\sqrt) & t>0\\0 & \text\end

where I1 is a modified Bessel function of the first kind,[8] obtained by using Laplace transforms and inverting the solution.[9]

The Laplace transform of the M/M/1 busy period is given by[10] [11] [12]

E(e-s)=

1

(λ+\mu+s-\sqrt{(λ+\mu+s)2-4λ\mu})

which gives the moments of the busy period, in particular the mean is 1/(μ − λ) and variance is given by

1+λ
\mu
2(1-λ
\mu
\mu)3

.

Response time

The average response time or sojourn time (total time a customer spends in the system) does not depend on scheduling discipline and can be computed using Little's law as 1/(μ − λ). The average time spent waiting is 1/(μ − λ) − 1/μ = ρ/(μ − λ). The distribution of response times experienced does depend on scheduling discipline.

First-come, first-served discipline

For customers who arrive and find the queue as a stationary process, the response time they experience (the sum of both waiting time and service time) has Laplace transform(μ − λ)/(s + μ − λ)[13] and therefore probability density function[14]

f(t)= \begin{cases} (\mu)e-(\mu)t&t>0\\ 0&otherwise. \end{cases}

Processor sharing discipline

In an M/M/1-PS queue there is no waiting line and all jobs receive an equal proportion of the service capacity.[15] Suppose the single server serves at rate 16 and there are 4 jobs in the system, each job will experience service at rate 4. The rate at which jobs receive service changes each time a job arrives at or departs from the system.

For customers who arrive to find the queue as a stationary process, the Laplace transform of the distribution of response times experienced by customers was published in 1970, for which an integral representation is known.[16] The waiting time distribution (response time less service time) for a customer requiring x amount of service has transform

W\ast(s|x)=

(1-\rho)(1-\rhor2)e-[λ(1-r)+s]x
(1-\rhor2)-\rho(1-r)2e-(\mu/r

where r is the smaller root of the equation

λr2-(λ+\mu+s)r+\mu=0.

The mean response time for a job arriving and requiring amount x of service can therefore be computed as x μ/(μ − λ). An alternative approach computes the same results using a spectral expansion method.

Transient solution

We can write a probability mass function dependent on t to describe the probability that the M/M/1 queue is in a particular state at a given time. We assume that the queue is initially in state i and write pk(t) for the probability of being in state k at time t. Then[17] [18]

-(λ+\mu)t
p
k(t)=e

\left[

k-i
2
\rho

Ik-i(at)+

k-i-1
2
\rho

Ik+i+1(at)+(1-\rho)\rhok

infty
\sum
j=k+i+2

\rho-j/2Ij(at)\right]

where

i

is the initial number of customers in the station at time

t=0

,

\rho/\mu

,

a=2\sqrt{λ\mu}

and

Ik

is the modified Bessel function of the first kind. Moments for the transient solution can be expressed as the sum of two monotone functions.[19]

Diffusion approximation

When the utilization ρ is close to 1 the process can be approximated by a reflected Brownian motion with drift parameter λ – μ and variance parameter λ + μ. This heavy traffic limit was first introduced by John Kingman.[20]

Notes and References

  1. Book: Sturgul, John R.. Mine design: examples using simulation. SME. 2000. vi. 0-87335-181-9.
  2. Book: Harrison, Peter. Peter G. Harrison. Naresh M.. Patel. Performance Modelling of Communication Networks and Computer Architectures. registration. Addison–Wesley. 1992.
  3. Guillemin . F. . Boyer . J. . . Analysis of the M/M/1 Queue with Processor Sharing via Spectral Theory . 39 . 4 . 377 . 2001 . 10.1023/A:1013913827667 . dead . https://web.archive.org/web/20061129234117/http://perso.rd.francetelecom.fr/guillemin/PDFfiles/gps.pdf . 2006-11-29 .
  4. Abate . J. . Whitt . W. . Ward Whitt. 10.1007/BF01157854 . Simple spectral representations for the M/M/1 queue . Queueing Systems. 3 . 4 . 321 . 1988 .
  5. J. . Keilson . A. . Kooharian . 1960 . On Time Dependent Queuing Processes . The Annals of Mathematical Statistics . 31 . 1 . 104–112 . 2237497 . 10.1214/aoms/1177705991. free .
  6. Many server queueing processes with Poisson input and exponential service times . Pacific J. Math. . Samuel . Karlin . Samuel Karlin . James . McGregor . 8 . 1 . 1958 . 87–118 . 0097132 . 10.2140/pjm.1958.8.87. free .
  7. Book: 2.12 Busy-Period Analysis . Fundamentals of Queueing Theory . Wiley . Donald . Gross . John F. . Shortle . James M. . Thompson . Carl M.. Harris. 1118211642. 2011-09-23 .
  8. Web site: Course QUE: Queueing Theory, Fall 2003: The M/M/1 system. Ivo . Adan . 2012-08-06.
  9. Book: Stewart, William J.. Probability, Markov chains, queues, and simulation: the mathematical basis of performance modeling. limited. 530. Princeton University Press. 2009. 978-0-691-14062-9.
  10. Book: 10.1007/0-387-21525-5_3 . S. R. . Asmussen. Queueing Theory at the Markovian Level . Applied Probability and Queues . Stochastic Modelling and Applied Probability . 51 . 60–31 . 2003 . 978-0-387-00211-8 .
  11. Adan . I. . Resing . J. . 10.1007/BF01159399 . Simple analysis of a fluid queue driven by an M/M/1 queue . Queueing Systems. 22 . 1–2 . 171–174 . 1996 .
  12. Book: Queueing Systems: Theory, Volume 1 . registration . Leonard . Kleinrock . Leonard Kleinrock . Wiley . 1975 . 0471491101 .
  13. Book: Harrison . P. G. . Response time distributions in queueing network models . 10.1007/BFb0013852 . Performance Evaluation of Computer and Communication Systems . Lecture Notes in Computer Science . 729 . 147–164 . 1993 . 3-540-57297-X .
  14. Book: Stewart, William J.. Probability, Markov chains, queues, and simulation: the mathematical basis of performance modeling. limited. 409. Princeton University Press. 2009. 978-0-691-14062-9.
  15. Coffman . E. G. . Edward G. Coffman, Jr.. Muntz . R. R. . Trotter . H. . Hale Trotter . Waiting Time Distributions for Processor-Sharing Systems . 10.1145/321556.321568 . Journal of the ACM. 17 . 123–130 . 1970 . free .
  16. Morrison . J. A. . 10.1137/0145007 . Response-Time Distribution for a Processor-Sharing System . SIAM Journal on Applied Mathematics. 45 . 1 . 152–167 . 1985 . 2101088.
  17. Book: Queueing Systems Volume 1: Theory . Leonard . Kleinrock . Leonard Kleinrock . 0471491101 . 1975 . 77.
  18. Book: Robertazzi, Thomas G. . Computer Networks and Systems . Springer New York . New York, NY . 2000 . 72 . 978-1-4612-7029-4 . 10.1007/978-1-4612-1164-8.
  19. Abate . J. . Whitt . W. . Ward Whitt. 10.1007/BF01182933 . Transient behavior of the M/M/l queue: Starting at the origin . Queueing Systems. 2 . 41–65 . 1987 .
  20. Kingman . J. F. C. . John Kingman. 10.1017/S0305004100036094 . . Atiyah . The single server queue in heavy traffic . Mathematical Proceedings of the Cambridge Philosophical Society. 57 . 4 . 902 . October 1961 . 2984229.