310 likes | 923 Views
Shanghai Jiao Tong University. M/G/1 queue. M/G/1 queue. The M/G/1 queue. G eneral service time distribution - i.i.d (identical independent distribution) Service time is independent from arrival = 1/ μ , average service time : Second moment of service time, <∞ .
E N D
Shanghai Jiao Tong University M/G/1 queue
M/G/1 queue The M/G/1 queue • General service time distribution • - i.i.d (identical independent distribution) • Service time is independent from arrival • = 1/μ, average service time • : Second moment of service time, <∞ Poisson Arrival rate λ: Markovian Poisson arrivals M/G/1 General independent service times
Pollaczek-Khinchin (P-K) formula Applying Little’s Theorem W: Average waiting time in queue , Number of customers in queue Average system time: queueing delay + service time Again Little’s Theorem, we get the number of customers in system
M/G/1 examples • Example 1: M/M/1 • Example 2: M/D/1 Deterministic service time: 1/μ • Waiting time of M/D/1 is half of M/M/1, in fact the results of M/G/1 is a lower bound for all M/G/1 with same λ and μ
Proof of P-K formula • Suppose customer i arrives to the system and finds • Ni customers waiting in queue • Up to one customer receiving service • And also define: • Ri: the residual service time seen by i • Wi: the waiting time in queue of customer i Xi Customer i arrives Xi-1 Xi-2 Xi-3 Xi-4 Ni =3
Proof of P-K formula (Cont.) Customer i starts to receive service Customer i arrives Wi Xi Xi-1 Xi-2 Xi-3 Xi-4 Ri Ni =3 By Little’s Theorem, ,
R – The average residual service time R(t) residual service time • Average residual service time is the sum of area of the triangles divided by time t • X3 • X1 • X2 • X4 t • X3 • X4 • X1 • X2 Let M(t) = the number of customers served by time t As is the average departure rage, and is equal to arrival rate λ Hence, The P-K formula is then proved.
R in M/M/1 • For M/M/1, we already know that • So,R for M/M/1 is: • Why it is not equal to 1/μ, given the PASTA property? R(t) residual service time • X3 • X1 • X2 • X4 t • X3 • X4 • X1 • X2
M/G/1 with vacations • Once the system is empty, the server takes a vacation • If system is still empty after the vacation, the server takes another vacation • Useful in analyzing some polling and reservation systems • Vacation times are i.i.d and independent of service times and arrival times • The only impact on analysis is that a customer may enter to find the server on vacation, and must wait until end of that vacation Customer i arrives Wi Xi Xi-1 Xi-2 Xi-3 Vi Ni =3
R(t) with vacations R(t) residual service time • A customer will always experience some residual time, either because server is on vacation, or is serving a customer • X3 • X1 • X2 • X4 t • X3 • X4 • X1 • X2 • V1 • V2 • V3 Let M(t) = the number of customers served by time t L(t) = the number of vacations taken by time t
R(t) with vacations (cont.) • From the server’s point of view, And we have , ? • Hence, And
Example: Slotted M/D/1 system • Fixed slot duration 1/ μ • Service can begin only at start of a slot • If a customer misses the slot start, it must wait until next start (slot in vacation) 1/μ E[X] = E[V] = 1/μ E[X2] = E[V2] = 1/μ2 • This part of time is spent waiting for the slot (syncronizing)