Académique Documents
Professionnel Documents
Culture Documents
Frank Y. S. Lin
Information Management Dept. National Taiwan University yslin@im.ntu.edu.tw
1
References
Leonard Kleinrock, Queueing Systems Volume I: Theory, New York: Wiley, 1975-1976. D. Gross and C. M. Harris, Fundamentals of Queueing Theory, New York: Wiley, 1998.
Agenda
Introduction Stochastic Process General Concepts M/M/1 Model M/M/1/K Model Discouraged Arrivals M/M/ and M/M/m Models M/M/m/m Model
3
Introduction
Queueing System
A queueing system can be described as customers arriving for service, waiting for service if it is not immediate, and if having waited for service, leaving the system after being served.
Service Patterns
Probability distribution State dependent / independent service Stationary / nonstationary
System Capacity
Finite / infinite waiting room.
Stages of Service
Single stage (e.g. hair-styling salon) Multiple stages (e.g. manufacturing process) Process recycling or feedback
10
Notation
A queueing process is described by A/B/X/Y/Z
11
Notation (contd)
For example, M/D/2//FCFS indicates a queueing process with exponential inter-arrival time, deterministic service times, two parallel servers, infinite capacity, and first-come, firstserved queueing discipline. Y and Z can be omitted if Y = and Z = FCFS.
12
Stochastic Process
13
Stochastic Process
Stochastic process: any collection of random variables (t), t T, on a common probability space where t is a subset of time.
Continuous / discrete time stochastic process Example: (t) denotes the temperature in the class on t = 7:00, 8:00, 9:00, 10:00, (discrete time)
We can regard a stochastic process as a family of random variables which are indexed by time. For a random process X(t), the PDF is denoted by FX(x;t) = P[X(t) <= x]
14
16
General Concepts
17
( X > a + b) ( X > a)
e ( a +b ) = a = e b = P ( X > b) e
18
P ( X > a + b) P ( X > a)
1 Fx ( a + b ) 1 Fx ( a )
Pj Pij =
i =0 (i j )
i =0 (i j )
P
i
Pij
19
j =0 ( js )
P P = P P
j i =0 ( is ) ij i =0 ( is ) i j =0 ( js )
ij
P
k =0
=1
k= the arrival rate of customers when the system is in state k. k= the service rate when the system is in state k.
21
k-1
k
k
k+1
k Pk +1 = Pk k +1 k 1 Pk = Pk 1 k
. . .
k+1
k 1 k 2 0 Pk = P0 = k k 1 1
i P0 i =0 i +1
k 1
22
=1
i P0 = 1 k = 0 i = 0 i +1
k 1
P0 =
i 1 + k = 0 i = 0 i +1
k 1
= Pk k , T =
k =0
waiting time w = T
23
Littles Result
N = average number of customers in the system
Queueing time
System time T
24
M/M/1 Model
Single Server, Single Queue (The Classical Queueing System)
25
M/M/1 Queue
Single server, single queue, infinite population: k = k = Interarrival time distribution: p (t ) = e t Service time distribution
p (t < t0 ) = e t dt = 1 e t0
0 t0
Define state Sn = n customers in the system (n-1 in the queue and 1 in service) S0 = empty system
rate out
S
rate in
27
Since
pi = 1
i =0
p0 = 1
n i =0
p0 n = 1
i =0
p0 = 1 , pn = n (1 )
#
28
1
#
29
(Littles Result)
1/ 1 = 1
k = (1 ) = (1 ) = k 1 i =k
i
30
M/M/1/K Model
Single Server, Finite Storage
31
M/M/1/K Model
The system can hold at most a total of K customers (including the customer in service)
k = 0 k =
if k < K if k K
32
kK
k>K
Pk = 0
P0 =
1 / k 1 + ( / ) = 1 ( / ) K +1 k =1
K
0k K
otherwise
33
Discouraged Arrivals
34
Discouraged Arrivals
Arrivals tend to get discouraged when more and more people are present in the system. k = k +1 k =
35
P0 =
1 1 + ( / )
k =1 k
1 k!
=e
Pk =
( / )
k!
N =
36
= 1 e ( / )
(Q = , = 1 P0 )
T=
/ (1 e / )
37
M/M/ Queue
There is always a new server available for each arriving customer. k = k = k
39
N=
T = 1
(Littles Result)
40
M/M/m Queue
The M/M/m queue
An M/M/m queue is shorthand for a single queue served by multiple servers. Suppose there are m servers waiting for a single line. For each server, the waiting time for a queue is a system with service rate and arrival rate /m. The M/M/1 analysis has been done, at risk conclusion: 1 delay = / n throughput =
/n = n
41
k = k = k if k m m if k > m
pk = p0 pk = p0
k 1 = p0 ( ) 2 k k! 1 1 = p0 ( ) k ( ) k n 2 n n n! n
42
=1
1 p0 = n 1 (np ) k (np ) n 1 pi k ! + n ! (1 ) k =0
where = n
P[queueing] =
k =m
Comparisons (contd)
M/M/1 v.s M/M/4
If we have 4 M/M/1 systems: 4 parallel communication links that can each handle 50 pps (), arrival rate = 25 pps per queue. average delay = 40 ms. Whereas for an M/M/4 system, average delay = 21.7 ms.
44
Comparisons (contd)
Fast Server v.s A Set of Slow Servers #1
If we have an M/M/4 system with service rate =50 pps for each server, and another M/M/1 system with service rate 4 = 200 pps. Both arrival rate is = 100 pps delay for M/M/4 = 21.7 ms delay for M/M/1 = 10 ms
45
Comparisons (contd)
Fast Server v.s A Set of Slow Servers #2
If we have n M/M/1 system with service rate pps for each server, and another M/M/1 system with service rate n pps. Both arrival rate is n pps 1/ T1 = S2 1
S1
1/ n 1/ n = T2 = n 1 1 n T1 T2 = n
46
M/M/m/m
Multiple Servers, No Storage (m-Server Loss Systems)
47
M/M/m/m
There are available m servers, each newly arriving customers is given a server, if a customers arrives when all servers are occupied, that customer is lost e.g. telephony system. if k < m k = 0 if k < m k = k
48
M/M/m/m (contd)
Pk =
1 P0 ( / ) k!
k
if k m
0
k 1 P0 = ( / ) k ! k =0
if k > m
1
49
M/M/m/m (contd)
Let pm describes the fraction of time that all m servers are busy. The name given to this probability expression is Erlangs loss formula and is given by
pm = ( / ) m / m ! ( / ) k / k !
k =0 m
This equation is also referred to as Erlangs B formula and is commonly denoted by B(m,/) http://www.erlang.com
50