Professional Documents
Culture Documents
Part 1 - 2023
Part 1 - 2023
Fall 2023
1
Starter
2
Starter
Queue C
Source
of users/ C C C C C C C
customers
C
C
C
Arrival
process
Size of Queue discipline and Service process Number of servers
user source Queue capacity
Queueing System (cont’d)
5
Applications of Queueing Analysis
6
Notations and Terminology
The first space is for a letter indicating the distribution of inter-arrival time
The second space is for a letter indicating the distribution of service time
The third space is for the number of servers
Examples
M/M/1, M/G/2, etc.
7
Notations and Terminology (con’d)
8
Notations and Terminology (con’d)
At a particular time t
Nq(t) = number of customers waiting in the queue at time t
N(t) = number of customers in the “system” at time t, which includes
customers in the queue and those at the servers
Define
n = mean arrival rate of new customers when N(t) = n
n = mean service rate per busy server when N(t) = n
9
Notations and Terminology (con’d)
10
Values of Interest at Steady State
Given
= expected arrival rate
= expected service rate per server
Unknowns
E[L] = L = expected number of users in queueing system = lim E[N(t)]
as t
E[Lq] = Lq = expected number of users in queue = lim E[Nq(t)] as t
E[W] = W = expected waiting time per customer in the queueing system
= lim E[W(i)] as i
E[Wq] = Wq = expected waiting time per customer in the queue = lim
E[Wq(i)] as i
Number
of Users
A(t)
C(t)
Time
T
N(t) = number of users in the system at time t = A(t) – C(t)
12
Little’s Law (cont’d)
Obviously, the area between the 2 “curves” is the total customer time (i.e.
total time in the system spent by all users up to time T). This can be
T
written as N(t) dt
0
Define LT as the expected number of users in the system at any instant
between 0 & T. It is the total customer time between 0 & T divided by T
T T
N (t )dt N (t )dt
A(T ) 0
LT 0
T WT
T T A(T )
As T , the state of the system is independent of initial conditions (i.e.
it is in steady state). Therefore, at steady state, we have the relationship
L W ……… 1
13
Other Equations
Now, if we observe the previous system at the entrance of the system and
at the exit from the queue, we get
L q Wq ……… 2
We also know that
1 ……… 3
W W E (S ) W
q q
14
Birth and Death Systems
Characteristics
m parallel, identical servers
Infinite queue capacity
Whenever n users are in the system (in queue plus in service), the
arrival process is Poisson with arrival rate of n per unit of time
Whenever n users are in the system, the departure process is Poisson
with departure (service) rate of n per unit of time
FCFS discipline
We are now interested in determining E[L] for the B&D queueing
systems, then use equations 1-3 to determine the 3 other unkowns
We know that
E[ L] L n Pn
0
we need to determine Pn under steady state
Let’s do that for one special B&D system: M/M/1 with constant and
15
Illustrative Example
But because the arrival and service processes for bank tellers are
typically stochastic, we might have something like
16
Illustrative Example
Define
n = number of users in the system
m = number of parallel and identical servers
= user arrival rate
= service rate of each server
When n < m
Rate of arrivals =
Overall rate of departures = ???
Now let’s write the state balance equations from the state transition
diagram
18
M/M/m with FCFS and Infinite Queueing Capacity (cont’d)
19
M/M/m with FCFS and Infinite Queueing Capacity (cont’d)
When n m (cont’d)
It can be shown that
( / ) n
Pn n m P0 for n m, m 1, m 2,....
m m!
By taking the summation of Pn from n=0 to , and equating that to 1,
we get an expression for P0. We will find that the condition for
steady state for this case is
/m < 1
It can be shown that
P0 ( / ) m ( / m )
Lq
m!(1 / m ) 2
The 3 other quantities can now be derived
20
M/M/
( / ) n
Pn P0 for n 0,1,2,.......
n!
1
P
n 0
n 1 P0
e /
21
M/M/ (cont’d)
By Substituting into Pn ,
( / ) n e ( / )
Pn for n 0,1,2,.......
n!
22
M/M/1, FCFS with a finite queue capacity k
Recall that
Pn n P0 for n 0,1,2,......., k
k
1
Pn 1
n 0
P0
1 k 1
Substituti ng into Pn
n (1 )
Pn for n 0,1,2,......., k
1 k 1 0
Now we can get expressions for L, Lq ,W ,Wq (check Table 4 - 1)
23
M/M/1, FCFS with a finite queue capacity k (cont’d)
Remarks
Note that steady state for this system is always reached, even when
>1
Little’s Law should be applied with caution. We must count only the
customers who actually join the system
’ = (1 – Pk), where
’ is the effective arrival rate discounting customers who get lost
Pk is the probability that the queue is saturated (i.e. full). It is also the
fraction of potential facility users who get turned away
24
Other Queueing Systems
26
M/G/1 Queueing System
Characteristics
Arrival process is Poisson with arrival rate
Departure process is “General” with service rate
Service time, S, has a general pdf fS(s) with mean 1/ and variance S2
One server and infinite queueing capacity
t1 t2 t3 t4 t5 t6 time
28
M/G/1 Queueing System (cont’d)
2 2 2
L* s
2(1 )
29
M/G/1 Queueing System (cont’d)
We can now derive equations for E[L], E[W], E[Lq] and E[Wq]
Note that the condition for steady state for this queueing system is < 1
which is the same condition for M/M/1
30
M/G/1 Queueing System (cont’d)
P0 1
2 2 s2
L
2(1 )
L 2 2 s2
1
W
2 (1 )
2 2 s2 [(1 / 2 ) s2 ]
1
Wq W
2 (1 ) 2(1 )
2 2 s2
Lq Wq
2(1 )
31
M/G/1 Queueing System (cont’d)
You can derive the equations for M/M/1 from the above equations by
using Var[S] = 1/2 (try it!)
32
Queueing Systems with Priorities
33
Queueing Systems with Priorities (cont’d)
Preemptive priority
The system interrupts the service to any customer being served at the
service facility upon arrival of a customer from a higher-priority class
Non-preemptive priority
Any service cannot be interrupted once it started, even if a customer
from a higher-priority class arrives during service
Note that
In preemptive priority, the “ejected” customer may resume service later
(i) from the point his service was interrupted, (ii) from scratch, or (iii) with
some priority
Different classes may have different priority rules
E.g. preemptive priority for high-priority classes
Different classes may have different queue disciplines
34
M/G/1 with r priority classes
1 x 1
2 xxx 2
k-1 x k-1
Service
Facility
k xx k
r xx r
35
Characteristics
r classes of customers, with class 1 having the highest priority and class
r having the lowest priority
Poisson arrivals for each class k with rate k
Service time for each class k is Sk which has a general pdf fSk(sk) with
first moment E[Sk]=1/k and second moment E[Sk2]
FIFO for each class k
Infinite queue capacity for each class
Define k = k / k
Where
W0 = expected remaining time in service of the customer who occupies the
server when the new customer (from class k) arrives
Lqi = expected number of customers from class i who are already waiting in
queue at the instant when the new customer (from class k) arrives
Mi = expected number of customers of class i who will arrive while the newly
arrived customer (from class k) is waiting in queue
37
E[ S i2 ] i .E[ S i2 ]
W0 |i (why?)
2.E[ Si ] 2
W0
L qi i .W qi
M i i .W qk
Now substitute the above equations into the equation of E[Wqk] 38
k k 1
W qk W 0 i .W qi W qk i
i 1 i 1
k
W 0 i .W qi
W qk i 1
k 1
for k 1,2,......., r
1 i
i 1
By solving the above equation recursively for k=1, k=2, ……., we obtain
If for the top x classes, we have 1 + 2 + ….. + x < 1 and the class
x+1 brings the sum of s to more than 1 (i.e. 1+2+…..+x+x+1 1)
Then the customers in classes 1 through x experience steady-state
conditions, while those in classes x+1 through r suffer unbounded in-
system (or waiting) times
This means that
customers in each class k of classes 1 through x occupy the server a
fraction k of the time under steady state
customers in class x+1 occupy the server a fraction 1-ax of the time
customers in classes x+2 through r do not have any access to the server
p E[ Si2 ] E[ S p21 ]
i (1 a p )
i 1 2 E[ Si ] 2 E[ S p 1 ]
W qk for k p
(1 ak 1 )(1 ak )
for k p
Note that
The above equation reduces to the previous one if p=r
E[Wqk] does not depend on the customers in classes lower than k except for
the contributions of these customers to the numerator of the equation
41