Jump to content

G/G/1 queue

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by GalenSeilis (talk | contribs) at 21:04, 19 December 2023 (Added a software section with an example using the Ciw Python package.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In queueing theory, a discipline within the mathematical theory of probability, the G/G/1 queue represents the queue length in a system with a single server where interarrival times have a general (meaning arbitrary) distribution and service times have a (different) general distribution.[1] The evolution of the queue can be described by the Lindley equation.[2]

The system is described in Kendall's notation where the G denotes a general distribution for both interarrival times and service times and the 1 that the model has a single server.[3][4] Different interarrival and service times are considered to be independent, and sometimes the model is denoted GI/GI/1 to emphasise this. The numerical solution for the GI/G/1 can be obtained by discretizing the time.[5]

Waiting time

Kingman's formula gives an approximation for the mean waiting time in a G/G/1 queue.[6] Lindley's integral equation is a relationship satisfied by the stationary waiting time distribution which can be solved using the Wiener–Hopf method.[7]

Multiple servers

Few results are known for the general G/G/k model as it generalises the M/G/k queue for which few metrics are known. Bounds can be computed using mean value analysis techniques, adapting results from the M/M/c queue model, using heavy traffic approximations, empirical results[8]: 189 [9] or approximating distributions by phase type distributions and then using matrix analytic methods to solve the approximate systems.[8]: 201 

In a G/G/2 queue with heavy-tailed job sizes, the tail of the delay time distribution is known to behave like the tail of an exponential distribution squared under low loads and like the tail of an exponential distribution for high loads.[10][11][12]

Software

Ciw

Ciw is a Python package for simulating queueing networks.[13]

The two G's in G/G/1 do not have to be the same distribution, and respectively can be any distribution with non-negative support.

We will use a Hyperexponential distribution for the arrival distribution. A hyperexponential distribution is exactly a mixture distribution of exponential distributions. This has an interpretation of there being an implicit set of arrival processes that each have their own distinct but independent exponential arrival times. In this case we will choose a mixture of four such arrival processes with distinct arrival rates.

We will use a gamma distribution for the service distribution. A gamma distribution is the result of a sum of independent exponentially-distributed random variable, and thus for this example we have an interpretation that the servicing is implicitly a multi-step process where each step has an exponentially-distributed completion time.

A G/G/1 queue can be implemented and simulated using Ciw in the following way.

import ciw

ciw.seed(2018)

arrival_dist = ciw.dists.HyperExponential(rates=[9, 5, 6, 1], probs=[0.2, 0.1, 0.6, 0.1])
service_dist = ciw.dists.Gamma(shape=0.6, scale=1.2)
HORIZON = 365

network = ciw.create_network(
    arrival_distributions = [arrival_dist],
    service_distributions = [service_dist],
    number_of_servers = [1]
    )
    
simulation = ciw.Simulation(network)
simulation.simulate_until_max_time(HORIZON)
records = simulation.get_all_records()

References

  1. ^ Bhat, U. N. (2008). "The General Queue G/G/1 and Approximations". An Introduction to Queueing Theory. pp. 169–183. doi:10.1007/978-0-8176-4725-4_9. ISBN 978-0-8176-4724-7.
  2. ^ Foss, S. (2011). "The G/G/1 Queue". Wiley Encyclopedia of Operations Research and Management Science. doi:10.1002/9780470400531.eorms0878. ISBN 9780470400531.
  3. ^ Kendall, D. G. (1953). "Stochastic Processes Occurring in the Theory of Queues and their Analysis by the Method of the Imbedded Markov Chain". The Annals of Mathematical Statistics. 24 (3): 338. doi:10.1214/aoms/1177728975. JSTOR 2236285.
  4. ^ Smith, W. L. (1953). "On the distribution of queueing times". Mathematical Proceedings of the Cambridge Philosophical Society. 49 (3): 449. Bibcode:1953PCPS...49..449S. doi:10.1017/S0305004100028620.
  5. ^ Grassmann, Winfried; Tavakoli, Javad (June 2019). "The Distribution of the Line Length in a Discrete Time GI/G/1 Queue". Performance Evaluation. 131: 43–53.
  6. ^ Kingman, J. F. C.; Atiyah (October 1961). "The single server queue in heavy traffic". Mathematical Proceedings of the Cambridge Philosophical Society. 57 (4): 902. Bibcode:1961PCPS...57..902K. doi:10.1017/S0305004100036094. JSTOR 2984229.
  7. ^ Prabhu, N. U. (1974). "Wiener-Hopf Techniques in Queueing Theory". Mathematical Methods in Queueing Theory. Lecture Notes in Economics and Mathematical Systems. Vol. 98. pp. 81–90. doi:10.1007/978-3-642-80838-8_5. ISBN 978-3-540-06763-4.
  8. ^ a b Gautam, Natarajan (2012). Analysis of Queues: Methods and Applications. CRC Press. ISBN 9781439806586.
  9. ^ Whitt, W. (2009). "Approximations for the GI/G/m Queue" (PDF). Production and Operations Management. 2 (2): 114–161. doi:10.1111/j.1937-5956.1993.tb00094.x.
  10. ^ Harchol-Balter, M. (2012). "Task Assignment Policies for Server Farms". Performance Modeling and Design of Computer Systems. p. 408. doi:10.1017/CBO9781139226424.031. ISBN 9781139226424.
  11. ^ Whitt, W. (2000). "The impact of a heavy-tailed service-time distribution upon the M/GI/s waiting-time distribution" (PDF). Queueing Systems. 36: 71–87. doi:10.1023/A:1019143505968.
  12. ^ Foss, S.; Korshunov, D. (2006). "Heavy Tails in Multi-Server Queue". Queueing Systems. 52: 31. arXiv:1303.4705. doi:10.1007/s11134-006-3613-z.
  13. ^ "Welcome to Ciw's documentation! — Ciw 3.1.0 documentation". ciw.readthedocs.io. Retrieved 2023-12-19.