Queuing Theory

Download as pdf or txt
Download as pdf or txt
You are on page 1of 71

Abstract:

This project deals with the Queueing Theory and some mathematical models
of queueing systems. Starting with the historical backgrounds it gives an overview
of different basic concepts that are needed in queueing theory. Then the elements
of queue and list of symbols are introduced. It highlights several recent advances
and developments of the theory and new applications fields are listed. It briefly
describes different queueing modes and problems based on them. Later various
applications of queueing theory are explained. It ends with the References of the
most important sources.

Keywords:
Queueing theory, probability, means, variance, arrival, service, time,
distribution, Poisson, queuing models.

1
Acknowledgement

Working on this project “Queueing Theory ( Waiting Line Models)” has been an
source of immense knowledge and learning for me. I would like to express my
deep gratitude to Professor Mrs. Rekha R Jaichanderfor her guidance and support
throughout the entire course of this project. I acknowledge with deep sense of
gratitude, the encouragement and help received from the staff of Department of
Mathematics which has helped in successful completion of my project.

2
Contents:
Sr. no. Topic Page no.
1.1 Introduction to Queueing Theory 5
1.2 Definition 7
1.3 Examples 7
1.4 Basic concepts from Probability Theory 9
1.4.1 Variable 9
1.4.2 Random Variable 9
1.4.3 Probability Distribution 10
1.4.4 Discrete vs. Continuous Variables 11
1.4.5 Discrete Probability Distributions 11
1.4.6 Continuous Probability Distributions 12
1.4.7 Generating function 14
1.5 Useful probability distributions 14
1.5.1 Poisson Distribution 15
1.5.2 Exponential distribution 16
1.5.3 Erlang distribution 17
1.6 Queuing Disciplines 18
1.7 Elements of Queuing Systems 19
1.8 Queueing Problem 22
1.9 Transient and steady states 23
1.10 Terminology and Notation 24
1.11 Traffic Intensity 26
1.12 KENDALL’S Notation for representing queueing 26
models
1.13 Queueing models 27
1.13.1 The M/M/1 Queuing System 27
1.13.2 M/M/c queue 38
1.13.3 M/M/∞ queue 41
1.13.4 M/D/1 queue 43
1.13.5 M/D/c queue 45
1.13.6 M/G/1 queue 46
1.13.7 M/G/k queue 49
1.14 Problems 50
1.15 Applications Of Queueing Theory 57
1.15.1 Traffic Flow 57
1.15.2 Scheduling 63

3
1.15.3 Facility Design and Employee Management 64
1.15.4 A Mail Sorting Office 67
1.15.5 Queueing Theory in a Restaurant Operation 68
1.15.6 Applying Queueing Model to the Airspace Control 70
sytems
1.16 Limitations of queuing theory 71

4
1.1. Introduction to Queueing Theory
Queueing theory is a branch of mathematics that studies and models the act
of waiting in lines. It is a common phenomenon in everyday life to see a large
number of persons waiting in front of a booking counter, in a railway station or in a
theatre or in a ration shop to have some service carried out. This waiting problem
led the Danish engineer A.K. (Agner Krarup) Erlang, who worked for the
Copenhagen Telephone Exchange to find a solution. He developed in 1903
the Queueing theory.[3] Queueing theory analyze the shared facility needs to be
accessed for service by a large number of jobs or customers. The first paper on
queuing theory, “The Theory of Probabilities and Telephone Conversations” was
published in 1909 by A.K. Erlang, now considered the father of the field. His work
with the Copenhagen Telephone Company is what prompted his initial foray into
the field.

Sir Agner Krarup Erlang

He pondered the problem of determining how many telephone circuits were


necessary to provide phone service that would prevent customers from waiting too
long for an available circuit. In developing a solution to this problem, he began to
realize that the problem of minimizing waiting time was applicable to many fields,
and began developing the theory further. Erlang’s switchboard problem laid the

5
path for modern queuing theory. His works inspired engineers, mathematicians to
deal with queueing problems using probabilistic methods.

Queueing theory became a field of applied probability and many of its


results have been used in operations research, computer science,
telecommunication, traffic engineering, reliability theory, just to mention some.
The chapters on queuing theory and its applications in the book “Operations
Research: Applications and Algorithms” by Wayne L. Winston illustrates many
expansions 1 2 RYAN BERRY of queuing theory and is the book from which the
majority of the research of this paper has been done.

Fig. 1.1 Queueing system in a bank.

Queuing Theory is a collection of mathematical models of various queuing


systems that take as inputs parameters of the above elements and that provide
quantitative parameters describing the system performance. Because of random
nature of the processes involved the queuing theory is rather demanding and all
models are based on very strong assumptions (not always satisfied in practice).
Many systems (especially queuing networks) are not soluble at all, so the only
technique that may be applied is simulation.

6
Nevertheless queuing systems are practically very important because of the
typical trade-off between the various costs of providing service and the costs
associated with waiting for the service (or leaving the system without being
served). High quality fast service is expensive, but costs caused by customers
waiting in the queue are minimum. On the other hand long queues may cost a lot
because customers (machines e.g.) do not work while waiting in the queue or
customers leave because of long queues. So a typical problem is to find an
optimum system configuration (e.g. the optimum number of servers). The solution
may be found by applying queuing theory or by simulation.

1.2. Definition
In computer science, queueing theory is the study of queues as a technique
for managing processes and objects in a computer. A queue can be studied in terms
of: the source of each queued item, how frequently items arrive on the queue, how
long they can or should wait, whether some items should jump ahead in the queue,
how multiple queues might be formed and managed, and the rules by which items
are enqueued and dequeued.
The queues that a computer manages are sometimes viewed as being in stacks. In
most systems, an item is always added to the top of a stack. A process that handles
queued items from the bottom of the stack first is known as a first-in first-out
(FIFO) process. A process that handles the item at the top of the stack first is
known as a last-in first-out (LIFO) process.

1.3. Examples
Below we briefly describe some situations in which queueing are important.
Example 1. Supermarket.
How long do customers have to wait at the checkouts? What happens with
the waiting 7 time during peak-hours? Are there enough checkouts?

Example 2. Production system.

7
A machine produces different types of products. What is the production lead
time of an order? What is the reduction in the lead time when we have an extra
machine? Should we assign priorities to the orders?

Example 3. Data communication.


In computer communication networks such as the Internet data packets are
transmitted over links from one switch to the next. In each switch incoming
packets can be buffered when the incoming demand exceeds the link capacity.
Once the buffer is full, incoming packets will be lost. What is the packet delay at
the switches? What is the fraction of packets that will be lost? What is a good size
of the buffer?

Example 4. Parking lot.


They are going to make a new parking lot in front of a super market. How
large should it be?

Example 5. Assembly of printed circuit boards.


Mounting vertical components on printed circuit boards is done in an
assembly center consisting of a number of parallel insertion machines. Each
machine has a magazine to store components. What is the production lead time of
the printed circuit boards? How should the components necessary for the assembly
of printed circuit boards be divided among the machines?

Example 6. Call centers of an insurance company.


Questions by phone, regarding insurance conditions, are handled by a call
center. This call center has a team structure, where each team helps customers from
a specific region only. How long do customers have to wait before an operator
becomes available? Is the number of incoming telephone lines enough? Are there
enough operators? Pooling teams?

Example 7. Toll booths.


Motorists have to pay toll in order to pass a bridge. Are there enough toll
booths?

8
Example 8. Traffic lights.
How do we have to regulate traffic lights such that the waiting times are
acceptable?
Example 9. Hospital emergency department.
In a hospital emergency department patients arrive with various kinds of
injuries and medical issues that require urgent treatment. How many nurses and
doctors need to be on staff to provide patients with proper care in a timely manner?
How many intensive care units are needed to hospitalize patients?

Example 10. Mobile communication network.


Users download documents, visit websites and watch video clips on their
laptops, tablets and smart phones. Should the data delivery for certain types of
applications receive priority over others? How many access points need to be
installed and where in order to ensure speedy data transfer?
To begin understanding queues, we must first have some knowledge of
probability theory. In particular, we will review the exponential and Poisson
probability distributions.

1.4. Basic concepts from Probability Theory.


This chapter is devoted to some basic concepts from probability
theory.

1.4.1. Variable.
A variable is a symbol (A, B, x, y, etc.) that can take on any of a specified set of
values.

1.4.2. Random variable.


When the value of a variable is the outcome of a statistical experiment, that
variable is a random variable. Random variables are denoted by capitals, X, Y ,
etc.

9
Generally, statisticians use a capital letter to represent a random variable and
a lower-case letter, to represent one of its values. For example,
 X represents the random variable X.
 P(X) represents the probability of X.
 P(X = x) refers to the probability that the random variable X is equal to a
particular value, denoted by x. As an example, P(X = 1) refers to the
probability that the random variable X is equal to 1.

1.4.3. Probability Distributions


An example will make clear the relationship between random variables and
probability distributions. Suppose you flip a coin two times. This simple statistical
experiment can have four possible outcomes: HH, HT, TH, and TT. Now, let the
variable X represent the number of Heads that result from this experiment. The
variable X can take on the values 0, 1, or 2. In this example, X is a random
variable; because its value is determined by the outcome of a statistical experiment.

A probability distribution is a table or an equation that links each outcome


of a statistical experiment with its probability of occurrence.[9] Consider the coin
flip experiment described above.

The table below, which associates each outcome with its probability, is an
example of a probability distribution.

Number of
Probability
heads

0 0.25

1 0.50

2 0.25

Table 1.1
The above table represents the probability distribution of the random
variable X.

10
All probability distributions can be classified as discrete probability
distributions or as continuous probability distributions, depending on whether
they define probabilities associated with discrete variables or continuous variables.

1.4.4. Discrete vs. Continuous Variables


If a variable can take on any value between two specified values, it is called
a continuous variable; otherwise, it is called a discrete variable.

Some examples will clarify the difference between discrete and continuous
variables.

 Suppose the fire department mandates that all fire fighters must weigh
between 150 and 250 pounds. The weight of a fire fighter would be an
example of a continuous variable; since a fire fighter's weight could take on
any value between 150 and 250 pounds.
 Suppose we flip a coin and count the number of heads. The number of heads
could be any integer value between 0 and plus infinity. However, it could
not be any number between 0 and plus infinity. We could not, for example,
get 2.5 heads. Therefore, the number of heads must be a discrete variable.

Just like variables, probability distributions can be classified as discrete or


continuous.

1.4.5. Discrete Probability Distributions


If a random variable is a discrete variable, its probability distribution is
called a discrete probability distribution.

An example will make this clear. Suppose you flip a coin two times. This
simple statistical experimentcan have four possible outcomes: HH, HT, TH, and
TT. Now, let the random variable X represent the number of Heads that result from
this experiment. The random variable X can only take on the values 0, 1, or 2, so it
is a discrete random variable.

The probability distribution for this statistical experiment appears below.

11
Number of heads Probability

0 0.25
1 0.50
2 0.25

Table 1.2
The above table represents a discrete probability distribution because it relates
each value of a discrete random variable with its probability of occurrence. In
subsequent lessons, we will cover the following discrete probability distributions.

 Binomial probability distribution


 Hypergeometric probability distribution
 Multinomial probability distribution
 Negative binomial distribution
 Poisson probability distribution

Note: With a discrete probability distribution, each possible value of the discrete
random variable can be associated with a non-zero probability. Thus, a discrete
probability distribution can always be presented in tabular form.

1.4.6. Continuous Probability Distributions


If a random variable is a continuous variable, its probability distribution is
called a continuous probability distribution.

A continuous probability distribution differs from a discrete probability


distribution in several ways.

 The probability that a continuous random variable will assume a particular


value is zero.
 As a result, a continuous probability distribution cannot be expressed in
tabular form.
 Instead, an equation or formula is used to describe a continuous probability
distribution.

Most often, the equation used to describe a continuous probability distribution


is called a probability density function. Sometimes, it is referred to as a density

12
function, a PDF, or a pdf. For a continuous probability distribution, the density
function has the following properties:

 Since the continuous random variable is defined over a continuous range of


values (called the domain of the variable), the graph of the density function
will also be continuous over that range.
 The area bounded by the curve of the density function and the x-axis is equal
to 1, when computed over the domain of the variable.
 The probability that a random variable assumes a value between a and b is
equal to the area under the density function bounded by a and b.

For example, consider the probability density function shown in the graph
below. Suppose we wanted to know the probability that the random variable X was
less than or equal to a. The probability that X is less than or equal to a is equal to
the area under the curve bounded by a and minus infinity - as indicated by the
shaded area.

1.4.1 Cumulative probability

Note: The shaded area in the graph represents the probability that the random
variable X is less than or equal to a. This is a cumulative probability. However, the
probability that X is exactly equal to a would be zero. A continuous random
variable can take on an infinite number of values. The probability that it will equal
a specific value (such as a) is always zero.

In subsequent lessons, we will cover the following continuous probability


distributions.

 Normal probability distribution


 Student's t distribution
 Chi-square distribution
 F distribution

13
The expected value or mean of X is denoted by E(X) and its variance by σ2(X)
where σ(X) is the standard deviation of X.
An important quantity is the coefficient of variation of the positive random
variable X defined as
𝜎(𝑋)
Cx =
𝐸(𝑋)
The coefficient of variation is a (dimensionless) measure of the variability of
the random variable X.

1.4.7. Generating function


Let X be a nonnegative discrete random variable with P(X = n) = p(n), n =
0,1,2,.... Then the generating function Px(z) of X is defined as
PX(z) = E(zx) =∑∞
𝑛=0 𝑝(𝑛)z
n

Note that , | PX(z) | ≤ 1 for all |z|≤ 1.


Further,
PX(0) = p(0), PX(1) = 1, PX0(1) = E(X),
and, more general,
PX(k) (1) = E(X(X −1)···(X −k + 1)),
where the superscript (k) denotes the kth derivative. For the generating function of
the sum Z = X + Y of two independent discrete random variables X and Y , it holds
that
PZ(z) = PX(z)·PY (z).
When Z is with probability q equal to X and with probability 1−q equal to Y.
Then,
PZ(z) = qPX(z) + (1−q)PY (z).

1.5. Useful probability distributions


This section discusses a number of important distributions which have been
found useful for describing random variables in many applications.

14
1.5.1. Poisson Distribution
A Poisson distribution is the probability distribution that results from a
Poisson experiment.

Attributes of a Poisson Experiment


A Poisson experiment is a statistical experiment that has the following
properties:
 The experiment results in outcomes that can be classified as successes or
failures.
 The average number of successes (μ) that occurs in a specified region is
known.
 The probability that a success will occur is proportional to the size of the
region.
 The probability that a success will occur in an extremely small region is
virtually zero.
Note that the specified region could take many forms. For instance, it could be a
length, an area, a volume, a period of time, etc.
Notation
The following notation is helpful, when we talk about the Poisson distribution.
 e: A constant equal to approximately 2.71828. (Actually, e is the base of the
natural logarithm system.)
 μ: The mean number of successes that occur in a specified region.
 x: The actual number of successes that occur in a specified region.
 P(x; μ): The Poisson probability that exactly x successes occur in a Poisson
experiment, when the mean number of successes is μ.

Definition of Poisson Distribution


A Poisson random variable is the number of successes that result from a
Poisson experiment. Theprobability distribution of a Poisson random variable is
called a Poisson distribution.

15
Given the mean number of successes (μ) that occur in a specified region, we
can compute the Poisson probability based on the following formula:
Poisson Formula
Suppose we conduct a Poisson experiment, in which the average number of
successes within a given region is μ. Then, the Poisson probability is:
P(x; μ) = (e-μ) (μx) / x!
where x is the actual number of successes that result from the experiment, and eis
approximately equal to 2.71828.
The Poisson distribution has the following properties:
 The mean of the distribution is equal to μ .
 The variance is also equal to μ .
Example
The average number of homes sold by the Acme Realty company is 2 homes per
day. What is the probability that exactly 3 homes will be sold tomorrow?
Solution: This is a Poisson experiment in which we know the following:
 μ = 2; since 2 homes are sold per day, on average.
 x = 3; since we want to find the likelihood that 3 homes will be sold
tomorrow.
 e = 2.71828; since e is a constant equal to approximately 2.71828.
We plug these values into the Poisson formula as follows:
P(x;μ) = (e-μ) (μx) / x!
P(3;2) = (2.71828-2) (23) / 3!
P(3;2) = (0.13534) (8) / 6
P(3; 2) = 0.180
Thus, the probability of selling 3 homes tomorrow is 0.180 .
1.5.2. Exponential distribution
The exponential distribution with parameter λ is given by
λe−λt , for t ≥ 0
If T is a random variable that represents inter arrival times with the exponential
distribution, then
P(T ≤ t) = 1 − e −λt and P(T > t) = e −λt

16
This distribution lends itself well to modeling customer inter arrival times or
service times for a number of reasons. The first is the fact that the exponential
function is a strictly decreasing function of t. This means that after an arrival has
occurred, the amount of waiting time until the next arrival is more likely to be
small than large. Another important property of the exponential distribution is what
is known as the no-memory property. The no-memory property suggests that the
time until the next arrival will never depend on how much time has already passed.
This makes intuitive sense for a model where we’re measuring customer arrivals
because the customers’ actions are clearly independent of one another. It’s also
useful to note the exponential distribution’s relation to the Poisson distribution.
We find that if we set n = 0, the Poisson distribution gives us
e −λt
which is equal to P(T > t) from the exponential distribution.
The relation here also makes sense. After all, we should be able to relate the
probability that zero arrivals will occur in a given period of time with the
probability that an interarrival time will be of a certain length. The interarrival time
here, of course, is the time between customer arrivals, and thus is a period of time
with zero arrivals.
1.5.3. Erlang distribution
A random variable X has an Erlang-k (k = 1, 2, . . .) distribution with mean
k/µ if X is the sum of k independent random variables X1, . . . , Xk having a common
exponential distribution with mean 1/µ. The common notation is Ek(µ) or briefly
Ek .

The density of an Ek(µ) distribution is given by

f (t) =
(µt)k−1 e−µtµ t > 0.
(k − 1)!

The distribution function equals

𝑘−1
1 (µ𝑡)
F(t) = 1 − ∑ , 𝑡<0
𝑒µ𝑡 1!
𝑗=0

17
The parameter µ is called the scale parameter, k is the shape parameter. A phase
diagram of the Ek distribution is shown in figure 1.
In figure 2 we display the density of the Erlang-k distribution with mean 1 (so
µ = k) for various values of k.

1 2 k

µ µ µ

Figure 1: Phase diagram for the Erlang-k distribution with scale parameter µ

A convenient distribution arises when we mix an Ek−1 and Ek distribution with


the same scale parameters. The notation used is Ek−1,k.
A random variable X has an Ek−1 , k(µ) distribution, if X is with probability p
(resp. 1 −p) the sum of k − 1 (resp. k) independent exponentials with common
mean 1/µ. The density of this distribution has the form

− −
(µ𝑡)𝑘 2 − (µ𝑡)𝑘 1 −
f(t) = 𝑝𝜇 (𝑘−2)! 𝑒 µ𝑡
+ (1 − 𝑝)µ (𝑘−1)! 𝑒 µ𝑡
, 𝑡 >0

where 0 ≤ p ≤ 1. As p runs from 0 to 1, the squared coefficient of variation of the


mixed Erlang distribution varies from 1/k to 1/(k − 1).

1.6.Queuing Disciplines.
It is easy for one to think of all queues operating like a grocery checkout
line. That is to say, when an arrival occurs, it is added to the end of the queue and
service is not performed on it until all of the arrivals that came before it are served
in the order they arrived. Although this a very common method for queues to be
handled, it is far from the only way. The method in which arrivals in a queue get
processed is known as the queuing discipline. This particular example outlines a
first-come-first-serve discipline, or an FCFS discipline. Other possible disciplines
include last-come-first-served or LCFS, and service in random order, or SIRO.
While the particular discipline chosen will likely greatly affect waiting times for
particular customers (nobody wants to arrive early at an LCFS discipline), the
discipline generally doesn’t affect important outcomes of the queue itself, since
arrivals are constantly receiving service regardless

18
1.7. Elements of Queuing Systems
Consider the following figure.

Figure 1 shows the elements of a single queue queuing system.

The elements of a queueing system are as follows:-

a) Population of Customers :-

Population of Customers can be considered either limited (closed systems) or unlimited


(open systems). Unlimited population represents a theoretical model of systems with a
large number of possible customers (a bank on a busy street, a motorway petrol station).

Fig.1.6.1. Population of customers.

Example of a limited population may be a number of processes to be run (served) by a


computer or a certain number of machines to be repaired by a service man. It is
necessary to take the term "customer" very generally. Customers may be people,
machines of various nature, computer processes, telephone calls, etc.

b) Arrival pattern or the input:-

Arrival defines the way customers enter the system. Mostly the arrivals are
random with random intervals between two adjacent arrivals. Typically the arrival is

19
described by a random distribution of intervals also called Arrival Pattern. The arrival
pattern can be described in terms of probabilities and consequently the probability
distribution for inter-arrival times or the distribution of number of customers arriving in
unit time must be defined.

The figure 1.6.2 shows a queueing system with single service station.

Fig.1.6.2. Queueing system with single queue and single service station.

c) Queue Length :-

Queue represents a certain number of customers waiting for service (of course the
queue may be empty). Typically the customer being served is considered not to be in the
queue. Sometimes the customers form a queue literally (people waiting in a line for a
bank teller). Sometimes the queue is an abstraction (planes waiting for a runway to
land).

There are two important properties of a queue:

1. Maximum Size and Queuing Discipline.


2. Maximum Queue Size (also called System capacity) is the maximum number of
customers that may wait in the queue (plus the one(s) being served).
Queue is always limited, but some theoretical models assume an unlimited queue
length. If the queue length is limited, some customers are forced to renounce
without being served.

d) Queuing Discipline:-

Queuing Discipline represents the way the queue is organised (rules of inserting
and removing customers to/from the queue). There are these ways:

1) FIFO (First In First Out) also called FCFS (First Come First Serve) - orderly queue.
2) LIFO (Last In First Out) also called LCFS (Last Come First Serve) - stack.
3) SIRO (Serve In Random Order).
4) Priority Queue, which may be viewed as a number of queues for various priorities.
5) Many other more complex queuing methods that typically change the customer’s
position in the queue according to the time spent already in the queue, expected service
duration, and/or priority. These methods are typical for computer multi-access systems.

Most quantitative parameters (like average queue length, average time spent in
the system) do not depend on the queuing discipline. That’s why most models either do
20
not take the queuing discipline into account at all or assume the normal FIFO queue. In
fact the only parameter that depends on the queuing discipline is the variance (or
standard deviation) of the waiting time. There is this important rule (that may be used
for example to verify results of a simulation experiment):
The two extreme values of the waiting time variance are for the FIFO queue (minimum)
and the LIFO queue (maximum).
Theoretical models (without priorities) assume only one queue. This is not considered as
a limiting factor because practical systems with more queues (bank with several tellers
with separate queues) may be viewed as a system with one queue, because the
customers always select the shortest queue. Of course, it is assumed that the customers
leave after being served. Systems with more queues (and more servers) where the
customers may be served more times are called Queuing Networks.

e) The Service mechanism:-

It represents some activity that takes time and that the customers are waiting for.
Again take it very generally. It may be a real service carried on persons or machines, but
it may be a CPU time slice, connection created for a telephone call, being shot down for
an enemy plane, etc. Typically a service takes random time. Theoretical models are
based on random distribution of service duration also called Service Pattern. Another
important parameter is the number of servers. Systems with one server only are
called Single Channel Systems, systems with more servers are called Multi Channel
Systems.

Fig .1.6.3.Queueing system with several queues and


several services.

f) Output:-

It represents the way customers leave the system. Output is mostly ignored by
theoretical models, but sometimes the customers leaving the server enter the queue
again ("round robin" time-sharing systems).

21
Fig .1.6.4. Round Robin time sharing system.

g) Customer’s behaviour :-

The customers behave generally in four ways:


1. Balking. A customer may leave the queue because the queue is too long
and he has no time to wait, or there is no sufficient waiting space.
2. Reneging. This occurs when a waiting customer leaves the queue due to
impatience.
3. Priorities. In certain applications some customers are served before others
regardless there order of arrival. These customers have priorities over
others.
4. Jockeying. Customers may jockey from one line into another. It may be
seen that this occurs in the supermarket.

Fig .1.6.5. Jockeying of a customer in the queue.

1.8. Queueing Problem


In a specified queueing system, the problem is to determine the following;

a) Probability distribution of queue length. When the nature of probability of the


arrival and service patters is given, the probability distribution of queue length can be
obtained. Further, we can also estimate the probability that there is no queue.
22
b) Probability distribution of waiting time of customers. We can find the time spent
by a customer in the queue before the commencement of this service which is called his
waiting time. The total time spent by him in the system is the waiting time plus service
time.

c) The busy period distribution. We can estimate the probability distribution of busy
periods. If we suppose that the server is free initially and customer arrives, he will be
served immediately. During his service time, some more customers will come and will
be served in their turn. This process will continue this way until no customer is left
unserved and the server becomes free again. Whenever this happens we say a busy
period has ended.

1.9.Transient and steady states


(i) Transient condition:
When a queueing system has recently begun, the state of the system will be
greatly affected by the initial state and by the time that has since elapsed.

(ii) Steady-state condition:


After sufficient time has elapsed, the state of the system becomes essentially
independent of the initial state and the elapsed time.

Let Pn(t) denote the probability that there are n units in the system at time t.
Then the queuing system is said to be stable eventually, in the sense that the
probability Pn(t) is independent of time, that is, remains the same as time passes
(t→∞). Mathematically,

lim Pn(t) = Pn (independent of t)


𝑛→∞

𝑑
lim (Pn(t)) = 0
𝑛→∞ 𝑑𝑡

23
(iii) Explosive State:
In a situation, where arrival rate of the system is larger than its service rate, a
steady state cannot be reached regardless of the length of the elapsed time. Here queue
length will increase with time and theoretically it could build up to infinity. Such case
is called the explosive state.

Note:- In this chapter we will be dealing with only steady state.

1.10.Terminology and Notation.


The following symbols and terminology will be used henceforth in connection
with the queueing models.

 State of system = number of customers in queueing system.


 Queue length = number of customers waiting for service to begin = state of
system minus number of customers being served.
 n = number of customers in queueing system at time t.
 Pn(t) = transient state probability of exactly n customers in queueing system at
time t.
 En = the state in which there are n calling units in the system.
 s = number of servers (parallel service channels) in queueing system.
 n = mean arrival rate (expected number of arrival per unit time) of new
o customers when n customers are in system.

o 1/  is the expected interarrival time and n is a constant.

 n = mean service rate for overall system (expected number of customers


o completing service per unit time) when n customers are in system.

o  n represents combined rate at which all busy servers achieve service


completion

24
 1/  is the expected service time.
 When the mean service rate per busy server is a constant for all n  1, this
constant is denoted by 
    /(s ) is the utilization factor for the service facility, i.e., the expected
o fraction of time the individual servers are busy.
 More notations are defined in a steady-state condition.
 Pn = steady state probability of exact n customers in queueing system.
 Ls = expected number of customers in queueing system =∑∞
𝑛=0 𝑛 Pn.

 Lq = expected queue length (excludes customers being served) =  (n  s)Pn .


 ns

 W = waiting time in system (includes service time) for each customer.


 W = E(W ).
 Wq = waiting time in queue (exclude service time) for each customer.
 Wq = E(Wq ).
 Lq = expected queue length (excludes customers being served)
=  (n  s)Pn .

 W = waiting time in system (includes service time) for each customer.


 W = E(W ).
 Wq = waiting time in queue (exclude service time) for each customer.
 Wq = E(Wq ).
 (W|W>0) = expected waiting time of a customer who has to wait.
 (L|L>0) = expected length of non empty queues.
 P(W>0) = probability of a customer having to wait for service.

25
1.11.Traffic Intensity.
Traffic intensity is a measure of the average occupancy of a server or
resource during a specified period of time, normally a busy hour. It is measured
in traffic units (Erlangs) and defined as the ratio of the time during which a facility
is cumulatively occupied to the time this facility is available for occupancy.

The “traffic intensity,” identified by ρ or “rho,” is calculated as

λ
ρ= μ

For a single-server system like this rho is the average utilization of that server.

1.12. KENDALL’S Notation for representing queueing


models.
Before starting the investigations of elementary queueing systems let us
introduce a notation originated by Kendall to describe a queueing system. The
Kendall classification of queuing systems (1953) exists in several modifications.
The most comprehensive classification uses 6 symbols.

Let us denote a system by

A / B / m / K / n/ D,
Where,
A: distribution function of the interarrival times,
B: distribution function of the service times, m: number of servers,
K: capacity of the system, the maximum number of customers in the system
including the one being serviced,
n: population size, number of sources of customers,
D: service discipline.

Exponentially distributed random variables are notated by M, meaning Markovain


or memory less. Furthermore, if the population size and the capacity are infinite, the
service discipline is FIFO, and then they are omitted.

26
Hence M/M/1 denotes a system with Poisson arrivals, exponentially distributed
service times and a single server. M/G/m denotes an m-server system with Poisson
arrivals and generally distributed service times. M/M/r/K/n stands for a system
where the customers arrive from a finite-source with n elements where they stay for
an exponentially distributed time, the service times are exponentially distributed, the
service is carried out according to the request’s arrival by r severs, and the system
capacity is K.

1.13.Queueing models.
Poisson arrivals and exponential service make queueing models Markovian
that are easy to analyze and get usable results. Historically, these are also the models
used in the early stages of queueing theory to help decision-making in the telephone
industry. The underlying Markov process representing the number of customers in
such systems is known as a birth and death process, which is widely used in
population models. The birth-death terminology is used to rep- resent increase and
decrease in the population size. The corresponding events in queueing systems are
arrivals and departures. In this chapter we present some of the important models
belonging to this class.

1.13.1.The M/M/1 Queuing System

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 M/M/1 system is made of a Poisson arrival, one exponential (Poisson)
server, FIFO (or not specified) queue of unlimited capacity and unlimited
customer population. Note that these assumptions are very strong, not satisfied for
practical systems (the worst assumption is the exponential distribution of service
duration - hardly satisfied by real servers). Nevertheless the M/M/1 model shows
clearly the basic ideas and methods of Queuing Theory.
Poisson Process
The Poisson process satisfies the following assumptions, where P[x] means
"the probability of x":
1) P[one arrival in the time interval (t, t+h), for h → 0] = lh, where l is a constant.

27
2) P[more than one arrivals in the interval (t, t+h), for h →0] → 0.
3) The above probabilities do not depend on t ("no memory" property = time
independence = stationarity).
Let pn(t) = P[n arrivals in the time interval (0, t)].
Using the above assumptions 1) and 2), it is possible to express the
probability pn(t+h), h ® 0:
pn(t+h) =pn(t)[1 - lh]+ pn-1(t)l h

( n arrivals by t, no more arrival or n-1 arrivals by t, one


more arrival)
p0(t+h) =p0(t)[1 - lh]

( no arrival by t, no more arrival) …(1)


The equations (1) may be written in this way:

, …(2)
Because of small h the terms at the left sides of (2) may be considered as
derivatives:

, …(3)
Equations (3) represent a set of differential equations. To solve them let’s start
by p0(t):

(to prove it, compute the derivative of p0(t) and compare with (3) )
Using p0(t) it is possible to compute p1(t):

(prove by computing the derivative and inserting to (3) with p0(t)


Or generally (can be proved by mathematical induction):

…(4)
Because of the assumption 3) the formula (4) holds for any interval (s, s+t),
28
in other words the probability of n arrivals during some time interval depends only
on the length of this time interval (not on the starting time of the interval).
Number of arrivals Nt during some time interval t is a discrete random variable
associated with the Poisson process. Having the probabilities of the random values
- (4), it is possible to find the usual parameters of the random variable Nt.
Let E[x] be the mean (average) value, Var[x] the variance, and Std[x] the standard
deviation of the random variable x:

…(5)
(5) gives the interpretation of the constant l , that is the average number of arrivals
per time unit. That’s why the l is called Arrival rate.

…(6)

…(7)
Another random variable associated with the Poisson process is the random
interval between two adjacent arrivals. Let x be the random interval. To find its
distribution, let’s express the Distribution function F(x):
F(x) = P[interval < x] = P[at least one arrival during the interval x]
= 1 - p0(x)
= 1 - e-l x
Because the interval is a continuous random variable, it is possible to compute
the Probability density as a derivative of the Distribution function:
f(x) = dF(x)/dx
= l e-l x
These two functions define the probability distribution:
F(x) = 1 - e-l x , f(x) = l e-l x …(8)

The distribution (8) is called Exponential or Negative Exponential Distribution. Its


parameters are:

29
…(9)
(9) gives another interpretation of the constant l . Its inverted value is the average
interval between arrivals. Like the number of arrivals, the distribution of intervals
between arrivals does not depend on time. Note the big value of the standard
deviation (equal to the average value). It means, that the exponential distribution is
"very random". In fact all intervals from 0 to ¥ are theoretically possible. So it may
happen, that there will be clusters of very close arrivals separated by very long
intervals. Of course not all practical distributions can be treated as exponential
ones. There is this general rule:
If a large number of independent event streams are merged together, and if events
in each stream occur at a very low rate, then the resulting stream is approximately
a Poisson process with exponential intervals.
This rule is more or less satisfied for arrivals in systems with large populations
(each potential customer represents one low rate stream).
When applied to a service, the rate is called Service rate (m ). The
parameter m is the average number of completed services per time unit (provided
there are always customers waiting in the queue), its inverted value 1/m is the
average duration of the exponential service. The variance and the standard
deviation can be computed by replacing l by m in the formulae (9). Unlike arrival,
exponential service is an abstraction that is hardly satisfied by real systems,
because mostly it is very unlikely to have very short and/or very long services.
Real service duration will be typically "less random" than the theoretical
exponential distribution.
Another very important parameter of queuing systems is the ratio r of the
arrival and the service rates called Traffic rate (sometimes called Traffic intensity
or Utilisation factor):

…(10)
30
The value of r shows how "busy" is the server. It is obvious, that for r > 1
the queue will grow permanently. Later we shall see that in fact r must not be even
equal to one.

The system M/M/1


The M/M/1 system is made of a Poisson arrival (Arrival rate l ), one
exponential server (Service rate m ), unlimited FIFO (or not specified queue), and
unlimited customer population. Because both arrival and service are Poisson
processes, it is possible to find probabilities of various states of the system, that are
necessary to compute the required quantitative parameters. System state is the
number of customers in the system. It may be any nonnegative integer number.
Let pn(t) = P[n customers in the system at time t]. Like with the Poisson
process, by using the assumptions 1) and 2), it is possible to express the
probability pn(t+h), h → 0 in this way:
pn(t+h) = pn(t)[1 - lh][1 - mh] + (n customers at t, no came, no left)
pn(t)[lh][mh] + (n customers at t, one came, one left)
pn-1(t)[lh][1 - mh] + (n-1 customers at t, one came, no left)
pn+1(t)[1 - lh][mh] (n+1 customers at t, no came, one left )

p0(t+h) = p0(t)[1 - lh] + (no customer at t, no came)


p1(t)[1 - lh][mh] (one customer at t, no came, one left) …(11)
The above equations may be written in the following way, where the terms
with h2 are omitted because they are relatively very small ( h ® 0):

…(12)
Because of small h the terms at the left sides of (12) may be considered as
derivatives:

31
… (13)
Equations (13) represent a set of differential equations called Kolmogorov
Differential Equations. Their solution is a set of equations showing how each
probability changes with time. Fortunately we actually do not need these
functions. Because of the third assumption (stationarity) after some transition
period the system will become stable. Of course the state will permanently change,
but the probabilities of various numbers of customers in the system will be
constant. So the functions pn(t) become constants pn. Constant functions have zero
derivatives, so the set (13) becomes a set of algebraic equations for the stable state:

, …(14)
By dividing the equations (14) by m we get this set of equations that contain the
only parameter r - the traffic rate:

, …(15)
In the set (15) p1 is expressed by p0. By inserting p1 and p0 to the equation for p2,
we get:
p2 = (1+r )p1 - r p0
= (1+r )r p0 - r p0
= r 2p0
Similarly p2 and p1 may by used to express p3, etc. which gives the general formula
for pn:
pn = r np0 = (l /m )np0 …(16)
The value p0 can be computed by using the obvious requirement, that the sum of
all probabilities must be equal to 1:

giving: …(17)
In (17) the sum of geometric progression has been used. From (17) it is also
obvious that the traffic rate r must be less than 1, otherwise the sum of
32
probabilities would not be 1 (not even limited). Inserting (17) to (16) gives the
general formula for pn:

…(18)
The equations (18) represent a very important result used later to obtain all the
characteristics of the M/M/1 system. The relatively simple derivation of (18) was
enabled by the Poisson process assumptions used when expressing the
probabilities in (11). The equations (18) may be used directly to express these
probabilities:
P[service idle] = P[not queuing on arrival]
= p0
=1-r
= 1 - l /m

P[service busy] = P[queuing on arrival]


= 1 - p0
=r
= l /m

P[n customers in the system] = pn


= r n(1 - r )

P[n or more customers in the system] = r n

P[less than n customers in the system] = 1 - r n

The derivation of P[n or more customers in the system]:

33
Now the formula (18) will be used to derive quantitative characteristics of the
M/M/1 system. (18) actually represents a distribution of a discrete random
variable Number of customers in the system(probabilities of all possible random
values). So it is possible to compute the mean value, that is the average number of
customers in the system:

…(19)
In (19) the formula for geometric progression has been used. Note again,
that r must be less than 1, otherwise the number of customers in the system will
grow permanently. In a similar way it is possible to find the average number of
customers in the queue. We assume, that the customer being served is not a part of
the queue. So n customers in the system means the queue length is n-1.

…(20)
In (20) we have used the fact, that the second sum is a complement to p0 and (17).
Note, that (20) may be also used to compute LQ provided LS is known or vice
versa. It is also possible to find an average queue length LQQ provided there is a
queue. For this we need the conditional probability pn/q = P[queue length is
n / there is a queue]. To find the conditional probability, let’s use the general
formula:

that looks in our case like that (for n ³ 2):

Using the above formula for pn/q , we may find LQQ:

34
…(21)
The average queue length is a parameter that represents the quality of
service especially from user’s point of view. Another parameters we need is the
average time WS spent in the system and the average timeWQ spent in the queue.
These parameters are necessary to compute costs caused by customers waiting for
service. There is a very important the so called Little’s formula, that gives the
relation between the average number of customers in the system LS and the average
time WS spent in the system and between the average number of customers in the
queue LQ and the average time WQ spent in the queue:
LS = l WS LQ = l WQ ...(22,23)
This is the justification (not the exact proof) of the formula (22): let’s
assume the average time spent in the system is WS. During this time the average
number of newcomers is WSl, because l is the arrival rate (average number of
arrivals per time unit). So at the instant a customer is leaving the systems, it sees
(on the average) WSl customers left in the system. Because in the stable state the
average number of customers in the system is LS, we have the above formula.
Similar justification can be given for LQ and WQ (average number of arrivals
during the time spent in the queue is lWQ, that is the average number left in the
queue when leaving the queue, that is LQ). Using the Little’s formula we get these
formulae:

… (24)

…(25)
There is another obvious relationship between the average time spent in the
system and the average time spent in the queue, because the total time spent is
made of the time in the queue (that may be zero) and the time of the service:
35
…(26)
(26) can also be obtained from (24). Using the Little’s formula, it is possible to
express a similar relation between LS and LQ by multiplying both sides of (26)
by l :

…(27)
LSERV = r is the average number of customers being served (that of course must be
less than one). For a customer it is also important to know the probability, that the
time spent in the system (or in the queue) will be greater than a certain value.
Together with the queue length this probability represents a quality of service from
user’s point of view. Without proof (that is less trivial) these formulae may be
used:

…(28)
Of course the probabilities of spending less than t in the system (or in the queue)
are complements of the above values to 1. Because the time spent is a continuous
random variable, the probability of spending exactly the time t in system (queue) is
zero, but using the formulae (28), we can compute the probability, that the time
spent will be in certain range (t1, t2):
P[spending more than t1 and less than t2] = P[more than t1] - P[more than t2]
Variances
And finally the variances (squares of standard deviations) of the four
characteristics:

…(29)

36
A mathematical example of M/M/1 Queue
We are in a train station and we see, that a arriving train join a single queue
for the runway. We have an exponentially distributed service time with a rate μ=
30 arrivals / hour ( as we computed that in 5 minutes 1 train arrived the station)
and we have poisson arrivals with a rate λ= 25 arrivals / hour.
Now we want to calculate W, L, Wq and Lq.

W =1/μ–λ
= 1/ ( 30-25)
= 0,20 hours
≈ 12 min
L = λW
= λ / (μ - λ)
= 25/ (30-25)
= 5 trains

Wq = W- (1/μ)
= 1/ (μ - λ) - 1/μ
= 1/ ( 30-25) - (1/30)
= 0.167 hours
≈ 10 min

Lq = λW
= λ2 / μ ( μ - λ )
= 25 ^ 2 / 30 ( 30-25)
≈4,167 trains

37
1.13.2.M/M/c queue

In queueing theory, a discipline within the mathematical theory of


probability, the M/M/c queue (or Erlang–C model:495) is a multi-server queueing
model. In Kendall's notation it describes a system where arrivals form a single
queue and are governed by a Poisson process, there are c servers and job service
times are exponentially distributed. It is a generalization of the M/M/1 queue which
considers only a single server. The model with infinitely many servers is
the M/M/∞ queue.

Model definition
An M/M/c queue is a stochastic process whose state space is the set {0, 1, 2, 3,
...} where the value corresponds to the number of customers in the system,
including any currently in service.

 Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i+1.
 Service times have an exponential distribution with parameter μ in the M/M/c
queue.
 There are c servers, which serve from the front of the queue. If there are less
than c jobs, some of the servers will be idle. If there are more than c jobs, the
jobs queue in a buffer.
 The buffer is of infinite size, so there is no limit on the number of customers it
can contain.
The model can be described as a continuous time Markov chain with transition rate
matrix

on the state space {0, 1, 2, 3, ...}. The model is a type of birth–death process. We
write ρ = λ/(c μ) for the server utilization and require ρ < 1 for the queue to be
stable. Ρ represents the average proportion of time which each of the servers
38
is occupied (assuming jobs finding more than one vacant server choose their
servers randomly).
The state space diagram for this chain is as below.

Stationary analysis
Number of customers in the system
If the traffic intensity is greater than one then the queue will grow without bound

but if server utilization then the system has a stationary


distribution with probability mass function

where πk is the probability that the system contains k customers.

The probability that an arriving customer is forced to join the queue (all servers
are occupied) is given by

which is referred to as Erlang's C formula and is often denoted C(c, λ/μ) or


E2,c(λ/μ). The average number of customers in the system (in service and in the
queue) is given by

39
1.13.3. M/M/∞ queue

In queueing theory, a discipline within the mathematical theory of


probability, the M/M/∞ queue is a multi-server queueing model where every
arrival experiences immediate service and does not wait. In Kendall's
notation it describes a system where arrivals are governed by a Poisson
process, there are infinitely many servers, so jobs do not need to wait for a
server. Each job has an exponentially distributed service time. It is a limit of
the M/M/c queue model where the number of servers c becomes very large.
The model can be used to model bound lazy deletion performance.
Model definition
An M/M/∞ queue is a stochastic process whose state space is the set
{0,1,2,3,...} where the value corresponds to the number of customers currently
being served.
 Arrivals occur at rate λ according to a Poisson process and move the
process from state i to i + 1.
 Service times have an exponential distribution with parameter μ and
there are always sufficient servers such that every arriving job is served
immediately. Transitions from state i to i − 1 are at rate iμ
The model has transition rate matrix

The state space diagram for this chain is as below.

Transient solution
The transient distribution can be written using moment generating
functions and formulas for transient means and variances computed by solving
differential equations.Assuming the system starts in state 0 at time 0, then the

40
probability the system is in state j at time t can be written as

from which the mean queue length at time t can be computed (writing N(t) for
the number of customers in the system at time t given the system is empty at
time zero)

Response time
The response time for each arriving job is a single exponential distribution
with parameter μ. The average response time is therefore 1/μ.
Maximum queue length
Given the system is in equilibrium at time 0, we can compute the cumulative
distribution function of the process maximum over a finite time horizon T in
terms of Charlier polynomials.
Congestion period
The congestion period is the length of time the process spends above a fixed
level c, starting timing from the instant the process transitions to state c + 1.
This period has mean value

and the Laplace transform can be expressed in terms of Kummer's function.


Stationary analysis
The stationary probability mass function is a Poisson distribution

so the mean number of jobs in the system is λ/μ.


The stationary distribution of the M/G/∞ queue is the same as that of the
M/M/∞ queue.
Heavy traffic

41
Writing Nt for the number of customers in the system at time t as ρ → ∞
the scaled process

converges to an Ornstein–Uhlenbeck process with normal distribution and


correlation parameter 1, defined by the Itō calculus as

where W is a standard Brownian motion.

1.13.4. M/D/1 queue

In queueing theory, a discipline within the mathematical theory of


probability, an M/D/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 are fixed (deterministic). The model name is written in Kendall's
notation. Agner Krarup Erlang first published on this model in 1909, starting
the subject of queueing theory. An extension of this model with more than one
server is the M/D/c queue.

Model definition
An M/D/1 queue is a stochastic process whose state space is the set {0,1,2,3,...}
where the value corresponds to the number of customers in the system,
including any currently in service.

 Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i + 1.
 Service times are deterministic time D (serving at rate μ = 1/D).
 A single server serves customers one at a time from the front of the queue,
according to a first-come, first-served discipline. When the service is
complete the customer leaves the queue and the number of customers in the
system reduces by one.
 The buffer is of infinite size, so there is no limit on the number of customers
it can contain.

42
Stationary distribution

The number of jobs in the queue can be written as an M/G/1 type Markov
chain and the stationary distribution found for state i (written πi) in the
case D = 1 to be

Delay
Define ρ = λ/μ as the utilization; then the mean delay in the system in an M/D/1
queue is

and in the queue:

Busy period
The busy period is the time period measured from the instant a first customer
arrives at an empty queue to the time when the queue is again empty. This time
period is equal to D times the number of customers served. If ρ < 1, then the
number of customers served during a busy period of the queue has a Borel
distribution with parameter ρ.

Stationary distribution
A stationary distribution for the number of customers in the queue and mean
queue length can be computed using probability generating functions.
Transient solution
The transient solution of an M/D/1 queue of finite capacity N, often written
M/D/1/N, was published by Garcia et al in 2002

43
1.13.5.M/D/c queue
In queueing theory, a discipline within the mathematical theory of
probability, an M/D/c queue represents the queue length in a system
having c servers, where arrivals are determined by a Poisson process and job
service times are fixed (deterministic). The model name is written in Kendall's
notation. Agner Krarup Erlang first published on this model in 1909, starting
the subject of theory. The model is an extension of the M/D/1 queue which has
only a single server.

Model definition
An M/D/c queue is a stochastic process whose state space is the set
{0,1,2,3,...} where the value corresponds to the number of customers in the
system, including any currently in service.

 Arrivals occur at rate λ according to a Poisson process and move the process
from state i to i + 1.
 Service times are deterministic time D (serving at rate μ = 1/D).
 c servers serve customers from the front of the queue, according to a first-
come, first-served discipline. When the service is complete the customer
leaves the queue and the number of customers in the system reduces by one.
 The buffer is of infinite size, so there is no limit on the number of customers
it can contain.

Waiting time distribution


Erlang showed that when ρ = (λ D)/c < 1, the waiting time distribution
has distribution F(y) given by

Crommelin showed that, writing Pn for the stationary probability of a system


with n or fewer customers,

44
1.13.6. M/G/1 queue

In queueing theory, a discipline within the mathematical theory of


probability, an M/G/1 queue is a queue model where arrivals are Markovian
(modulated by a Poisson process), service times have a General distribution and
there is a single server.The model name is written in Kendall's notation, and is
an extension of the M/M/1 queue, where service times must be exponentially
distributed. The classic of the M/G/1 queue is to model performance of a fixed
head hard disk.

Model definition
A queue represented by a M/G/1 queue is a stochastic process
whose state space is the set {0,1,2,3...}, where the value corresponds to the
number of customers in the queue, including any being served. Transitions from
state i to i + 1 represent the arrival of a new customer: the times between such
arrivals have an exponential distribution with parameter λ. Transitions from
state i to i − 1 represent a customer who has been served, finishing being served
and departing: the length of time required for serving an individual customer
has a general distribution function. The lengths of times between arrivals and of
service periods are random variables which are assumed to be statistically
independent.
Scheduling policies
Customers are typically served on a first-come, first-served basis, other
popular scheduling policies include

 processor sharing where all jobs in the queue share the service capacity
between them equally
 last-come, first served without preemption where a job in service cannot be
interrupted
 last-come, first served with preemption where a job in service is interrupted
by later arrivals, but work is conserved.
 generalized foreground-background (FB) scheduling also known as least-
attained-service where the jobs which have received least processing time so
far are served first and jobs which have received equal service time share
service capacity using processor sharing.
 shortest job first without preemption (SJF) where the job with the smallest
size receives service and cannot be interrupted until service completes

45
 preemptive shortest job first where at any moment in time the job with the
smallest original size is served.
 shortest remaining processing time (SRPT) where the next job to serve is
that with the smallest remaining processing requirement.
Service policies are often evaluated by comparing the mean sojourn time in the
queue. If service times that jobs require are known on arrival then the optimal
scheduling policy is SRPT.
Policies can also be evaluated using a measure of fairness.

Queue length
Pollaczek–Khinchine method
The probability generating function of the stationary queue length
distribution is given by the Pollaczek–Khinchine transform equation

where g(s) is the Laplace transform of the service time probability density
function.[8] In the case of an M/M/1 queue where service times are
exponentially distributed with parameter μ, g(s) = μ/(μ + s).
This can be solved for individual state probabilities either using by direct
computation or using the method of supplementary variables. The Pollaczek–
Khinchine formula gives the mean queue length and mean waiting time in the
system.
Matrix analytic method
Consider the embedded Markov chain of the M/G/1 queue, where the
time points selected are immediately after the moment of departure. The
customer being served (if there is one) has received zero seconds of service.
Between departures, there can be 0, 1, 2, 3,… arrivals. So from state i the chain
can move to state i –1, i, i + 1, i + 2, ….
The embedded Markov chain has transition matrix,

where

46
and F(u) is the service time distribution and λ the Poisson arrival rate of jobs to
the queue.
Markov chains with generator matrices or block matrices of this form are called
M/G/1 type Markov chains, a term coined by M. F. Neuts. The stationary
distribution of an M/G/1 type Markov model can be computed using the matrix
analytic method.

Busy period
The busy period is the time spent in states 1, 2, 3,… between visits to the
state 0. The expected length of a busy period is 1/(μ−λ) where 1/μ is
the expected length of service time and λ the rate of the Poisson process
governing arrivals. The busy period probability density function can be
shown to obey the Kendall functional equation.

where as above g is the Laplace–Stieltjes transform of the service time


distribution function. This relationship can only be solved exactly in special
cases (such as the M/M/1 queue), but for any s the value of ϕ(s) can be
calculated and by iteration with upper and lower bounds the distribution
function numerically computed.

Waiting/response time
Writing W*(s) for the Laplace–Stieltjes transform transform of the
waiting time distribution, is given by the Pollaczek–Khinchine transform as

where g(s) is the Laplace–Stieltjes transform of service time probability density


function.

Theorem for arrivals governed by a Poisson process


For Poisson processes the property is often referred to as the PASTA
property (Poisson Arrivals See Time Averages) and states that the probability
of the state as seen by an outside random observer is the same as the probability
of the state seen by an arriving customer.The property also holds for the case of
a doubly stochastic Poisson processwhere the rate parameter is allowed to vary
depending on the state.
As the arrivals are determined by a Poisson process, the arrival theorem holds.

47
1.13.7. M/G/k queue
In queueing theory, a discipline within the mathematical theory of
probability, an M/G/k queue is a queue model where arrivals are Markovian
(modulated by a Poisson process), service times have a General distribution and
there are k servers. The model name is written in Kendall's notation, and is an
extension of the M/M/c queue, where service times must be exponentially
distributed and of the M/G/1 queue with a single server. Most performance
metrics for this queueing system are not known and remain an open problem.

Model definition
A queue represented by a M/G/k queue is a stochastic process whose state
space is the set {0,1,2,3...}, where the value corresponds to the number of
customers in the queue, including any being served. Transitions from
state i to i + 1 represent the arrival of a new customer: the times between such
arrivals have an exponential distribution with parameter λ. Transitions from
state i to i − 1 represent the departure of a customer who has just finished being
served: the length of time required for serving an individual customer has a
general distribution function. The lengths of times between arrivals and of
service periods are random variables which are assumed to be statistically
independent.

Steady state distribution


Tijms et al. believe it is "not likely that computationally tractable
methods can be developed to compute the exact numerical values of the steady-
state probability in the M/G/kqueue. Various approximations for the average
queue size, stationary distribution and approximation by a reflected Brownian
motion have been offered by different authors. Recently a new approximate
approach based on Laplace transform for steady state probabilities has been
proposed by Hamzeh Khazaei et al.. This new approach is yet accurate enough
in cases of large number of servers and when the distribution of service time
has a Coefficient of variation more than one.

Average delay/waiting time


There are numerous approximations for the average delay a job
experiences. The first such was given in 1959 using a factor to adjust the mean
waiting time in an M/M/c queue. This result is sometimes known as Kingman's
law of congestion.

48
where C2 is the coefficient of variation of the service time distribution. Ward
Whitt described this approximation as “usually an excellent approximation,
even given extra information about the service-time distribution."
However, it is known that no approximation using only the first two moments
can be accurate in all cases.
A Markov–Krein characterisation has been shown to produce tight bounds on
the mean waiting time.

Inter-departure times
It is conjectured that the times between departures, given a departure
leaves n customers in a queue, has a mean which as n tends to infinity is
different from the intuitive 1/μresult.

Two servers
For an M/G/2 queue (the model with two servers) the problem of determining
marginal probabilities can be reduced to solving a pair of integral equations or
the Laplace transform of the distribution when the service time distribution is a
mixture of exponential distributions. The Laplace transform of queue
length and waiting time distributions can be computed when the waiting time
distribution has a rational Laplace transform.
Average number

1.14.Problems
1. A system is being designed. The inter-arrival times of customers are expected
to be exponentially distributed with mean 1/λ = 50 msec.

(a) One single-server queue with infinite buffer space. The service times are
exponentially distributed with mean 1/µ = 20 msec.

(b) Two single-server queues, each with infinite buffer space. Customers are
randomly dispatched to each queue with an equal probability. The service
times are exponentially distributed with mean 1/µ = 40 msec at each
server.

49
Find the response time in each option using queueing analysis

Solution:
(a) This option is an M/M/1 queue with λ = 0.02 customers per msec and µ
= 0.05 customers per msec. Using the M/M/1 mean response time
formula, we have

𝟏 𝟏
T= = = 33.3 msec
µ−𝐗 𝟎.𝟎𝟓−𝟎.𝟎𝟐

(b) In this option, the arrival rate at each queue is half of the system arrival
rate. Ef- fectively, we have two M/M/1 queues, each with λ = 0.01
customers per msec and
µ= 0.025 customers per msec. Using the M/M/1 mean response time
formula, we have,

𝟏 𝟏
T= = = 66.7 msec
µ−𝛌 𝟎.𝟎𝟐𝟓−𝟎.𝟎𝟎𝟏

2. Consider an example from a maintenance shop. The inter-arrival times at


toolcrib are exponential with an average time of 10 minutes. The length of the
service time (amount of time taken by the toolcrib operator to meet the needs of
the maintenance man) is assumed to b e exponentially distributed, with mean 6
minutes. Find:
(i) The probability that a person arriving at the booth will have to wait.
(ii) Average length for the queue that forms and the average time that an
operator spends in the Q-system.
(iii) The manager of he shop will install a second booth when an arrival
would have to wait 10 minutes or more for the service. By how much
must the rate of arrival be increased in order to justify a second booth.
(iv) The probability that an arrival will have to wait for more than 12
minutes for service and to obtain his tools.
(v) Estimate the fraction of the day that toolcrib operator will be idle.
(vi) The probability that there will b e six or more operators waiting for
the service.

Solution. Here λ = 60/10 = 6 per hour, μ = 60/6 = 10 per hour

i. A per son will have to wait if the service facility is not idle.
Probability that the service facility is idle= Probability of no customer

50
in the system (Po)
∴ Probability of waiting = 1 – Po = 1-(1- p)= p= λ/ μ=6/10=0.6

ii. Lq = p²/(1- p) = (o.6) ²/(1 – 0.6) = 0.9


Ls = Lq + C/ μ = 0.9 + 0.6 =1.5.
∴ Ws = Ls/ λ = 1.5/6 = ¼ hours

iii. Wq = Lq/ μ = 0.9/6 hrs. = 0 minutes

Let λ be the arrival rate when a second booth is justified, i.e. , Wq ≥10
minutes.
𝜆 1⁄
48
Wq = =1
𝜇(𝜇−𝜆) ⁄36 (1⁄ − 1⁄ )
36. 48

= 108 minutes or 1 hr 48 min


∴ 6 λ = 10(10- λ) or 16 λ = 100 or λ = 6.25
Hence if the arrival rate exceeds 6.25 per hour, the second booth will
be justified.

iv. Probability of waiting for 12 minutes or more is given by



P(W≥12) = ∫12 𝜌(µ − 𝜆) e-(µ-λ)w dw = - ρ [e-(µ-λ)w ]∞12/∞

= ρ e-(µ-λ) 12/60 = 0.6 e-4/5 = 0.27

v. P0 =1- ρ = 0.4, 40% of the time of tool crib operator is idle.

vi. Probability of six or more operators waiting for the service = ρ6

= (0.6)6
3.Customers arrive at sales counter manned by a single person accoding to a
Poisson process with a mean rate of 20 per hour. The time required to serve a
customer has an exponential distribution with a mean of 100 seconds. Find the
average waiting time of a customer.

Solution: Here we are given:

λ= 20 per hour, µ = 36 per hour

The average waiting time of a customer in the queue is given by:


𝜆 20 5
Wq = = = Wq =
𝜇(𝜇−𝜆) 36(36−20) 36 𝑋 4

51
The average waiting time of a customer in the system is given by:
1 1 1
Wq = = = hr or 225 seconds.
(𝜇−𝜆) (36−20) 16

4. A refinery distributes its products by trucks, loaded at the loading dock. Both
company trucks and independent distributor’s trucks are loaded. The
independent firms complained that sometimes they must wait in line and thus
lose money paying for a truck and driver. That is only waiting. They have asked
refinery either to put in a second loading dock or to discount prices equivalent
to the waiting time. Extra loading cock cost Rs. 100/- per day whereas the
waiting time for the independent firms cost Rs. 25/- per hour. The following
data have been accumulated. Average arrival rate of all trucks is 2 per hour and
average service rate is 3 per hour. Thirty percent of all trucks are independent.
Assuming that these rates are random according to the Poisson distributions,
determine:

(a) The probability that a truck has to wait

(b) The waiting time of a truck that waits , and

(c) The expected cost of waiting time of independent trucks per day

It is advantageous to decide in favour of a second loading dock to word off the


complaints?

Solution: Here, λ = 2 per hour and μ = 3 per hour


a) The probability that a truck has to wait for service is the utilization factor.

𝜆 2
ρ= = = 0.66
𝜇 3
b) The waiting time of a truck that waits is
(W|W>0) = Ws/ P(W>0)
𝜆
= /(λ/µ)
𝜇(𝜆−𝜇)
1 1
= = = 1 hr
(−𝜆+𝜇) (3−2)

(c ) The total expected waiting time of independent trucks per day is given by:
Expected waiting time
= Trucks per day × % Independent truck × Expected waiting time per truck.

52
2
= (2×8)(0.3Wq) =4.8 × = 3.2 hour per day
3(3−2)

∴ Expected Cost = Rs. (3.2 X 25) = Rs.80/-

5. Consider a telephone booth for which the average arrival rate is 15/hr, and on
average calls last 3 minutes during the daytime. Compare properties of queues
which form for the phone, with similar properties in the situations where one or
two additional booths are installed.

Solution: Assuming that the current system is M/M/1, we have


ρ = 15/20 = 0.75
L = ρ/(1 − ρ) = 0.75/0.25 = 3
W
s = Ls/λ = 3/15 hrs = 12
Ws = minutes
Ws − 1/µ = 12 − 3 = 9
Lq = λWq = 15 × 9/60 = 2.25
minutes
Now consider the addition of one extra booth, and assume that we have an M/M/2
queue.

P0 = [1 + ρ + ρ2 /(2 − ρ)]−1 = 0.455


Lq = P0 ρc+1 / (c − 1)!(c − ρ)2
Wq = Lq/λ = 0.491
W = minutes
Wq + 3 = 3.491
sLs = λW s = 0.873
minutes
It is clear that the addition of one extra booth has decreased considerably both
expected queue length and expected waiting time. A third booth will probably
make little further difference, but we give the calculations for illustration.

P0 = [1 + ρ + ρ2 /2 + ρ3 /2(3 − ρ)]−1 = 0.471

P0ρc+1
Lq = = 1/68 = 0.015
(c − 1)!(c − ρ)

Wq = Lq/λ = (1/68) ×(1/15) = 0.059 minutes


Ws = Wq + 3 = 3.059 minutes
Ls = λWs = 0.765

53
An additional property to investigate would be the probability of having to wait in
the queue for more than a given time, say 5 minutes (or 1/12 hours). With one
booth, this is

(1-P0) ∫1/12 𝑓(𝑡)𝑑𝑡

Where
f(t) = (µ −λ)e−(µ−λ)t = 5e−5t,

so

P(W ait > 5 minutes) = 0.75 [−e−5t 1/12
]

= 0.75e−5/12

= 0.494.

For two booths, the probability becomes



(1-P0-P1) ∫1/12 𝑓(𝑡)𝑑𝑡
where
f(t) = (2µ − λ)e−(2µ−λ)t = 25e−25t,

so
P(W ait > 5 minutes) = 9/44 [e-25t]1/12∞

= 0.025.

The probability of a non-trivial waiting time would therefore be considerably reduced by the
introduction of just one extra booth.
6. A car servicing station has 3 stalls where service can be offered simultaneously.
The cars wait in such a way that when a stall becomes vacant, the car at the head
o the line pulls up to it. The station can accommodate at most four cars waiting
(seven in the station) at one time. The arrival pattern is Poisson with a mean of
one car per minute during the peak hours. The service time is exponential with
mean 6 minutes. Find the average number of crs per hour that cannot enter the
station because of full capacity.
Solution: Here λ = 1 car per minute, µ = 1/6 car per minute, C = 3, N = 7,
ρ=λ/µ=6 and
3−1
1 1 1
P0 = ∑ 6𝑛 + ∑7𝑛=3 6𝑛 =
𝑛=0 n! 3!3𝑛−1 1141

54
(i) Expected number of cars in the queue is
𝐶
𝜌(Cρ)
E(m) = 2 Po (1-ρN – C + 1 – (1-ρ)(N – C + 1) ρN-C)
𝐶!(1−ρ)
6(3x6)3 1
= x ( 1- (6)5 – (-5)(5)(6)4 )
3!(−5)2 1141

= 3.09 cars
(ii) Expected number of cars in the service station
(3−𝑛)
E(n) = 3.09 + 3 – Po ∑2𝑛=0 (6)n = 6.06 cars.
𝑛!
(iii) Expected waiting time of cars in the service station
0.06 0.06
E(v) = = 279936 1 = 12.3 minutes
1(1−𝑃) 1(1− × )
3!(81) 1141

(iv) Expected number of cars per hour that cannot enter the station is
279936 1
60λPN = 60 × 1 × P7 = 60 × × = 30.3 cars per hour.
3!(81) 1141

7. A telephone exchange has two long distance operators. The telephone company
finds that during the peak loak, long distance calls arrive in a Poisson fashion at
an average rate of 15 per hour. The length of service on these calls is
approximately distributed with mean length 5 minutes.
(a) What is the probability that a subscriber will have to wait for his long
distance call during the peak hours of the day?
(b) If the subscribers will wait and serviced in turn, what is the expected
waiting time?
Establish the formula used.
Solution: Here s = 2, λ = 15/60 = 1 /4 , μ = 1/5
Therefore, first compute

(𝑠𝜌) 𝑛 (𝑠𝜌)𝑠 (5/4) 𝑛 (5/4)2


P0= ⌈∑𝑠−1
𝑛=𝑜 𝑛! + ⌉ −1
= ⌈∑1𝑛=𝑜 + ⌉
𝑠!(1−𝜌)2 𝑛! 2!(1−5/8)2

55
1
= 5 25
1+ + ×1/2×8/3
4 16
3
=
13
(𝜆/µ)𝑠
(a) P(W>0) = P0
𝑠!(1−𝜌)2
2 3
(5/4)
= 2
2!(1−5/8) 13

= 0.48
(b) Wq = Lq/λ
1 ρ(𝑠𝜌)𝑠
= P0
𝜆 𝑠!(1−𝜌)2

5/8(5/4)2 3
=4×
2!(1−5/8) 2 × 13
125
=
39
= 3.2 minutes.

1.15. Applications Of Queueing Theory.


Queueing Theory has a wide range of applications, and this section is designed
to give an illustration of some of these. It has been divided into 3 main
sections, Traffic Flow, Scheduling and Facility Design and Employee Allocation.
The given examples are certainly not the only applications where queuing theory can
be put to good use, some other examples of areas that queueing theory is used are also
given.

1.15.1 Traffic Flow


This is concerned with the flow of objects around a network, avoiding
congestion and trying to maintain a steady flow, in all directions.

1.Queueing on Roads

56
Introduction
The study of vehicle flow along a road can be classed as a deterministic flow,
because the number of cars flowing within a particular time span can be predicted by
averaging previously collected data for that day of the week and time.
For the purposes of analysing the vehicle flow on roads it is normal to monitor
the frequency of vehicles in small time groups, over a period of months, and then
average out the days in the months, to obtain an average flow for each day of the
week. This will have the effect of removing, or at least reducing the effect of, unusual
days, when the traffic flow was very different to normal. There is little use in trying
to accommodate for these days as the change in traffic flow when something does
upset the system is very hard to predict, if it is at all predictable.
I have covered two different types of queues that commonly occur on roads:

A] Queues Forming at a Motorway Junction


Introduction
This example is about how a queue caused by traffic trying the enter the
motorway can then causes a secondary queue of traffic trying the leave the motorway,
as the first queue backs up past
the exit slip road.
Because we are interested the
how the queue of traffic entering
the motorway affects that trying
to leave, we say that there are in
fact two 'sections' to the queue
formed by the merge traffic at
point 2:
1. The traffic continuing on the motorway, past point 2
2. The traffic trying to leave the motorway at point 1, but can't as the exit is
blocked by the continuing traffic. We shall call this the secondary queueing
 Assumptions
 It is the area immediately downstream of the merge point where the bottle neck
occurs (as for all well laid out junctions the merge area is not the cause of the
bottle neck)
 The exit slip road is not a bottle neck point (ie. there is no hold up on the slip
57
road leaving the motorway)
 That the time to get between point 1 and point 2 is constant, regardless of the
traffic situation. This is a needed assumption in order to avoid overly
complicated expressions
Symbols
 Symbol Meaning
M Number of lanes on the motorway
Cumulative number of through vehicles that would have passed point 1
A1m(t)
if there were no queueing
Cumulative number of exiting vehicles that would have passed point 1 if
A1s(t)
there were no queueing
Cumulative number of vehicles from the joining slip road that would
A2s(t)
have passed point 2 if there were no queuing
Cumulative number of vehicles from the motorway that would have
A2m(t)
passed point 2 if there were no queuing
Cumulative number of vehicles that would have arrived at point 2 by
A2(t)
time t if there were no queueing
D1m(t) Cumulative number of through vehicles that have passed point one
D2(t) Cumulative number of vehicles that have actually passed point 2
Cumulative number of vehicles that have passed point 2, that came from
D2s(t)
the slip road
Cumulative number of vehicles that have passed point 2, that came from
D2m(t)
the motorway
Maximum service rate of motorway at the merge point (ie. maximum
number of cars per hour that can pass point 2)
(t) Service rate of the motorway, at point 2, at time t
s Maximum service rate of the entry slip road
s(t) Service rate of the entry slip road at time t

58
T Time to travel from between points 1 and 2, when there is no queueing
Capacity of the motorway between points 1 and 2 (how many vehicles
c
can queue in that stretch of motorway)
 Modelling the traffic flow
As the traffic on the motor way can come from either the entry slip road or from
the motorway we can say that A2(t) = A2s(t) + A2m(t). At first sight the number of
cars (and hence the length) of the queue would appear to be A2(t) - D2(t), however
this is not strictly the case, as the length of the queue is this, plus the number of cars
that would have been in the area taken up by the queue, had there not been a queue.
However the area between D2(t) and A2(t) on a graph of time against cumulative
count gives the total delay to all vehicles that pass point 2.
Most motorway junctions are designed so that when there is a large hold up the traffic
on the entry slip road will enter the motorway alternately with the traffic on the "slow
lane". Thus s = /2, and so the service rate on the motorway for through traffic
is - s. This also means that the through traffic on the motorway is occupying m-
1/2 lanes of the motorway.
If through traffic on the motorway isn't using all of its service rate then the entry slip
road's traffic can use up the slack in the system (up to the maximum limit of the slip
road), and thus effectively the joining traffic gets service priority, and vice versa,
when the entry slip road's traffic isn't using its full service rate then motorway through
traffic can use up the slack, and so it gets service priority.
Most commonly what happens is that a queue builds up on the motorway, but the slip
road remains free of queueing traffic,. as the slip road operates under its full
capacity, s.
It can be said that:
 D2m(t) = D2(t) - D2s(t), as the vehicles to depart from point 2 must have come
from either the motorway or the slip road
 D1m(t) = D2m(t) + c
 A1m(t) = A2m(t + t), as if there were no queueing then the number of vehicles
arriving at point 2 must be equal to the number arriving at point 1, t units of
time ago, that were going to carry onto point 2
If the queue has not yet reached point 1 then A1m(t) - D2m(t) is the number of
vehicles between points 1 and 2, either in a queue or moving along that stretch of
motorway. Thus A1m(t) - D2m(t) - c = The number of through cars that have been

59
delayed that have yet to reach point 1.
If we presume that there isn't a lane reserved soley for the use of exiting traffic
then the exiting traffic will have to share a lane with through traffic, thus the delay for
exiting traffic arriving at point 1 at a time T will be the same for a through vehicle
arriving at point 1 at time T.
The delay for all through vehicles will be equal to the area between the curve of
A1m(t) (which equals A2m(t + t)), and D1m(t) (which equals D2m(t) + c). Thus the
delay for a single vehicle is the integral from 0 to T of (A2m(t + t) - D2m(t) - c) with
respect to t / the number of vehicles:

In order for there to be no effect on traffic leaving the motorway there would
need to be one lane reserved solely for traffic exiting the motorway at point 1, and in
which case:
 The exit junction would not affect the delay time in the queue
 The queue would actually be longer, and so the speed of the queue traffic
would be higher
 The queue wouldn't affect the exiting of traffic
This is a solution used on many stretches of motorway, where there is enough space.

B] Queues forming during the Rush Hour

 Introduction

This example discusses how it is possible to model the build up of traffic in the
rush hour, and thus to see when queues form on a straight road, without junctions,
relative to the arrival rate of cars on the section of road.

 Symbols Used

Q(t) Queue length at time t

A(t) Cumulative arrivals to the queue at time t

60
D(t) Cumulative departures from the queue at time t

The maximum service rate

(t) The service rate at time t

(t) Arrival rate at time t

 Modelling the Queue

In the rush hour the arrival rate, (t), will rise until it reaches a maximum rate (i.e.
the time when the most people reach the point of road, when they are trying to get
to work), after this point the arrival rate will decrease. There are four main points
in this flow, as follows:

 Time label Significance

t0 The first point at which (t) equals the maximum service rate,

t1 The point where (t) is a maximum

t2 The point where (t) has decreased back down to

t3 The point where the queue has gone, and so (t) = (t)

The above details tend to imply that a graph of (t) is quadratic, and so would be
differentiable twice at or near t1. This means that (t) has a taylor expansion
about the point t1:

for constant :

61
For small t-t1, i.e. this is valid where t0 < t < t3
This means that t0 and t2 can be estimated, by substitution:

The length of the queue is the area between the curves of (t) and (t), i.e.:

By the using similar substitutions to those used in the previous derivation we can
simplify this to:

1.15.2. Scheduling
A] Computer Scheduling
There are many different strategies used for scheduling in computers. This
section examines a simple strategy, with no allowance for process prioritisation,
this is the Batch Processing algorithm, and has the following properties:

 Each process gets as much time as it needs to complete


 There is a single FIFO queue for processes waiting to be processed
 New processes are placed on the back of the queue

The model can be considered as an M/G/1 case.

62
It is clear that the average response time of the system for a process that takes x
seconds to complete, T(x), will be the time spent waiting in the queue, plus the
time to complete the process:

For an M/G/1 queue:

Notice how the wait time is totally independent of the job's length, thus batch
processing is completely indiscriminate of job length, but this does have the
disadvantage that short jobs get no priority and thus batch processing isn't suitable
for a time shared system. From the above we can substitute in W0 to give:

1.15.3.Facility Design and Employee Management

A] Queues in a Bank

 Introduction

As a rule people dislike queueing in banks, and so in order to improve the level
of service a bank manager is interested to find out:

1. The average number of people waiting in the bank (i.e. the queue length)
2. How much of the cashiers' time is spent idle (as a percentage of their time)

Depending on how many tellers she employs during lunchtime. She is prepared
to employ up to 5 cashiers, but not less than 1.

 Model Assumptions and Details

63
 The distribution of the length of time it takes the cashiers to carry out a task
is exponential, with mean 2 minutes and standard deviation of 5/4 minutes
 There is virtually no limit on the queue length, as the bank has a large floor
area
 Customers arrive in a Poisson distribution, with mean of 25 per hour
 Service is done on a first come first serve basis
 This is an M/M/c queue, where 1 =< c =< 5

 Symbols

Symbol Meaning, and value if in assumptions

C Number of cashiers (servers)

Lq Average length of the queue

W Percentage of cashiers idle (waiting) time

Mean arrival rate (25 per hour)

1/(mean time to server customers) = 30 per hour

P Average amount of work for each server, per hour

 Calculations

From the above we can easily calculate the following values, which are used to
work out Lq and W:

p0 and Lq, W and the idle time can be calculated using the following equations:

64
The results of these equations for 1 to 5 cashiers are summarised in the following
table:

Cashiers P r^n / n! p0 Lq W Idle

1 0.833 0.833 0.167 4.167 0.2 0.167

2 0.417 0.347 0.412 0.175 0.04 0.583

3 0.278 0.096 0.432 0.022 0.034 0.722

4 0.208 0.02 0.434 0.003 0.033 0.792

5 0.167 0.003 0.435 0.000 0.033 0.833

From the table it can be seen that either 1 or 2 cashiers should be employed, as this
will keep a short queue, but without the cashiers being idle too much of the time.

1.15.4. A Mail Sorting Office


 Introduction

In a mail sorting office the


letters to be sorted often come
in as a batch, and it is
important to organise workers
in the way that will get all the
post sorted as quickly as
possible. Many post companies used to move the bulk of their workers along with

65
the mail, i.e. all workers were initially made to help at the start of the sorting line,
to reduce the backlog, and then were gradually moved along the sorting line, as the
backlog moved along it. However Queueing Theory can be used to see if this is
indeed the quickest way to sort mail, or to suggest the quickest way, if this isn't it.
For this example stage refers to a stage in the process of sorting, and server refers
to a worker who sorts letters, at any stage.

 Assumptions and Simplifications

The following simplifying assumptions are made:

1. There is a fixed number of sorters


2. All sorters sort at a fixed, continuous rate, which is independent of which
stage they are at
3. The cumulative input to the first of the n stages is recorded
4. The transit time of letters between stages and in stages is ignored (i.e., the
time letters are in the system is due to queuing between stages)
5. The number of letters in the system doesn't affect the system performance
6. There are so many servers that we can ignore that fact that they are distinct
servers,

The following symbols are used:

 Symbol Represents

N Number of stages (the stages are numbered from 1 to n)

Ak(t) Cumulative number of letters that have arrived at the stage number k

Cumulative number of letters that have departed from stage number k,


Dks(t)
into the input queues of the next server

Cumulative number of letters that have departed the queue for stage
Dkq(t)
number k

Cumulative number of letters that have departed from stage number k,


Dk(t) this is equivalent to Dkq(t), as all letters that go into a server must also
leave the server, and by our assumptions letters spend a negligible time

66
in the server.

The service rate for all servers combined

k The service rate for the kth stage

Positioning the Workers

By the fact that k(t) is the service rate of the kth stage then:

We want to either:

a. minimise the total delay through the system (i.e., each letter is in the system
for the smallest possible time), or:
b. maximise the number of letter that have departed the system after a given
time

Both of these can be achieved by maximising Dn(t). This is constrained by the


values of Dk(t) for previous stages, as the final output can't be more that the output
from previous stages. Thus:

The acheive either a. or b. we wish to maximise Dn(t), hence:

Hence all the stages should have the highest possible service rate, which is thus
/n, this would yield the highest Dk(t) for all k.
It is never good to have a (k-1)> k, as this will create a queue between stages
k-1 and k, and the excess service rate used to create the queue could have been
better used at the next stage to avoid the queue forming in the first place.

 Summary of Results

67
1. It is best to have the Postal Workers sorting mail distributed evenly between
all the stages
2. It is never advantageous to have a k greater then the next stage.

1.15.5.Queueing Theory in a Restaurant Operation


Applying Queueing Theory in a restaurant operation might be helpful to those who
proactively wish to manage revenue. After all, the drivers of revenue in a
restaurant is how many guests a restaurant can serve in a given shift, as well as
average order value. One must employ all sorts of restaurant
improvements and restaurant kaizen to meet the customer need.

So how does one apply Queueing Theory in a restaurant operation? Suppose the
following information below for a typical restaurant:

Time 7:30 8:00 8:30 9:00 9:30 10:00 10:30 Total


Number of Arrivals 60 25 80 50 20 5 0 240
Number of Departures 0 0 30 30 50 85 45 240
Number in Restaurant 60 85 135 155 125 45 0 605

 Assumptions:

 The restaurant operates 180 minutes on the evening shift, which starts at 7:30
PM and closes at 10:30 PM.
 This restaurant is unusual because the guests arrive and leave exactly at the
half hour mark (this is to make it simpler)
 Read the data above like: The number of guests in the restaurant between 8:00
and 8:30 is 85. The number of arrivals at 8:30 is exactly 25. The number of
guests that depart at 8:30 is 30.
So, given our restaurant data, we arrive at the following questions:

1. What is the average throughput of customers, using the unit of (customers per
minute) of operation?

68
2. What is the average cycle time of a customer in minutes?
Restaurant Operations Management
The questions above are important because:

 The lower the cycle time per restaurant customer, then the restaurant manager
can accept more guests and increase the restaurant revenue.
 Knowing the throughput of the restaurant can give the restaurant manager
more ability to manage the restaurant to a drum beat. This is typically
called Takt Time in the language of lean manufacturing.
Okay, so how can one apply queueing theory to answer the questions above?

1. What is the average throughput of customers, using the unit of (customers


per minute) of operation?
Answer: We get 240 / 180, which means 1.33 customers per minute.

2. What is the average cycle time of a customer in minutes?


Answer: To get cycle time, we first calculate total inventory. By inventory in this
setting, we’re talking about restaurant guests. This means we sum the number of
guests in the restaurant during the evening shift:

(60+85+135+155+125+45) / 6 = 605 / 6 = 100.83 customers.

So, cycle time can be calculated:

100.83 / 1.33 = 75.64 minutes is the average cycle time of a restaurant customer

So, if one’s goal is to increase restaurant revenue, then the restaurant manager can
do the following, given the data above:

 lower the average cycle time of the restaurant guests, which allows for other
guests to occupy that spot and thereby increase revenue
 do nothing to cycle time, but try to increase the average order value per guests
through menu up-sell or cross-sell
 do nothing to cycle time, but investigate menu pricing and increase menu item
prices as appropriate, but done with wisdom and care, otherwise customers will
leave if prices aren’t in line with their expectations
Additionally, if one is interested in reducing cycle time per restaurant guest, this is
also an area in which Queueing Theory and Lean can work together. Perhaps there
69
are process steps that do not add value, which contribute to the current cycle time
calculation. Perhaps eliminating wastes in the restaurant operations processes can
thereby reduce cycle time per customer.

1.15.6. APPLYING THE QUEUING MODEL TO


THE AIRSPACE CONTROL SYSTEMS
A theoretical application of transient queueing analysis is provided for
military air traffic control. The exact distribution of the nth arriving or departing
flight's sojourn time in an M/M/s queue with k flights initially present is reviewed.
Algorithms previously developed for computing the covariance between sojourn
times for an M/M/1 queue with k ≥ 0 flights present at time zero are provided and
utilized. Maple computer code is utilized for practical applications in air traffic
control of transient queue analysis for many system measures of performance
without regard to traffic intensity (i.e., the system may be unstable with traffic
intensity greater than one), thus negating the need for simulation.

1.16.Limitations of queuing theory


The assumptions of classical queuing theory may be too restrictive to be able
to model real-world situations exactly. The complexity of production lines with
product-specific characteristics cannot be handled with those models. Therefore
specialized tools have been developed to simulate, analyze, visualize and optimize
time dynamic queuing line behavior. For example; the mathematical models often
assume infinite numbers of customers, infinite queue capacity, or no bounds on
inter-arrival or service times, when it is quite apparent that these bounds must exist
in reality. Often, although the bounds do exist, they can be safely ignored because
the differences between the real-world and theory is not statistically significant, as
the probability that such boundary situations might occur is remote compared to
the expected normal situation. Furthermore, several studies show the robustness of
queuing models outside their assumptions. In other cases the theoretical solution
may either prove intractable or insufficiently informative to be useful. Alternative
means of analysis have thus been devised in order to provide some insight into
problems that do not fall under the scope of queuing theory, although they are
often scenario-specific because they generally consist of computer simulations or
analysis of experimental data.

70
REFERENCES

[1] Kanti Swarup, R.K. Gupta, Man Mohan. Operations Research, Sultan Chan
Publications.
[2] Sundarapandian, V. (2009). "7. Queuing Theory". Probability, Statistics and
Queuing Theory. PHI Learning. ISBN 8120338448.
[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. edit American Journal of Engineering Research (AJER) 2014 w
w w . a j e r . o r g Page 11 doi:10.1214/aoap/1029962815.
[4] Bose, S. An introduction to queueing systems. Kluwer Academic/Plenum
Publishers, New York, 2002. [
[5] Lawrence W. Dowdy, Virgilio A.F. Almeida, Daniel A. Menasce (Thursday
Janery 15, 2004). "Performance by Design: Computer Capacity Planning By
Example". p. 480
[6]Adan, I., and Resing, J. Queueing Theory.
http://web2.uwindsor.ca/math/hlynka/qonline.html.
[7] http://www.andrewferrier.com/oldpages/queueing_theory/Henry/
[8] stattrek.com/probability-distributions/probability-distribution.aspx.

71

You might also like