4 Queuing System
4 Queuing System
4 Queuing System
Introduction
Queuing system is the organized collection and the
interrelationship between different components of a
queue with predefined intension for particular service.
It is the system in which customer arrive for a particular
service, wait in a queue if service couldn’t start
immediately and leave after being served.
So, it is the system consisting of organized grouping
between various elements like population of customers,
arrival, queuing discipline, server and output, with
predetermined objective to achieve service fast
1
• A queueing system consists of one or more servers that
provide service of some kind to arriving customers
• If the servers are busy, the customers join one or more
queues in front of the servers, hence queueing system
2
Examples:
Waiting line queues are one of the most important
areas, where the technique of simulation has been
extensively employed.
People at railway ticket window, vehicles at a petrol
pump or at a traffic signal, customers in the bank,
products at a machining center, television sets at a
repair shop are a few examples of waiting lines.
Air traffic at an airport
3
Queue status
Not empty Empty
5
Queuing System
6
Population of Customers or calling source 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).
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.
7
Arrival defines the way customers enter the
system.
Mostly the arrivals are random with random
intervals between two adjacent arrivals.
Typically the arrival is described by a random
distribution of intervals also called Arrival
Pattern.
8
Queue or waiting line 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:
Maximum Size and Queuing Discipline.
9
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
Queuing Discipline represents the way queue is
organized ( rules of inserting and removing
customers to/from queue)
10
Service represents activity which takes time and 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 number of server.
System with one server only are Single Channel
System whereas system with more servers are
Multichannel Systems.
11
Output represents the way customer leaves
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).
12
Characteristics of queuing systems
Arrival Process
The distribution that determines how the tasks
arrives in the system. The arrival pattern is
generally Poisson’s distribution with arrival
rate λ with probability that certain no. of
customer (x) arrive in a given time window
13
• The simulation time start when first customer arrives
to the system
• The arrival time is random and hence inter-arrival
time is also random
• If arrivals vary stochastically, it is necessary to define
the probability function of the inter-arrival times
• Two or more arrivals may be simultaneous. If n
variables are simultaneous, then n-1 of them have zero
inter-arrival times
• The arrival time is very much uncertain and hence its
distribution is important
Example;
Arrival Arrival Inter-arrival Arrival Arrival Inter-
Number Time Time Number Time arrival time
1 12.5 12.5 11 136.4 21.4
2 15.1 2.6 12 142.7 6.3
3 44.1 29.0 13 151.2 8.5
4 62.6 18.5 14 162.5 11.3
5 65.3 2.7 15 167.2 4.7
6 67.6 2.3 16 172.9 5.7
7 71.0 3.4 17 179.8 6.9
8 92.5 21.5 18 181.6 1.8
9 106.5 14.0 19 185.0 3.4
10 115.0 8.5 20 194.9 9.9
14
Service Process
The distribution that determines the task
processing time. The service distribution is
generally exponential which is continuous
distribution taking any feasible range of
time.
For average service time (μ), the probability
that service will exceed at time t in
exponential distribution is:
Service might have deterministic or general
distribution
•Normally, service time of a process is constant But if it
varies stochastically, it is described by a probability
function.
Ts = Mean service time µ
= mean service rate
P(t) = Probability that service time > t
19
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 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.
20
Queuing System
21
Applications of Queuing Theory
Telecommunications
Traffic control
Determining the sequence of computer
operations
Predicting computer performance
Health services (eg. control of hospital bed
assignments)
Airport traffic, airline ticket sales
Layout of manufacturing systems i.e.
planning
22
Example application of queuing theory
Queuing theory is applied in many banks, retail stores,
oil stations, etc.
There might be single queue/line and multiple
queue/lines configuration for the service.
In multiple line/multiple checkout system, a queuing
system where customer wait for next available cashier,
the throughput is high since multiple lines are being used
for service as in banks.
The customers takes service through multiple teller,
making the separate lines for each server(teller).
23
Figure: Single Queue Configuration(Single waiting line/multiple server)
25
Kendall Notation 1/2/3(/4/5/6)
26
Kendall Classification of Queuing Systems
The Kendall classification of queuing systems (1953) exists
in several modifications.
The most comprehensive classification uses 6 symbols:
A/B/s/q/c/p
where:
A is the arrival pattern (distribution of intervals between
arrivals).
B is the service pattern (distribution of service duration).
s is the number of servers.
q is the queuing discipline (FIFO, LIFO, ...). Omitted for
FIFO or if not specified.
c is the system capacity. Omitted for unlimited queues.
p is the population size (number of possible customers).
Omitted for open systems.
27
Kendall Classification of Queuing Systems
28
Kendall Classification of Queuing Systems
Examples: What is the meaning of following
notations in Queuing System?
D/M/1 = Deterministic (known) input, one
exponential server, one unlimited FIFO or
unspecified queue, unlimited customer population.
M/G/3/20 = Poisson input, three servers with any
distribution, system capacity 20, unlimited
customer population.
D/M/1/LIFO/10/50 = Deterministic arrivals, one
exponential server, queue is a stack of the
maximum size 9, total number of customers 50.
M/D/6/10/FIFO = Markovian(Poissons) arrival,
six deterministic server, queue is orderly queue
with maximum size 10, unlimited customer
population
29
Kendall Classification of Queuing Systems
Examples:
M/D/8/15/LIFO = Single waiting line with Poisson’s
or Markovian arrival, deterministic service
distribution with 8 servers, queue is stack with
maximum size 15(0 to 14), unlimited customer
population.
D/M/1/FIFO/20/510 = According to Kendall
classification (notation), the above queuing
system represents the system with
Deterministic input (arrival), single server with
exponential distribution, queue is orderly queue
(FIFO) with system capacity 20, the population
of customers is 510.
30
Model of Queuing System
Queuing System
Queue
Server
Server System
32
M/M/1 queue model
L
Lq
1
Wq
33
Here
• =Customer Arrival rate
• = Customer Service rate
• System Utilization, P= /, is the percentage
capacity utilized which reflects the extent to which
facility is busy rather than idle.
Solve:
Average number in queuing system,L= /(- )
Average number in the queue,Lq = P.L
Average waiting time in whole system,W=1/(- )
Average waiting time in the queue, Wq= P.W
Measures of system performance
Let us consider the following waiting line example:
36
Measures of system performance
37
System Utilization
System Utilization is the percentage capacity utilized
which reflects the extent to which the facility is busy
rather than idle.
System utilization factor (s) is the ratio of average arrival
rate (λ) to the average service rate (µ).
S= λ/µ in the case of a single server model
S= λ/µn in the case of a “n” server model
The system utilization can be increased by increasing
the arrival rate which amounts to increasing the average
queue length as well as the average waiting time.
Under the normal circumstances 100% system
utilization is not a realistic goal.
38
Simulation of Queuing System- Example
In a single channel queuing simulation, inter arrival
times and service times are generated from the
distribution of random variable.
Table below gives the inter arrival times and service
times generated at random :
Customer Inter arrival Service
Time(Minutes) Time(Minutes)
1 - 2
2 2 1
3 4 3
4 1 2
5 2 1
6 6 4
39
The simulation table for the single-channel queue is:
40
• Some of the findings from the above Simulation
table are as follows:
41
Average waiting time of those who wait =
(total time customers wait in queue)/(total no. of
customers that wait) = 4/2 = 2 minutes
The average time a customer spends in the system =
(total time customers spends in the system)/(total
number of customers) = 17/6 = 2.83 minutes
Alternatively, Average time customer spends in the
system = (average time customer spends waiting in the
queue) + (average time customer spends in service) =
(0.67+2.16) = 2.83 minutes
42
(IMPORTANT) See Example 2.1 (page 25) From
Discrete-Event System Simulation By Jerry Banks et al.
43