Queueing theory explained

Queueing theory is the mathematical study of waiting lines, or queues.[1] A queueing model is constructed so that queue lengths and waiting time can be predicted. Queueing theory is generally considered a branch of operations research because the results are often used when making business decisions about the resources needed to provide a service.

Queueing theory has its origins in research by Agner Krarup Erlang, who created models to describe the system of incoming calls at the Copenhagen Telephone Exchange Company. These ideas were seminal to the field of teletraffic engineering and have since seen applications in telecommunication, traffic engineering, computing,[2] project management, and particularly industrial engineering, where they are applied in the design of factories, shops, offices, and hospitals.[3] [4]

Spelling

The spelling "queueing" over "queuing" is typically encountered in the academic research field. In fact, one of the flagship journals of the field is Queueing Systems.

Description

Queueing theory is one of the major areas of study in the discipline of management science. Through management science, businesses are able to solve a variety of problems using different scientific and mathematical approaches. Queueing analysis is the probabilistic analysis of waiting lines, and thus the results, also referred to as the operating characteristics, are probabilistic rather than deterministic.[5] The probability that n customers are in the queueing system, the average number of customers in the queueing system, the average number of customers in the waiting line, the average time spent by a customer in the total queuing system, the average time spent by a customer in the waiting line, and finally the probability that the server is busy or idle are all of the different operating characteristics that these queueing models compute. The overall goal of queueing analysis is to compute these characteristics for the current system and then test several alternatives that could lead to improvement. Computing the operating characteristics for the current system and comparing the values to the characteristics of the alternative systems allows managers to see the pros and cons of each potential option. These systems help in the final decision making process by showing ways to increase savings, reduce waiting time, improve efficiency, etc. The main queueing models that can be used are the single-server waiting line system and the multiple-server waiting line system, which are discussed further below. These models can be further differentiated depending on whether service times are constant or undefined, the queue length is finite, the calling population is finite, etc.

Single queueing nodes

A queue or queueing node can be thought of as nearly a black box. Jobs (also called customers or requests, depending on the field) arrive to the queue, possibly wait some time, take some time being processed, and then depart from the queue.

However, the queueing node is not quite a pure black box since some information is needed about the inside of the queueing node. The queue has one or more servers which can each be paired with an arriving job. When the job is completed and departs, that server will again be free to be paired with another arriving job.

An analogy often used is that of the cashier at a supermarket. (There are other models, but this one is commonly encountered in the literature.) Customers arrive, are processed by the cashier, and depart. Each cashier processes one customer at a time, and hence this is a queueing node with only one server. A setting where a customer will leave immediately if the cashier is busy when the customer arrives, is referred to as a queue with no buffer (or no waiting area). A setting with a waiting zone for up to n customers is called a queue with a buffer of size n.

Birth-death process

See also: Survival analysis. The behaviour of a single queue (also called a queueing node) can be described by a birth–death process, which describes the arrivals and departures from the queue, along with the number of jobs currently in the system. If k denotes the number of jobs in the system (either being serviced or waiting if the queue has a buffer of waiting jobs), then an arrival increases k by 1 and a departure decreases k by 1.

The system transitions between values of k by "births" and "deaths", which occur at the arrival rates

λi

and the departure rates

\mui

for each job

i

. For a queue, these rates are generally considered not to vary with the number of jobs in the queue, so a single average rate of arrivals/departures per unit time is assumed. Under this assumption, this process has an arrival rate of

λ=avg(λ1,λ2,...,λk)

and a departure rate of

\mu=avg(\mu1,\mu2,...,\muk)

.

Balance equations

The steady state equations for the birth-and-death process, known as the balance equations, are as follows. Here

Pn

denotes the steady state probability to be in state n.

\mu1P1=λ0P0

λ0P0+\mu2P2=(λ1+\mu1)P1

λn-1Pn-1+\mun+1Pn+1=(λn+\mun)Pn

The first two equations imply

P1=

λ0
\mu1

P0

and

P2=

λ1
\mu2

P1+

1
\mu2

(\mu1P1-λ0P0)=

λ1
\mu2

P1=

λ1λ0
\mu2\mu1

P0

.

By mathematical induction,

Pn=

λn-1λn-2 … λ0
\mun\mun-1\mu1

P0=P0

n-1
\prod
i=0
λi
\mui+1
.

The condition

infty
\sum
n=0

Pn=P0+P0

infty
\sum
n=1
n-1
\prod
i=0
λi
\mui+1

=1

leads to

P0=

1
1+
infty
\sum
n=1
n-1
\prod
i=0
λi
\mui+1
which, together with the equation for

Pn

(n\geq1)

, fully describes the required steady state probabilities.

Kendall's notation

See main article: Kendall's notation. Single queueing nodes are usually described using Kendall's notation in the form A/S/c where A describes the distribution of durations between each arrival to the queue, S the distribution of service times for jobs, and c the number of servers at the node.[6] [7] For an example of the notation, the M/M/1 queue is a simple model where a single server serves jobs that arrive according to a Poisson process (where inter-arrival durations are exponentially distributed) and have exponentially distributed service times (the M denotes a Markov process). In an M/G/1 queue, the G stands for "general" and indicates an arbitrary probability distribution for service times.

Example analysis of an M/M/1 queue

Consider a queue with one server and the following characteristics:

λ

: the arrival rate (the reciprocal of the expected time between each customer arriving, e.g. 10 customers per second)

\mu

: the reciprocal of the mean service time (the expected number of consecutive service completions per the same unit time, e.g. per 30 seconds)

Pn

: the probability of there being n customers in the system in steady state

Further, let

En

represent the number of times the system enters state n, and

Ln

represent the number of times the system leaves state n. Then

\left\vertEn-Ln\right\vert\in\{0,1\}

for all n. That is, the number of times the system leaves a state differs by at most 1 from the number of times it enters that state, since it will either return into that state at some time in the future (

En=Ln

) or not (

\left\vertEn-Ln\right\vert=1

).

When the system arrives at a steady state, the arrival rate should be equal to the departure rate.

Thus the balance equations

\muP1=λP0

λP0+\muP2=(λ+\mu)P1

λPn-1+\muPn+1=(λ+\mu)Pn

imply

Pn=

λ
\mu

Pn-1,n=1,2,\ldots

The fact that

P0+P1+=1

leads to the geometric distribution formula

Pn=(1-\rho)\rhon

where

\rho=

λ
\mu

<1

.

Simple two-equation queue

A common basic queueing system is attributed to Erlang and is a modification of Little's Law. Given an arrival rate λ, a dropout rate σ, and a departure rate μ, length of the queue L is defined as:

L=

λ-\sigma
\mu
.

Assuming an exponential distribution for the rates, the waiting time W can be defined as the proportion of arrivals that are served. This is equal to the exponential survival rate of those who do not drop out over the waiting period, giving:

\mu
λ

=e-W{\mu

}

The second equation is commonly rewritten as:

W=

1ln
\mu
λ
\mu

The two-stage one-box model is common in epidemiology.[8]

History

In 1909, Agner Krarup Erlang, a Danish engineer who worked for the Copenhagen Telephone Exchange, published the first paper on what would now be called queueing theory.[9] [10] [11] He modeled the number of telephone calls arriving at an exchange by a Poisson process and solved the M/D/1 queue in 1917 and M/D/k queueing model in 1920.[12] In Kendall's notation:

If the node has more jobs than servers, then jobs will queue and wait for service.

The M/G/1 queue was solved by Felix Pollaczek in 1930,[13] a solution later recast in probabilistic terms by Aleksandr Khinchin and now known as the Pollaczek–Khinchine formula.

After the 1940s, queueing theory became an area of research interest to mathematicians.[14] In 1953, David George Kendall solved the GI/M/k queue[15] and introduced the modern notation for queues, now known as Kendall's notation. In 1957, Pollaczek studied the GI/G/1 using an integral equation.[16] John Kingman gave a formula for the mean waiting time in a G/G/1 queue, now known as Kingman's formula.[17]

Leonard Kleinrock worked on the application of queueing theory to message switching in the early 1960s and packet switching in the early 1970s. His initial contribution to this field was his doctoral thesis at the Massachusetts Institute of Technology in 1962, published in book form in 1964. His theoretical work published in the early 1970s underpinned the use of packet switching in the ARPANET, a forerunner to the Internet.

The matrix geometric method and matrix analytic methods have allowed queues with phase-type distributed inter-arrival and service time distributions to be considered.[18]

Systems with coupled orbits are an important part in queueing theory in the application to wireless networks and signal processing.[19]

Modern day application of queueing theory concerns among other things product development where (material) products have a spatiotemporal existence, in the sense that products have a certain volume and a certain duration.[20]

Problems such as performance metrics for the M/G/k queue remain an open problem.

Service disciplines

Various scheduling policies can be used at queueing nodes:

First in, first out: Also called first-come, first-served (FCFS),[21] this principle states that customers are served one at a time and that the customer that has been waiting the longest is served first.[22]
Last in, first out: This principle also serves customers one at a time, but the customer with the shortest waiting time will be served first.[22] Also known as a stack.
Processor sharing: Service capacity is shared equally between customers.[22]
Priority: Customers with high priority are served first.[22] Priority queues can be of two types: non-preemptive (where a job in service cannot be interrupted) and preemptive (where a job in service can be interrupted by a higher-priority job). No work is lost in either model.[23]
Shortest job first: The next job to be served is the one with the smallest size.[24]
Preemptive shortest job first: The next job to be served is the one with the smallest original size.[25]
Shortest remaining processing time: The next job to serve is the one with the smallest remaining processing requirement.[26]
Service facility
Unreliable server

Server failures occur according to a stochastic (random) process (usually Poisson) and are followed by setup periods during which the server is unavailable. The interrupted customer remains in the service area until server is fixed.[27]

Customer waiting behavior

Arriving customers not served (either due to the queue having no buffer, or due to balking or reneging by the customer) are also known as dropouts. The average rate of dropouts is a significant parameter describing a queue.

Queueing networks

Queue networks are systems in which multiple queues are connected by customer routing. When a customer is serviced at one node, it can join another node and queue for service, or leave the network.

For networks of m nodes, the state of the system can be described by an m–dimensional vector (x1, x2, ..., xm) where xi represents the number of customers at each node.

The simplest non-trivial networks of queues are called tandem queues.[28] The first significant results in this area were Jackson networks,[29] [30] for which an efficient product-form stationary distribution exists and the mean value analysis[31] (which allows average metrics such as throughput and sojourn times) can be computed.[32] If the total number of customers in the network remains constant, the network is called a closed network and has been shown to also have a product–form stationary distribution by the Gordon–Newell theorem.[33] This result was extended to the BCMP network,[34] where a network with very general service time, regimes, and customer routing is shown to also exhibit a product–form stationary distribution. The normalizing constant can be calculated with the Buzen's algorithm, proposed in 1973.[35]

Networks of customers have also been investigated, such as Kelly networks, where customers of different classes experience different priority levels at different service nodes.[36] Another type of network are G-networks, first proposed by Erol Gelenbe in 1993:[37] these networks do not assume exponential time distributions like the classic Jackson network.

Routing algorithms

See also: Stochastic scheduling. In discrete-time networks where there is a constraint on which service nodes can be active at any time, the max-weight scheduling algorithm chooses a service policy to give optimal throughput in the case that each job visits only a single-person service node. In the more general case where jobs can visit more than one node, backpressure routing gives optimal throughput. A network scheduler must choose a queueing algorithm, which affects the characteristics of the larger network.[38]

Mean-field limits

Mean-field models consider the limiting behaviour of the empirical measure (proportion of queues in different states) as the number of queues m approaches infinity. The impact of other queues on any given queue in the network is approximated by a differential equation. The deterministic model converges to the same stationary distribution as the original model.[39]

Heavy traffic/diffusion approximations

See main article: Heavy traffic approximation. In a system with high occupancy rates (utilisation near 1), a heavy traffic approximation can be used to approximate the queueing length process by a reflected Brownian motion,[40] Ornstein–Uhlenbeck process, or more general diffusion process.[41] The number of dimensions of the Brownian process is equal to the number of queueing nodes, with the diffusion restricted to the non-negative orthant.

Fluid limits

See main article: Fluid limit. Fluid models are continuous deterministic analogs of queueing networks obtained by taking the limit when the process is scaled in time and space, allowing heterogeneous objects. This scaled trajectory converges to a deterministic equation which allows the stability of the system to be proven. It is known that a queueing network can be stable but have an unstable fluid limit.[42]

Queueing Applications

Queueing theory finds widespread application in computer science and information technology. In networking, for instance, queues are integral to routers and switches, where packets queue up for transmission. By applying queueing theory principles, designers can optimize these systems, ensuring responsive performance and efficient resource utilization.Beyond the technological realm, queueing theory is relevant to everyday experiences. Whether waiting in line at a supermarket or for public transportation, understanding the principles of queueing theory provides valuable insights into optimizing these systems for enhanced user satisfaction. At some point, everyone will be involved in an aspect of queuing. What some may view to be an inconvenience could possibly be the most effective method.Queueing theory, a discipline rooted in applied mathematics and computer science, is a field dedicated to the study and analysis of queues, or waiting lines, and their implications across a diverse range of applications. This theoretical framework has proven instrumental in understanding and optimizing the efficiency of systems characterized by the presence of queues. The study of queues is essential in contexts such as traffic systems, computer networks, telecommunications, and service operations.Queueing theory delves into various foundational concepts, with the arrival process and service process being central. The arrival process describes the manner in which entities join the queue over time, often modeled using stochastic processes like Poisson processes. The efficiency of queueing systems is gauged through key performance metrics. These include the average queue length, average wait time, and system throughput. These metrics provide insights into the system's functionality, guiding decisions aimed at enhancing performance and reducing wait times.References:Gross, D., & Harris, C. M. (1998). Fundamentals of Queueing Theory. John Wiley & Sons.Kleinrock, L. (1976). Queueing Systems: Volume I - Theory. Wiley.Cooper, B. F., & Mitrani, I. (1985). Queueing Networks: A Fundamental Approach. John Wiley & Sons

See also

Further reading

External links

Notes and References

  1. Book: Sundarapandian, V. . Probability, Statistics and Queueing Theory . PHI Learning . 2009 . 7. Queueing Theory . 978-81-203-3844-9 .
  2. Web site: Lawrence W. Dowdy, Virgilio A.F. Almeida . Daniel A. Menasce . Performance by Design: Computer Capacity Planning by Example . 2009-07-08 . 2016-05-06 . https://web.archive.org/web/20160506025515/http://cs.gmu.edu/~menasce/perfbyd/ . live .
  3. News: Kira . Schlechter . Hershey Medical Center to open redesigned emergency room . The Patriot-News . March 2, 2009 . March 12, 2009 . June 29, 2016 . https://web.archive.org/web/20160629151917/http://www.pennlive.com/midstate/index.ssf/2009/03/hershey_med_to_open_redesigned.html . live .
  4. Book: Using queuing theory to analyse completion times in accident and emergency departments in the light of the Government 4-hour target . https://web.archive.org/web/20210907100556/https://openaccess.city.ac.uk/id/eprint/2309/ . September 7, 2021 . 2008-05-20 . Mayhew, Les . Smith, David . December 2006 . . 978-1-905752-06-5 .
  5. Book: Taylor, Bernard W. . Introduction to management science . 2019 . Pearson . 978-0-13-473066-0 . 13th . New York.
  6. Tijms, H.C, Algorithmic Analysis of Queues, Chapter 9 in A First Course in Stochastic Models, Wiley, Chichester, 2003
  7. Kendall . D. G. . David George Kendall. Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain . 10.1214/aoms/1177728975 . 2236285. The Annals of Mathematical Statistics . 24 . 3 . 338–354 . 1953. free .
  8. Hernández-Suarez. Carlos. 2010. An application of queuing theory to SIS and SEIS epidemic models. Math. Biosci.. 7. 4. 809–823. 10.3934/mbe.2010.7.809. 21077709. free.
  9. Web site: Agner Krarup Erlang (1878-1929) | plus.maths.org . Pass.maths.org.uk . 2013-04-22 . 1997-04-30 . 2008-10-07 . https://web.archive.org/web/20081007225944/http://pass.maths.org.uk/issue2/erlang/index.html . live .
  10. Asmussen . S. R. . Boxma . O. J. . Onno Boxma. 10.1007/s11134-009-9151-8 . Editorial introduction . . 63 . 1–4 . 1–2 . 2009 . 45664707 .
  11. Agner Krarup Erlang . Agner Krarup . Erlang. The theory of probabilities and telephone conversations . Nyt Tidsskrift for Matematik B . 20 . 33–39 . https://web.archive.org/web/20111001212934/http://oldwww.com.dtu.dk/teletraffic/erlangbook/pps131-137.pdf . 2011-10-01 . 1909.
  12. Kingman . J. F. C. . John Kingman . The first Erlang century—and the next . . 63 . 1–4 . 3–4 . 2009 . 10.1007/s11134-009-9147-4. 38588726 .
  13. Pollaczek, F., Ueber eine Aufgabe der Wahrscheinlichkeitstheorie, Math. Z. 1930
  14. Whittle . P. . Peter Whittle (mathematician). 10.1287/opre.50.1.227.17792 . Applied Probability in Great Britain . Operations Research. 50 . 1 . 227–239. 2002 . 3088474. free .
  15. Kendall, D.G.:Stochastic processes occurring in the theory of queues and their analysis by the method of the imbedded Markov chain, Ann. Math. Stat. 1953
  16. Pollaczek, F., Problèmes Stochastiques posés par le phénomène de formation d'une queue
  17. 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. 1961PCPS...57..902K . 62590290 .
  18. Ramaswami . V. . 10.1080/15326348808807077 . A stable recursion for the steady state vector in markov chains of m/g/1 type . Communications in Statistics. Stochastic Models . 4 . 183–188 . 1988 .
  19. Book: Morozov . E. . Stability analysis of a multiclass retrial system withcoupled orbit queues . 10.1007/978-3-319-66583-2_6 . Proceedings of 14th European Workshop. Lecture Notes in Computer Science . 17. 85–98 . 2017 . free. 978-3-319-66582-5 .
  20. Simulation and queueing network modeling of single-product production campaigns . 1992 . 10.1016/0098-1354(92)80018-5 . Carlson . E.C. . Felder . R.M. . Computers & Chemical Engineering . 16 . 7 . 707–718 .
  21. Book: Manuel. Laguna. Business Process Modeling, Simulation and Design. 2011. Pearson Education India. 978-81-317-6135-9. 178. 6 October 2017. en.
  22. Penttinen A., Chapter 8  - Queueing Systems, Lecture Notes: S-38.145 - Introduction to Teletraffic Theory.
  23. Book: Harchol-Balter . M.. Mor Harchol-Balter . Scheduling: Non-Preemptive, Size-Based Policies . 10.1017/CBO9781139226424.039 . Performance Modeling and Design of Computer Systems . 499–507 . 2012 . 978-1-139-22642-4 .
  24. Book: Andrew S. Tanenbaum. Herbert Bos. Modern Operating Systems. 2015. Pearson. 978-0-13-359162-0.
  25. Book: Harchol-Balter . M. . Mor Harchol-Balter. Scheduling: Preemptive, Size-Based Policies . 10.1017/CBO9781139226424.040 . Performance Modeling and Design of Computer Systems . 508–517 . 2012 . 978-1-139-22642-4 .
  26. Book: Harchol-Balter . M.. Mor Harchol-Balter . Scheduling: SRPT and Fairness . 10.1017/CBO9781139226424.041 . Performance Modeling and Design of Computer Systems . 518–530 . 2012 . 978-1-139-22642-4 .
  27. Dimitriou . I. . A Multiclass Retrial System With Coupled Orbits And Service Interruptions: Verification of Stability Conditions . Proceedings of FRUCT 24 . 7 . 75–82 . 2019.
  28. Web site: Archived copy . 2018-08-02 . 2017-03-29 . https://web.archive.org/web/20170329085928/http://www.stats.ox.ac.uk/~winkel/bs3a07l13-14.pdf#page=4 . live .
  29. Jackson . J. R. . James R. Jackson. Networks of Waiting Lines . 10.1287/opre.5.4.518 . Operations Research . 5 . 4 . 518–521 . 1957 . 167249.
  30. Jobshop-like Queueing Systems. James R.. Jackson. Management Science. 10. 1. Oct 1963. 131–142. 10.1287/mnsc.1040.0268. 2627213.
  31. Reiser . M.. Lavenberg . S. S. . 10.1145/322186.322195 . Mean-Value Analysis of Closed Multichain Queuing Networks . Journal of the ACM. 27 . 2 . 313 . 1980 . 8694947. free .
  32. Van Dijk . N. M. . On the arrival theorem for communication networks . 10.1016/0169-7552(93)90073-D . Computer Networks and ISDN Systems . 25 . 10 . 1135–2013 . 1993 . 45218280 . 2019-09-24 . 2019-09-24 . https://web.archive.org/web/20190924062816/https://research.vu.nl/ws/files/73611045/Scanjob%2520199100081 . live .
  33. Gordon . W. J. . Newell . G. F. . Gordon F. Newell. 10.1287/opre.15.2.254 . 168557. Closed Queuing Systems with Exponential Servers . Operations Research. 15 . 2 . 254 . 1967 .
  34. Baskett . F. . Chandy . K. Mani . K. Mani Chandy . Muntz . R.R. . Palacios . F.G. . Open, closed and mixed networks of queues with different classes of customers . Journal of the ACM . 22 . 2 . 248 - 260 . 1975 . 10.1145/321879.321887 . 15204199 . free .
  35. Buzen . J. P. . Jeffrey P. Buzen . Computational algorithms for closed queueing networks with exponential servers . 10.1145/362342.362345 . Communications of the ACM . 16 . 9 . 527–531 . 1973 . 10702 . 2015-09-01 . 2016-05-13 . https://web.archive.org/web/20160513192804/http://www-unix.ecs.umass.edu/~krishna/ece673/buzen.pdf . live .
  36. Kelly . F. P. . Frank Kelly (mathematician). Networks of Queues with Customers of Different Types . Journal of Applied Probability . 12 . 3 . 542–554 . 10.2307/3212869 . 3212869. 1975 . 51917794 .
  37. 10.2307/3214781 . G-Networks with Triggered Customer Movement . Erol . Gelenbe . Erol Gelenbe . Journal of Applied Probability . 30 . 3 . Sep 1993 . 742–748 . 3214781 . 121673725 .
  38. Newell . G. F. . 1982 . Applications of Queueing Theory . SpringerLink . en . 10.1007/978-94-009-5970-5. 978-94-009-5972-9 .
  39. Book: Bobbio . A. . Gribaudo . M. . Telek . M. S. . 10.1109/QEST.2008.47 . Analysis of Large Scale Interacting Systems by Mean Field Method . 2008 Fifth International Conference on Quantitative Evaluation of Systems . 215 . 2008 . 978-0-7695-3360-5 . 2714909 .
  40. Chen . H. . Whitt . W. . 10.1007/BF01149260 . Diffusion approximations for open queueing networks with service interruptions . Queueing Systems. 13 . 4 . 335 . 1993 . 1180930 .
  41. Yamada . K. . Diffusion Approximation for Open State-Dependent Queueing Networks in the Heavy Traffic Situation . 10.1214/aoap/1177004602 . The Annals of Applied Probability . 5 . 4 . 958–982 . 1995 . 2245101. free .
  42. Bramson . M. . A stable queueing network with unstable fluid model . 10.1214/aoap/1029962815 . The Annals of Applied Probability . 9 . 3 . 818–853 . 1999 . 2667284. free .