ECE/CS 441: Computer System Analysis
Module 6, Slide 1
Module 7: Introduction to Queueing Theory (Notation, Single Queues, Little’s Result)
(Slides based on Daniel A. Reed, ECE/CS 441 Notes, Fall 1995, used with permission)
Module 7: Introduction to Queueing Theory (Notation, Single Queues, - - PowerPoint PPT Presentation
Module 7: Introduction to Queueing Theory (Notation, Single Queues, Littles Result) (Slides based on Daniel A. Reed, ECE/CS 441 Notes, Fall 1995, used with permission) ECE/CS 441: Computer System Analysis Module 6, Slide 1 Outline of Section
ECE/CS 441: Computer System Analysis
Module 6, Slide 1
(Slides based on Daniel A. Reed, ECE/CS 441 Notes, Fall 1995, used with permission)
ECE/CS 441: Computer System Analysis
Module 6, Slide 2
ECE/CS 441: Computer System Analysis
Module 6, Slide 3
ECE/CS 441: Computer System Analysis
Module 6, Slide 4
ECE/CS 441: Computer System Analysis
Module 6, Slide 5
ECE/CS 441: Computer System Analysis
Module 6, Slide 6
ECE/CS 441: Computer System Analysis
Module 6, Slide 7
– Letters correspond to six queue attributes
– M exponential – Ek Erlang with parameter k – Hk hyperexponential with parameter k – D deterministic – G general (any distribution, mean and variance used in the solution)
– M[x] denotes exponential arrivals with group size x – x is generally a random variable with separately specified distribution
– infinite buffer capacity – infinite population size – FCFS service discipline
ECE/CS 441: Computer System Analysis
Module 6, Slide 8
ECE/CS 441: Computer System Analysis
Module 6, Slide 9
– 5 tellers – Customers form a single line and are serviced FCFS – Excluding a run on the bank, the waiting room is effectively infinite – For a large bank, the population is effectively infinite – Bulk arrivals are possible if friends arrive together for service
– We can go measure them with a watch at the bank – Or, we can make mathematically simplifying assumptions – Latter is most common and exponential distribution is typical
– M/M/1 queue – As we shall see, the mean queue length (including one in service) for an M/M/1 queue is – Where
! µ ! "
ECE/CS 441: Computer System Analysis
Module 6, Slide 10
ECE/CS 441: Computer System Analysis
Module 6, Slide 11
E[n] = E[nq]+ E[ns] (or n = n
q + n s)
ECE/CS 441: Computer System Analysis
Module 6, Slide 12
ECE/CS 441: Computer System Analysis
Module 6, Slide 13
– During a long interval, arrivals ≈ departures (else no stability) – Area under the curve is total job time units – Mean queue length is average curve height (area/time) – Mean time in system is area/arrivals – Mean arrival rate is arrivals/time
– No assumptions about arrival or service processes – Holds for any queueing discipline (simply charge the area differently)
n r
jobs x time jobs x time time jobs Avg number in system Avg time in system jobs time
x
arrival rate
= (jobs x time)
ECE/CS 441: Computer System Analysis
Module 6, Slide 14
pn = !0!1...! n"1 µ1µ2 ...µn p0 n = 1,2,..., #
ECE/CS 441: Computer System Analysis
Module 6, Slide 15
= + # # + # + + + + # #
1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1
n j j j n n n j j j j j j j j j j j j j j j
Flow balance at state j
ECE/CS 441: Computer System Analysis
Module 6, Slide 16
= $ = + # = 1 1 1
n n j j j j j
ECE/CS 441: Computer System Analysis
Module 6, Slide 17
j i j i / M / M
j j
and all for
all for
death
a
case special a is 1
i i
µ µ ! ! = =
! = " =
= + + + + = = =
= # # $ % & & ' ( =
,... , , n p ... p p p ,..., , n p p
n n n n n n
2 1 1
substituti By 1 1 1 and and intensity" traffic " the called is ratio the
By traditi 2 1 tion simplifica By
2
) ) ) ) ) ) ) µ * ) µ *
ECE/CS 441: Computer System Analysis
Module 6, Slide 18
" = " = " = " = " =
= # =
= # $ $ % & ' ' ( ) # = # =
= # = =
#
j n j n j j n n n n n n
p n n E n ] n [ E n E ] n [ Var ) ( n np n n ] n [ E p U * * * * * * * * * * * * 1 system in the jobs more
y Probabilit 1 1 system in the jobs
number
Variance 1 1 ) (or length queue Mean 1 simply is
Utilizati
2 2 1 2 2 2 1 1
“almost” mean of a geometric random variable---factor out a rho first
ECE/CS 441: Computer System Analysis
Module 6, Slide 19
! µ
= # #
2 1 ) 1 ( n n q q q r
ECE/CS 441: Computer System Analysis
Module 6, Slide 20
ECE/CS 441: Computer System Analysis
Module 6, Slide 21
ECE/CS 441: Computer System Analysis
Module 6, Slide 22
– m servers rather than one server – Reasonable model of
– m servers – All servers have the same service rate µ – Single queue for access to the servers – Arrival rate λ – Formally
!n = ! n = 0,1,..., " µn = nµ mµ # $ % n = 0,1,... m !1 n = m,m +1,..."
ECE/CS 441: Computer System Analysis
Module 6, Slide 23
& 2 1 1 1
n m n n n n n j j n n n
ECE/CS 441: Computer System Analysis
Module 6, Slide 24
pn = m!
n
n! p0 !nmm m! p0 # $ % % & % %
pn
n= 0 '
=1 we have p0 = 1+ (m!)m m!(1) !) + (m!)n n!
n=1 m)1
* + ,
/
)1
ECE/CS 441: Computer System Analysis
Module 6, Slide 25
s q
ECE/CS 441: Computer System Analysis
Module 6, Slide 26
m n n m n n s s m m n n
' = % = ' = 1 1
ECE/CS 441: Computer System Analysis
Module 6, Slide 27
! ! " # $ $ % & ' =
= ' = =
! " # $ $ % & ' + = = + =
w , r q r ) ( m n n n w w ) ( m n r s w r m m
q q s q
100 100 ln max time) waiting
percentile ( 1 again) law s (Little' time ng Mean waiti 1 1 1 law) s Little' apply (just time response Mean be must n utilizatio server individual
in jobs mean
each
Utilizati ( ( ) µ ) * * ) ( µ * ) )
ECE/CS 441: Computer System Analysis
Module 6, Slide 28
! mµ
ECE/CS 441: Computer System Analysis
Module 6, Slide 29
r = 1 µ " ! /m
r = 1 µ 1+ # m 1" $
% & ' ( ) * where # = ! /µ
m
m! 1" ! / mµ
p0 and p0 = 1+ ! /µ
m
m! 1" ! / mµ
+ ! /µ
n
n!
n=1 m"1
,
. / 1 1
"1
ECE/CS 441: Computer System Analysis
Module 6, Slide 30
ECE/CS 441: Computer System Analysis
Module 6, Slide 31
ECE/CS 441: Computer System Analysis
Module 6, Slide 32
ECE/CS 441: Computer System Analysis
Module 6, Slide 33
ECE/CS 441: Computer System Analysis
Module 6, Slide 34
ECE/CS 441: Computer System Analysis
Module 6, Slide 35
ECE/CS 441: Computer System Analysis
Module 6, Slide 36
– no more than B jobs in total can be
(i.e., total number of jobs in the system must be less than B) – jobs arriving when B jobs are present are discarded
and
–
– birth-death process – finite number of states
!n = ! n = 1,2,..., B "1 µn = nµ mµ ! " # n = 1,2,..., m !1 n = m,m +1,..., B B ! m
ECE/CS 441: Computer System Analysis
Module 6, Slide 37
rates arrival effective
queue mean
response mean
to ies probabilit
state the use can we Now, 1 1 1 is system in the jobs zero
y probabilit the Finally, because And, formula
state the Applying
1 1 1 1
" # $ % & + ' ' + = =
( ) ( ( * + = =
( ) ( ( * + =
' = + ' = '
m n n m m B B n n m n n n n m n n n n n
! n m ) ( ! m m p p p ! m m p ! n ) m ( p m p m ! m p ! n p
.
. µ . n = 1,2,..., m !1 n = m,m +1,..., B n = 1,2,..., m !1 n = m,m +1,..., B
ECE/CS 441: Computer System Analysis
Module 6, Slide 38
) p ( m ~ U U ) p ( n ~ n r ~ p p ~ ~ p ) m n ( n np n n
B B B B n n B m n n q B n n
! = = ! = = ! = =
= =
! = + = =
1 is server each
n utilizatio the Finally,
s Little' by 1 is time response mean the entry, after lost not are jobs Because
loss the is
the and 1 available are buffers
system enter the jobs
less is rate arrival effective
by waiting d constraine are Arrivals queue in the number mean and service) plus (queue length queue Mean
1 1 1
# µ $ $ $ $ $ $ $ $ $ $
ECE/CS 441: Computer System Analysis
Module 6, Slide 39
ECE/CS 441: Computer System Analysis
Module 6, Slide 40
– General service time distribution – Otherwise, similar to M/M/1 queues – The most complex, readily solvable single queue
– First, some additional mathematical machinery – Then, comparisons with M/M/1 queues
– Service history matters – Denote service time already received by X0(t)
– Arrival history does not matter – But we do need to know the number of customers N(t) present – N(t) is non-Markovian because it depends on service time
– States are [N(t), X0(t)] – Mixed discrete/continuous, two-dimensional description – Analysis via this method (supplementary variables) is ugly – Use the method of embedded Markov chains...
ECE/CS 441: Computer System Analysis
Module 6, Slide 41
ECE/CS 441: Computer System Analysis
Module 6, Slide 42
x n
q x
ECE/CS 441: Computer System Analysis
Module 6, Slide 43
ECE/CS 441: Computer System Analysis
Module 6, Slide 44
f f r not f f ) x ( f r not ds ) s ( a ) ( a ) A ( P ) ( a t a t t r R ) t ( r t A ) t ( a
e
t e e e e e
2 is lifetime residual mean
variance! the ( moment second
the
moments first two
depends
without (claim lifetime residual Average domain discrete in the case
the is
distributi geometric the
distributi l exponentia for the true was that this saw we
the changes knowledge short, in
time expended about the knowing general, in
1 is lifetime) residual (the
pdf the , then time expended has lifetime
the
(original
pdf the is
2 2
=
= > = > = !
# # # # # #
ECE/CS 441: Computer System Analysis
Module 6, Slide 45
67 6 10 2 33 133 2 that notice
15 5 finally and 75 5 20 1 1 1 and
20 then units, time 5 for use in been has part the if
20 10 is mean value the suppose and
is time failure the
pdf the suppose
(computer Example
2 15 1 5 20 1 20 1
. . f f r t ) t ( r . ds ) s ( b t t t ) t t ( b ) t ( b ) t ( b
e e e e e
= ! = = " # $ % + < = & = ! & = & " # $ % + < = + " # $ % < =
( ( (
Observe – pdf of residual time is not the same as the
– Knowledge of past behavior changes the pdf – There are only two exceptions
(continuous)
ECE/CS 441: Computer System Analysis
Module 6, Slide 46
) ( x r x x x r r , r x x x n r x x t plus x x n x
q q q q q q
! " ! " " ! ! # = + =
=
= $ $ $ $
2 terms g rearrangin by and 2 so is interval this during arrivals
number Expected 2 is arrival new a for time waiting the items, Combining is service in customer a
y probabilit the service in is customer a assuming 2 is that this recall service in customer for time residual the
distributi the
t independen is that this note is mean time time service mean the denote let iting already wa customers service to needed mean time
for wait to have arrival new a does long How
2 2 2 2
Little’s Law again!
ECE/CS 441: Computer System Analysis
Module 6, Slide 47
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 : n) formulatio
(yields tion simplifica by and
service mean the is 1
service mean the
variance the is
variation
t coefficien the is where 1 2 1 and 1 2 1 1 math) e (verify th as expressed are and both Normally, 1 2 time response mean the yields time service mean the Adding 1 2 is is service receive to mean time the saw, just we As x x x x x x x C x C C ) ( ) C ( r ) ( ) C ( r r r ) ( x x r ) ( x r
s s s s q s q q
µ ! µ ! ! " µ # " µ # µ " # " # = = $ + = + = + = $ + = $ + + =
+ =
=
ECE/CS 441: Computer System Analysis
Module 6, Slide 48
s s s s s s s
C C C ) ( ) ( ) ( n / D / M zero C ) ( ) ( n
C ) ( C ) ( C r n ith linearly w grow values
response and length queue mean increases larger
implicatio profound has
value The 2 2 1 1 2 1 queue) 1 (
distributi tic determinis for the is
knew we as 1 1 1 2 1 1 so
distributi l exponentia negative for the is
treasure it, remember it, learn
(PK) Khinchin
famous the is this
Observatio 1 2 1 1 2 1 is system in the number mean the law, s Little' Via
2 2 2 2 2 2 2 2
" # $ % & ' ' = ' + + = ' = ' + = ' + + =
+ + = ' + + = =
( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( µ ) µ ) )
ECE/CS 441: Computer System Analysis
Module 6, Slide 49
ECE/CS 441: Computer System Analysis
Module 6, Slide 50
2
2
ECE/CS 441: Computer System Analysis
Module 6, Slide 51
r = 1 µm ! " r = 1 µg + ! 1+ Cs
2
2 1" ! / µg
2
2 1! " / µg
ECE/CS 441: Computer System Analysis
Module 6, Slide 52
ECE/CS 441: Computer System Analysis
Module 6, Slide 53
ECE/CS 441: Computer System Analysis
Module 6, Slide 54
ECE/CS 441: Computer System Analysis
Module 6, Slide 55
ECE/CS 441: Computer System Analysis
Module 6, Slide 56