Professional Documents
Culture Documents
Queuing Models
Ave hours
waiting per ship
Cost of ship
waiting time
(per shift)
Stevedore cost
(per shift)
Characteristics of a
Queuing System
The queuing system is determined by:
Arrival characteristics
Queue characteristics
Service facility characteristics
A Queuing System
Average Wait
in Queue
Arrival
Rate
(Wq )
Service
Departure
(W )
(L )
The Queuing
System
Jobs
Queue
Service
Mechanis
m
Served
Jobs
leave the
system
Queue
Discipline
Arrival
Process
Queue
Configuratio
n
Service
Process
10
Calling Population
Arrival Process
Service Process
Number of Servers
Queue Discipline
11
Can be homogeneous
Only one type of customers/ jobs
Or heterogeneous
Several different kinds of customers/jobs
12
2. Arrival Process
In what pattern do jobs / customers arrive to the
queueing system?
Distribution of arrival times?
Batch arrivals?
Finite population?
Finite queue length?
3. Service Process
How long does it take to service a job or
customer?
Distribution of arrival times?
Rework or repair?
Service center (machine) breakdown?
14
4. Number of Servers
How many servers are available?
Single Server Queue
15
Servers
Single Queue
Servers
16
2. Labor specialization
possible
3. Customer has more
flexibility
4. Balking behavior may be
deterred
Several medium-length lines
are less intimidating than one
2. No customer anxiety
regarding choice of queue
3. Avoids cutting in
problems
4. The most efficient set up
for minimizing time in the
queue
5. Jockeying (line switching)
is avoided
17
5. Queue Discipline
How are jobs / customers selected from the
queue for service?
First Come First Served (FCFS)
Shortest Processing Time (SPT)
Earliest Due Date (EDD)
Priority (jobs are in different priority classes)
18
Arrival Characteristics
Size of the arrival population either
infinite or limited
Arrival distribution:
Either fixed or random
Either measured by time between
consecutive arrivals, or arrival rate
The Poisson distribution is often used
for random arrivals
Poisson Distribution
Average arrival rate is known
Average arrival rate is constant for some
number of time periods
Number of arrivals in each time period is
independent
As the time interval approaches 0, the
average number of arrivals approaches 0
Poisson Distribution
= the average arrival rate per time unit
P(x) = the probability of exactly x arrivals
occurring during one time period
P(x) = e- x
x!
Behavior of Arrivals
Most queuing formulas assume that all
arrivals stay until service is completed
Balking refers to customers who do not
join the queue
Reneging refers to customers who join
the queue but give up and leave before
completing service
Batch Arrivals
Some sources transmit in packet bursts
May be better modeled by a batch arrival
process (e.g., bursts of packets arriving
according to a Poisson process)
The case for a batch model is weaker at
queues after the first, because of shaping
Time
Intera
rrival Times
Queue Characteristics
Queue length (max possible queue length)
either limited or unlimited
Service discipline usually FIFO (First In
First Out)
Exponential Distribution
= average service time
t = the length of service time (t > 0)
P(t) = probability that service time will be
greater than t
P(t) = e- t
Arrival rate
Long-term number of arrivals per unit time
Occupancy
Number of packets in the system (averaged over a
long time)
Littles Law
For a given arrival rate, the time in the system is
proportional to packet occupancy
N=T
where
N: average # of packets in the system
: packet arrival rate (packets per unit time)
T: average delay (time in the system) per packet
Examples:
On rainy days, streets and highways are more crowded
Fast food restaurants need a smaller dining room than regular
restaurants with the same customer arrival rate
Large buffering together with large arrival rate cause large
delays
Kendalls Notation
A/B/s
A = Arrival distribution
(M for Poisson, D for deterministic, and
G for general)
B = Service time distribution
(M for exponential, D for deterministic,
and G for general)
S = number of servers
Name Models
(Kendall Notation)
Covered
Example
Simple system
(M / M / 1)
Multiple server
(M / M / s)
Constant service
(M / D / 1)
General service
(M / G / 1)
FIFO Queue
Packets are placed on outbound link to egress device in FIFO order
Device (router, switch) multiplexes different flows arriving on various
ingress ports onto an output buffer forming a FIFO queue
Multiple Servers
Multiple packets are transmitted
simultaneously on multiple lines/servers
Head of the line service: packets wait in a
FIFO queue, and when a server becomes
free, the first packet goes into service
Arrivals
Transmission
Lines
Priority Servers
Packets form priority classes (each may have several flows)
There is a separate FIFO queue for each priority class
Packets of lower priority start transmission only if no higher priority
packet is waiting
Priority types:
Non-preemptive (high priority packet must wait for a lower priority
packet found under transmission upon arrival)
Preemptive (high priority packet does not have to wait )
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Interm.
High
Low
Line
Priority
Priority
Priority
Priority Queuing
Packets are classified into separate queues
E.g., based on source/destination IP address, source/destination TCP port,
etc.
All packets in a higher priority queue are served before a lower priority
queue is served
Typically in routers, if a higher priority packet arrives while a lower priority
packet is being transmitted, it waits until the lower priority packet completes
Shared Servers
Again we have multiple classes/queues, but they are
served with a soft priority scheme
Round-robin
Weighted fair queuing
Transmission
Class
Class
Class123Arrivals
Arrivals
Arrivals
Weight
Weight
Line
Weight
10
31
Round-Robin/Cyclic Service
Round-robin serves each queue in sequence
A queue that is empty is skipped
Each queue when served may have limited service (at most k packets
transmitted with k = 1 or k > 1)
Fair
Queuing
This scheduling method is inspired by the most fair of methods:
Transmit one bit from each queue in cyclic order (bit-by-bit round robin)
Skip queues that are empty
Important properties:
Priority is given to short packets
Equal bandwidth is allocated to all queues that are continuously busy
Finish
Arrival
i-1
iDeparture
-1
Time
timestimes
of Packet i
Poisson arrivals
Arrival population is unlimited
Exponential service times
All arrivals wait to be served
is constant
> (average service rate > average
arrival rate)
M/M/1 System
Nomenclature: M stands for Memoryless (a property of
the exponential distribution)
M/M/1 stands for Poisson arrival process (which is memoryless)
M/M/1 stands for exponentially distributed transmission times
Assumptions:
Delay Calculation
Let
Q = Average time spent waiting in queue
T = Average packet delay (transmission plus
queuing)
Note that T = 1/ + Q
Also by Littles law
N = T and N = Q
where
N = Average number waiting in queue
These quantities can be calculated with formulas
derived by Markov chain analysis (see references)
q
M/M/1 Results
The analysis gives the steady-state
probabilities of number of packets in queue or
transmission
P{n packets} = n(1-) where = /
From this we can get the averages:
N = /(1 - )
T011TN
= N/ = /(1 - ) = 1/( - )
/
Assume:
Traffic arrival rate is doubled
System transmission capacity is doubled
Then:
Queue sizes stay at the same level ( stays the same)
Packet delay is cut in half ( and are doubled
M/G/1 System
Same as M/M/1 but the packet transmission
time distribution is general, with given mean 1/
and variance 2
Utilization factor = /
Pollaczek-Kinchine formula for
Average time in queue = (2 + 1/2)/2(1- )
Average delay = 1/ + (2 + 1/2)/2(1- )
G/G/1 System
Same as M/G/1 but now the packet interarrival
time distribution is also general, with mean
and variance 2
We still assume FIFO and independent
interarrival times and packet transmission times
Heavy traffic approximation:
Average time in queue ~ (2 + 2)/2(1- )
( )
2. Average number in system
L = Lq + /
( )
1. Average time in the system
W = Wq + 1/
2. Probability of 0 customers in system
P0 = 1 /
1. Probability of exactly n customers in
system
Pn = (/ )n P0
Poisson arrivals
Exponential service times
s servers
Total service rate must exceed arrival rate
( s > )
Many of the operating characteristic
formulas are more complicated