Chapter3: Delay model:
//-------------------------------------------------------------------------
3.1 introduction
multiplexing: TDM, FDM, statistical multiplexing.
//-------------------------------------------------------------------------
3.2 queuing models - little's theorem
Very general, very important
N=λT
N: average/typical number of customers in the system
T: average delay in the system
λ: arrival rate.
example1:
P{a server is busy} = λ * {average service time}
//-------------------------------------------------------------------------
3.3 MM1
TOOL: Markov chain.
main results:
ρ=λμp0=1−ρpn=ρn(1−ρ)N=ρ1−ρT=NTW=T−1μNQ=N−ρ=λW
An every interesting question to ask is:
"is the queue typical seen by an arrival?".
it is possible to be non-typical, for example, deterministic arrival 1/min, service time 0.5 min,
average system N = 0.5
however, the customer in system seen by an arrival is always 0.
conclusion:
an : occupancy distribution upon arrival
pn : steady state occupancy distribution
dn : occupancy distribution upon departure.
if arrival process is poisson: an=pn.
if markov process is a birth death process: dn=an.
//-------------------------------------------------------------------------
3.4 MMm, MMinfty, MMmm
MMm
Markov chain solve for steady state distribution, pn.
define queueing probability:
Pqueueing=∑∞n=mpn
known as Erlang C formula, honoring Denmark's A.K. Erlang.
ρ=λmμNQ=PQρ1−ρW=NQ/λT=W+1μN=λT
note the connection with MM1 here.
explanation: for those who come and join the queue, the system works like mμ superserver. Write down the MarkovChain for the number of customers waiting in the queue, then it is same as MM1 system.
M/M/∞
This case is very interesting, because:
pn=(λμ)ne−λμn!⇒Poisson(λμ)
What is system delay? No queuing time !!!! W = 0
T=1μN=λμNQ=0W=0
Intuitively.
M/M/m/m Loss system
again, our tool is markov chain, solve for pn.
actually, there is an easier way. This is a truncated MM∞ case, for those who are accepted, the system indeed has ∞ servers. Everything stays the same except for a normalization constant.
and note the common term e−λμ cancels.
p0=[m∑n=0(λμ)n1n!]−1pn=p0(λμ)n1n!
The most important quantity is the blocking probability (Erlang B formua): pm.
with such probability, any new arrival seen m customer already in system, and it will be rejected.
//-------------------------------------------------------------------------
3.5 MG1
Most important formula: Pollaczek - Khinchin formula. PK formula.
ˉX=average service time¯X2=second moment of average service timeW=λ¯X22(1−ρ)
other quantities can be found using Little's law.
example1:
MM1
ˉX=1μ⇒E[X2]=2μ2W=ρμ−λ
MD1
E[X2]=E[X]2=1μ2⇒W=ρ2(μ−λ)
we note MD1 has only half the queuing delay than the MM1.
FOLK's law: the more random, the more delay.
Proof of PK formula by the author of the book.
how long will a new arrival has to wait in queue?
W=R+1μNQ
R: mean residual time.
NQ: number of customer in queue seen by arrival.
using little law: NQ=λ∗W
W=R1−ρ
What is R?
in the interval [0,t], M(t) is the number of service completed.
1t∫t0r(τ)dτ=1tM(t)∑i=1x2i2=M(t)tM(t)∑i=1x2i2M(t)R=λE[X2]2
by letting t→∞
MG1 with vacation.
At the end of busy period(with probability 1−ρ), a server that goes to vacation from time to time, with
E[V]: average vacation time.
E[V2]: second moment of average vacation time.
We note that service time and vacation time are almost indistinguishable.
Treat R as "residual service time or vacation time."
The derivation is similar to the proof of PK formula:
R=limt→∞M(t)tM(t)∑i=1X2i2M(t)+L(t)tL(t)∑i=1V2i2L(t)=λE[X2]2+(1−ρ)E[V2]2E[V]L(t)t→1−ρE[V]
where L(t) is the number of vacation completed during [0, t].
Basically, the vacations increase p0, however, the system can still be viewed as two subsystems:
1. when the system is working, this gives the first part of the R.
2. w.p. 1−ρ, the system goes to vacation, leading to the second part of the R.
finally:
W=λE[X2]2(1−ρ)+E[V2]2E[V]
MG1 with reservation.
let consider only a single user, for the i th packet:
1. R: residual till the end of the current transmission, which could either be really transmission or reservation making.
2. N*E[X]: transmission of the before-coming packets.
3. V: (denoted same as vacation) it must wait a full reservation slot, in which its reservation is made.
The system is designed s.t. before its transmission, there bound to be a reservation slot.
again
V←E[V]R←λE[X2]2+E[V2]2E[V](1−ρ)W=R+V1−ρ=λE[X2]2(1−ρ)+E[V2]2E[V]+E[V]1−ρ
This is fully gated system, meaning ony those packets that arrived prior to the user's preceding reservation interval are transmitted.
therefore every packet has to experience a full reservation slot.
Exhaustive system: all available packets of a user are transmitted during the corresponding data interval.
partially gated system: transmit those packets arrived up to the beginning of the data interval.
Note the exhaustive system is equivalent to the vacation system, only those who arrive see vacation/reservation have to wait.
Priority queuing MG1
non-preemptive: high class CANNOT interrupt low class at service.
preemptive: high class interrupt low class at service, no resumption for the low class. 臭流氓!
Assuming class 1 has the highest priority, class n has the lowest.
non-preemptive is easier:
μi λi are different.
during the waiting of class2, those later-comer class 1 will jump the queue!
W1=R+N1Qμ1N1Q=λ1W1W1=R1−ρ1"class 1 jump the queue while class 2 waiting"W2=R+N1Qμ1+N2Qμ2+λ1W2μ1W2=R(1−ρ1)(1−ρ1−ρ2)"finally"Wk=R(1−ρ1−…−ρk−1)(1−ρ1−…−ρk)"R like a weighted sum"R=12n∑i=1λiE[X2i]
The calculation involves all class 1 - n, because it is a non-preemptive system.
preemptive system:
The arrival sees the system as a MG1, ignoring the class (k+1) to n.
Wk=Rk1−ρ1−…−ρkRk=∑ki=1λiE[X2i]2
an explanation for this.
If we only consider the first k class, the capacity assigned to class k is no longer ρk, but a normalized one:
ρkρ1+…+ρk
therefore the service time becomes:
μk⇒μkρkρ1+…+ρk
which is a improvement, because the denominator is less than 1.
finally.
Wk=Rk+NkQρ1+…+ρkρkμk=Rk+λkWkρ1+…+ρkρkμk=Rk+(ρ1+…+ρk)Wk
This leads to the same result.
//-------------------------------------------------------------------------
3.6 networks of transmission lines.
//-------------------------------------------------------------------------
3.7 time reversibility - Burke's theorem
backward transition probability:
P∗ij=P(Xm=j|Xm+1=i)=pjPjipi
definition:
The markov chain is time reversible if P∗ij=Pij, forward and backward transition happens with equal probability.
Chain is time reversible if and only if: piPij=pjPji,(local balance equation) which is true for birth death process, all M/M/*.
Burke's theorem:
consider M/M/* system, with arrival rate λ, suppose system starts from steady state, then:
1. the departure rate is Poisson with λ.
2. at each time t, N in the system is independent of the sequence of departure times prior to t.
Proof: Since the chain is TR.
1. arrival and departure are indistinguishable.
(which also proves for birth death process, dn=an)
2. at time t, N is is independent of the arrival sequence after t.
example: two MM1 in tandem.
the first queue is MM1 by nature.
the departure process of queue 1 is independent of the service time of queue2, therefore queue2 is also MM1. (the queue2 is not a MM1, it just happens behave like a MM1)
by part b of Burke's, at time t, N1 in queue1 is independent of prior to t departure, also of the N2 of queue2.
P[N1=n,N2=m]=P[N1=n]P[N2=m]
//-------------------------------------------------------------------------
3.8 Networks of queues - Jackson's theorem.
solve linear system:
λj=rj+K∑i=1λiPij
then ρj=λjμj
assuming that ρj<1, for all j, then
P(n)=K∏j=1ρnj(1−ρj)
as if they were all independent MM1.
closed Jackson's theorem
first, for state independent system:
solve the linear system:
λj=K∑i=1λiPij
define
ρj=λjμj
j = 1, ..., K
G(M)=∑n1+n2+…+nK=Mρn11ρn22…ρnKK
Closed Jackson network:
under the preceding assumption
P(n1,n2,…,nK)=ρn11ρn22…ρnKKG(M)
where G(M) can be viewed as a simple normalization constant.
The key is:
1. solve for the internal arrival rates.
2. treat each queue like independent MM1.
//-------------------------------------------------------------------------end
No comments:
Post a Comment