gi/m/1 queuing systemgi/m/1 queuing systemmoltchan/elt-53607/lecture08.pdf · network analysis and...
TRANSCRIPT
GI/M/1 queuing system
Dmitri A. Moltchanov
http://www.cs.tut.fi/kurssit/ELT-53606/
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
OUTLINE:
• GI/M/1 queuing system;
• Methods of analysis;
• Imbedded Markov chain approach;
• Waiting time in FCFS GI/M/1;
• GI/M/m queuing system;
• Note on results for GI/M/-/-/-;
• Rate conservation law for GI/M/-/-.
Lecture: GI/M/1 queuing system 2
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
1. GI/M/1 queuing systemGI/M/1 queuing system is characterized by:
• generally distributed interarrival times.
• exponentially distributed service times;
• single server;
• infinite capacity (therefore, infinite number of waiting positions);
We also assume that:
• FCFS service discipline when needed:
– mean waiting time is the same for all disciplines;
– PDF and pdf may be different!
Note: GI/M/1 is exactly opposite to what we had for M/G/1 queuing system.
Lecture: GI/M/1 queuing system 3
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
1.1. Arrival and service processes
Arrival process:
• renewal arrivals with mean value λ;
• interarrival times are 1/λ;
• PDF, pdf and LT are:
A(t), a(t), A(s). (1)
Service process:
• service times are exponential with mean 1/µ;
• PDF, pdf and LT are:
B(t) = 1− e−µt, b(t) = µe−µt, B(s) =µ
s+ µ. (2)
Lecture: GI/M/1 queuing system 4
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
2. Methods of analysisThere are a number of methods:
• transform approach based on imbedded Markov chain:
– distributions of desired performance parameters can be obtained;
– the idea: find points at which Markov property holds and use transforms.
• direct approach based on imbedded Markov chain:
– distributions of desired performance parameters can be obtained;
– the idea: find points at which Markov property holds and use convolution.
• method of supplementary variables:
– distributions of desired performance parameters can be obtained;
– the idea: look at arbitrary points and make them Markovian.
Note: we consider only the second.
Lecture: GI/M/1 queuing system 5
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3. Direct approach based on imbedded Markov chainRecall M/M/-/-/-: let N(t) be the number of customers at time t:
• we know how the system evolves in time after t in ∆t;
• arrival may occur with probability λ∆t:
– it is independent from previous arrival: memoryless property (A1 = A2)!
• departure may occur with rate µ∆t:
– it is independent from previous departure: memoryless property (B1 = B2)!
• the resulting process is actually birth-death Markov one!
t
A1(t)
A2(t)
B1(t)=B2(t)
B2(t)t
Figure 1: State of M/M/1 queuing system.
Lecture: GI/M/1 queuing system 6
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.1. Problem with GI/M/1 queuing system
Let N(t) be the number of customers at time t:
• do we know how the system evolves in time after t in ∆t?
• service completion may occur with rate λ∆t:
– it is independent from previously received service time: memoryless property (B1 = B2)!
• arrival may occur with probability µ∆t:
– A2 is not the same as A1!
• this process is no longer Markovian!
1 1 2( ) : ( ) ( )B t B t B t=
t
A2(t)
B2(t)
t
1 1 2( ) : ( ) ( )A t A t A t¹
Figure 2: State of M/G/1 queuing system.
Lecture: GI/M/1 queuing system 7
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.2. How to choose the state of GI/M/1 system
State of the system: M/G/1 queuing system
• number of customers in the system and time since previous arrival: (N(t), A(t+ x|x)):
– in this case we know how the system evolves in time;
– we know the distribution of time till the next departure: it is the same as initial one;
– we know the distribution of time till the next arrival: we track it:
A(t+ x|x) = Pr{(T ≤ t+ x)|T > x} = (A(t+ x)− A(x))/(1− A(x)). (3)
tt
( ) 1 tB t e
l-= -
( ) ( )( | )
1 ( )
A t x A xA t x x
A x
+ -+ =
-( ) , 0,1,...N t k k= =
Figure 3: State of GI/M/1 queuing system given by (N(t), A(t+ x|x)).
Lecture: GI/M/1 queuing system 8
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.3. Steady-state distribution as seen by arrival
Let ρ be offered traffic load to G/M/1 queuing system:
ρ =λ
µ. (4)
Note: for GI/M/1 queuing system to be stable we require ρ < 1.
State of the system:
• we consider number of customers just before arrivals;
• note that arriving customer is not included!
...
arrivals
time instant tistate
Figure 4: Illustration of the system state in GI/M/1 queuing system.
Lecture: GI/M/1 queuing system 9
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Define the following:
• ni, i = 0, 1, . . . , be the number of customers in the system just before arrival i;
• consider two successive arrivals to the system ith arrival and (i+ 1)th arrival:
– si+1 be the number of served customers between ith and (i+ 1)th arrivals.
si+1 customers served in (i+1)th
interarrival time
(i+1)th
arrivalith
arrival
(i+1)th
interarrival time
t
...
ni customers just before ni+1 customers just before
Figure 5: Time diagram of GI/M/1 queuing system.
Lecture: GI/M/1 queuing system 10
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
...Arrivals Server
ti ti+1
just before just before
nini+1
ni+1
(i+1)th
interarrival time
si+1
ni+1+1
Figure 6: Better view of time diagram of GI/M/1 queuing system.
Lecture: GI/M/1 queuing system 11
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
We can relate ni and ni+1 using si+1 as:
ni+1 = ni + 1− si+1, ni = 0, 1, . . . . (5)
• note that by definition:
si+1 ≤ ni + 1. (6)
– since there are not more than (ni + 1) customers at time point t+i .
Note the following:
• stochastic process {ni, i = 0, 1, . . . } given by (5) and (7) is a continuous-time Markov chain;
• it defines number of customers seen by arrival.
Consider this Markov chain at steady-state: t→∞:
• we will be looking for steady-state probabilities as seen by arrival;
• to find them we have to determine transition probabilities of the imbedded Markov chain:
pjk = limt→∞
Pr{ni+1 = k∣∣ni = j}, j, k ∈ {0, 1, . . . }, (7)
– pjk is the probability that (j+1−k) customers served between consecutive arrival instants.
Lecture: GI/M/1 queuing system 12
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Note the following:
• transition probabilities from state j to state k, k > j + 1, are not possible:
pjk = 0, k > j + 1. (8)
– state of the system cannot increase on more that one customer between imbedded points.
0 1 n-2 n-1 n n+1...
1nn, +p
n,1p
...1-nn,
p
2-nn,p
n,0p
Figure 7: State transition diagram of imbedded Markov chain.
Lecture: GI/M/1 queuing system 13
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Probabilities pik can be summarized in the compact matrix form:
P =
p00 p01 0 0 0 · · ·
p10 p11 p12 0 0 · · ·
p20 p21 p22 p23 0 · · ·
p30 p31 p32 p33 p34 · · ·...
......
......
. . .
. (9)
Let the steady-state probabilities be defined as follows:
pj, j = 0, 1, . . . . (10)
To determine pj, j = 0, 1, . . . we have to solve the following:
pk =∞∑j=0
pjpjk, k = 0, 1, . . . ,
∞∑k=0
pk = 1. (11)
Lecture: GI/M/1 queuing system 14
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Do the following:
• let αn, n = 0, 1, . . . : probabilities that there are n departures in interarrival time.
• service time is exponentially distributed with rate µ;
• number of service completions in a fixed interval is Poisson;
• get αn, n = 0, 1, . . . by integration over all possible durations of interarrival time:
αj =
∫ ∞0
(µx)j
j!e−µxa(x)dx, j = 0, 1, . . . . (12)
– this holds when the server is always busy during an interarrival time.
Use (12) to write balance equations for states of the system:
pj =∞∑k=0
αk+1pk, j = 0
pj = α0pj−1 +∞∑k=0
αk+1pj+k, j = 1, 2, . . . . (13)
• these have to be solved to get steady-state probabilities pj, j = 0, 1, . . . .
Lecture: GI/M/1 queuing system 15
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.4. Solution
Note the following:
• to determine steady-state probabilities we use direct approach;
• we will try to find the solution in the form:
pn = σn, n = 0, 1, . . . . (14)
Do the following:
• substitute pn = σn into last equation of (13) and divide by σn−1:
σ =∞∑i=0
σiαi. (15)
• we already have expression for αi, i = 0, 1, . . . :
σ =∞∑i=0
σi∫ ∞0
(µt)i
i!e−µta(t)dt =
∫ ∞0
e−(µ−µσ)ta(t)dt. (16)
– the latter is Laplace transform of interarrival times in GI/M/1 queuing system.
Lecture: GI/M/1 queuing system 16
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Therefore, we get the following equation:
σ = A(µ− µσ), (17)
• which is LT of interarrival times with parameter (µ− µσ).
Finding the roots:
• σ = 1 is the simple root:
– it does not satisfy normalizing condition!
• we have to find a root in 0 < σ < 1 if ρ < 1:
– testing pn = σn in (13) shows that this is a root.
• normalizing pn = σn leads to the final result:
pn = (1− σ)σn, n = 0, 1, . . . . (18)
Conclusion: number of customers in the system as seen by arrival is the solution of:
σ = A(µ− µσ). (19)
Lecture: GI/M/1 queuing system 17
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.5. Example: M/M/1 queuing system
LT of exponentially distributed interarrival times are given as follows:
A(s) =λ
λ+ s. (20)
Hence the equation from which we have to determine σ reduces to:
σ =λ
λ+ µ− µσ. (21)
Therefore:
σ(λ+ µ− µσ)− λ = (σ − 1)(λ− µσ) = 0. (22)
Finally,we get σ = ρ and the arrival distribution is:
pn = (1− ρ)ρn, n = 0, 1, . . . . (23)
• due to PASTA and Kleinrock this is the same as time-averaged and seen by departure!
Lecture: GI/M/1 queuing system 18
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.6. Example: E2/M/1 queuing system
Assume, we are given:
• interarrival times are Erlang distributed with two phases and mean 2/3;
• Laplace transform of interarrival times is then:
A(s) = (3/(3 + s))2. (24)
• µ = 4 corresponding to stable system: ρ = 3/8 < 1.
Equation from which we have to determine σ reduces to:
σ = (3/(7− 4σ))2. (25)
Thus:
σ(7− 4σ)2 − 9 = (σ − 1)(4σ − 9)(4σ − 1) = 0. (26)
Therefore, the desired root is σ = 1/4:
pn = (3/4)(1/4)n, n = 0, 1, . . . . (27)
Lecture: GI/M/1 queuing system 19
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
3.7. Example: E2/M/1 queuing system
Assume, we are given:
• interarrival times are generalized Erlang with two phases: µ and 2µ;
• Laplace transform of interarrival times are given by:
A(s) = (2µ2)/((µ+ s)(2µ+ s)). (28)
• service rate is µ leading to stable system.
Equation from which we have to determine σ reduces to:
σ =2µ2
(2µ− µσ)(3µ− µσ)=
2
(2− σ)(3− σ). (29)
It leads to following equation:
σ3 − 5σ2 + 6σ − 2 = (σ − 1)(σ − 2−√
2)(σ − 2 +√
2) = 0. (30)
The only root σ = 2−√
2 is acceptable leading to:
pn = (√
2− 1)(2−√
2)n, n = 0, 1, . . . . (31)
Lecture: GI/M/1 queuing system 20
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
4. Waiting time in FCFS GI/M/1 systemWhat is nice about GI/M/1:
• we had to imbed Markov chain just before customer arrivals;
• steady-state distribution we found is what arrival sees;
• arrival has to wait until service completion of all customers it sees.
Let us define the following:
• T : waiting time in the system with PDF FT (t), pdf fT (t) and LT FT (s);
• Q: waiting time prior to service with PDF FQ(t), pdf fQ(t) and LT FQ(s);
• X: service time with PDF B(t), pdf b(t) and LT B(s).
We are looking for: distributions of T and Q.
Lecture: GI/M/1 queuing system 21
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
ti
n
t
Q: waiting time prior to service
W: waiting time in the system
FCFS service discipline
Figure 8: Waiting time and time prior to service in GI/M/1 queuing system.
To determine total delay use the following:
• we know distribution as seen by arrival;
• we know that service times are exponential;
• use convolution to obtain time needed to serve customers which arrival sees.
Lecture: GI/M/1 queuing system 22
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Do the following:
• note that it is better to work in transform domain:
– sum of RVs is given by convolution;
– property: LT of the convolution is the product of individual LTs.
• we get for the total delay:
FT (s) =∞∑n=0
pn
(µ
µ+ s
)n+1
. (32)
Substituting pn = (1− σ)σ2 we get LT FT (s):
FT (s) =∞∑n=0
(1− σ)σn(
µ
µ+ s
)n+1
=
=µ(1− σ)
µ+ s
∞∑n=0
(µσ
µ+ s
)n=
=µ(1− σ)
µ(1− σ) + s. (33)
Lecture: GI/M/1 queuing system 23
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Observe the latter result:
FT (s) =µ(1− σ)
µ(1− σ) + s. (34)
• one may recognize LT of exponential with with parameter µ(1− σ):
FT (t) = Pr{T ≤ t} = 1− e−µ(1−σ)t, t ≥ 0. (35)
Note the following:
• total waiting time is almost the same as for M/M/1 (replace ρ by σ).
We may use the same approach to get FQ(t):
FQ(t) = Pr{Q ≤ t} = 1− σe−µ(1−σ)t, t ≥ 0. (36)
Note: probability that customer has to wait is (1− σ)!
Lecture: GI/M/1 queuing system 24
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
4.1. Mean sojourn time
How to get:
• estimate directly from FT (t);
• compute using mean values approach.
Note that according to Little’s result we have:
E[N ] = λE[T ]. (37)
Note the following:
• arrivals are not Poisson and PASTA property does not hold:
E[NA] 6= E[N ]. (38)
For arbitrary arriving customer we have:
E[T ] = E[NA]1
µ+
1
µ, (39)
• E[NA] is the mean number of customers in the system as seen by arrival.
Lecture: GI/M/1 queuing system 25
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
How to get NA?
Express E[NA] considering steady-state distribution at arrival time:
E[NA] =∞∑n=0
npn =∞∑n=0
n(1− σ)σn =σ
1− σ. (40)
Substitute this result into E[T ] = E[NA](1/µ) + 1/µ to get:
E[T ] =σ
(1− σ)µ+
1
µ=
1
(1− σ)µ. (41)
Now we can get the mean number of customers in the buffer as follows:
E[N ] =λ
(1− σ)µ=
ρ
(1− σ). (42)
Lecture: GI/M/1 queuing system 26
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
5. GI/M/m queuing systemGI/M/m queuing system is characterized by:
• generally distributed interarrival times.
• exponentially distributed service times;
• multiple identical servers;
• infinite capacity: infinite number of waiting positions.
We also assume that:
• FCFS service discipline when needed:
– mean waiting time is the same for all disciplines;
– PDF and pdf may be different!
Note: GI/M/m is exactly opposite to what we had for M/G/m queuing system.
Lecture: GI/M/1 queuing system 27
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
5.1. Arrival and service processes
Arrival process:
• renewal arrivals with mean value λ;
• interarrival times are 1/λ;
• PDF, pdf and LT are:
A(t), a(t), A(s). (43)
Service process:
• service times are exponential with mean 1/µ;
• PDF, pdf and LT are:
B(t) = 1− e−µt, b(t) = µe−µt, B(s) =µ
s+ µ. (44)
Lecture: GI/M/1 queuing system 28
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
5.2. Direct approach based on imbedded Markov chains
Let ρ be offered traffic load to G/M/m queuing system:
ρ =λ
mµ. (45)
Note: for GI/M/m queuing system to be stable we require ρ < 1.
State of the system:
• we consider number of customers just before arrivals at times ti, i = 0, 1, . . . ;
• note that arriving customer does not included!
...Arrivals
...
1
m
Figure 9: Graphical representation of GI/M/m queuing system.
Lecture: GI/M/1 queuing system 29
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Define the following:
• denote the number of customers in the system at time ti by ni, i = 0, 1, . . . ;
• process of ni changes constitutes a imbedded continuous-time Markov chain.
ti ti+1
just before just before
nini+1
ni+1
(i+1)th
interarrival time
si+1
ni+1+1
Figure 10: Interarrival time between two successive imbedded time points.
Note: the only difference compared to GI/M/1 is that customers are served by m servers.
Lecture: GI/M/1 queuing system 30
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Define steady-state probabilities as seen by arrival:
qj, j = 0, 1, . . . . (46)
These probabilities should satisfy the following balance equations at t→∞:
qj =∞∑
i=j−1
qiqij, j = 0, 1, . . . . (47)
• qij are transition probabilities from i to j between successive imbedded Markov points.
0 1 n-2 n-1 n n+1...
n,n 1q
+
n,1q
...n,n-1
q
n,n-2q
n,0q
Figure 11: Transition diagram of imbedded Markov chain.
Lecture: GI/M/1 queuing system 31
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
Steady-state probabilities must also satisfy normalizing condition:
∞∑j=0
qj = 1. (48)
What we should do to get: qj, j = 0, 1, . . . :
• we have to get transition probabilities qij;
• to get qij we have to determine the number of service completions in interarrival time.
Consider two arrival time instants ti and ti+1:
• assume that i customers exist in the system just before time ti and (i+ 1) just after;
• probability that (i− j + 1) customers are served during interarrival time:
– integrate over all possible number of arrivals (Poisson: mµ) during interarrival time:∫ ∞0
(mµx)(i−j+1)
(i− j + 1)!e−mµxa(x)dx, m ≤ j ≤ i+ 1. (49)
– this results in exactly j customers prior to time instant ti+1.
Lecture: GI/M/1 queuing system 32
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
5.3. Some performance parameters of GI/M/m queuing system
Probability that arriving customer has to wait:
PW =∞∑i=m
qi. (50)
• since this event may only occur when all servers are busy;
• note that we use steady-state distribution as seen by arrival.
PF of the number of customers ahead in the queue given that the customers waits:
• tag an arbitrary customer arriving to the queue;
• letting n be the number of customers prior to this arrival, we have:
Pr{n = j∣∣n ≥ m} =
Pr{n = j⋂n ≥ m}
Pr{n ≥ m}=qm+j
PW, j = 1, 2, . . . . (51)
• using previous result for probability that an arriving customer has to wait we get:
Pr{n = j∣∣n > m} =
qm+j∑∞i=m qi
, j = 1, 2, . . . . (52)
Lecture: GI/M/1 queuing system 33
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
6. Note on results for GI/M/-/-/-Notes on results we got for GI/M/-/-/- queuing system:
• we got steady-state probabilities of the number of customers as seen by arrival;
• we got waiting time directly:
– thanks that imbedded points are just before arrivals.
• we got time-averaged parameters indirectly!
Observing GI/M/s queuing system one can claim that:
• Klienrock principle holds:
– obtained distribution is the same as the distribution seen by departure.
• PASTA property does not hold:
– at this time we cannot say what is the distribution at arbitrary time t.
Question: how to get distribution at arbitrary time t?
Lecture: GI/M/1 queuing system 34
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
7. Rate conservation law for GI/M/-/-/- queuesConsider a system with following parameters:
• customers arrive in a renewal arrival process with rate λ;
• each customer require exponentially distributed service time with mean µ−1;
• system has m, m ≥ 1 servers.
Let us denote by:
• pj: steady-state probability that there are j customers in the system at arbitrary time;
• qj: steady-state probability that there are j customers in the system just before arrival.
For considered system the following rate conservation law holds:
λqj−1 = jµpj, j ≤ m, loss system,
λqj−1 = jµpj, j ≤ m, delay system,
λqj−1 = mµpj, j > m, delay system. (53)
Lecture: GI/M/1 queuing system 35
Network analysis and dimensioning I D.Molthchanov, TUT, 2013
7.1. Rate conservation law for loss system
Consider loss system:
• example: GI/M/1/K;
• example: GI/M/m/m, etc.
Think as follows:
• let Sj denote j customers in the system;
• qj−1 is the probability that j − 1 customers just prior to arrival and λ is the arrival rate:
Sj−1 → Sj. (54)
• at the same time RHS represents rate:
Sj → Sj−1 (55)
• both sides must be balanced at steady-state:
λqj−1 = jµpj. (56)
Lecture: GI/M/1 queuing system 36