EEL6507sp09L32
From BoykinWiki
Contents |
EEL6507 Spring 2009, Lecture 32, Monday 2009/04/06 (Notes created by Dexiang Wang)
- Solving for expected system size (number of customers) in M/G/1 queues.
Pollaczek-Khinchine
- What is the average system size?
- Dynamics of M/G/1 queues:

- Introduce Δk :

- We get:

- Now, we want:
![\lim_{n\rightarrow \infty} E[q_n]=average\ number\ in\ system\ in\ steady\ state\](/wiki/images/math/5/a/7/5a75377171bc3d829affa10a50a69975.png)
Moments/Expectations
- When system is ergodic, we have following hold (can be proved outside class):
![\lim_{n\rightarrow \infty} E[q_n^j]=E[q^j],\quad q=random\ variable\ in\ steady\ state](/wiki/images/math/c/d/2/cd218689dab0bd86c4323a04256a4871.png)
- How should we use this property?
- Trick: look at moments of the equation!
- We square both sides of
:


- Take expectations on both sides:
![E[q_{n+1}^2]=E[q_n^2]+E[\Delta_{q_n}^2]+E[v_{n+1}^2]-E[2q_n\Delta_{q_n}]+E[2q_nv_{n+1}]-E[2\Delta_{q_n}v_{n+1}]\](/wiki/images/math/7/1/4/7146cb525627f2362020c965a74ba8d3.png)
- We need to evaluate following terms:
![\begin{align}
E[\Delta_{q_n}^2]&=Prob[q_n=0]\times0+Prob[q_n>0]\times1\\
&=Prob[busy] \\
&=\rho \\
E[q_n\Delta_{q_n}]&=\sum_{r=0}^\infty Prob[q_n=r]r\Delta_r\\
&= E[q_n]\\
E[q_nv_{n+1}]&=\sum_{r=0}^\infty \sum_{w=0}^\infty Prob[q_n=r,v_{n+1}=w]rw \\
&= \sum_{r=0}^\infty \sum_{w=0}^\infty Prob[q_n=r]Prob[v_{n+1}=w]rw \\
&= E[q_n]E[v_{n+1}]\\
&(q_n\ independent\ of\ v_{n+1})\\
Similarly,\\
E[\Delta_{q_n}v_{n+1}]&= E[\Delta_{q_n}]E[v_{n+1}]\\
&=\rho E[v_{n+1}]
\end{align}](/wiki/images/math/c/f/a/cfa0e0c982749bcbcffce9603c9c9452.png)
- Plug above evaluations back into above linear incremental equation, we get:
![E[q_{n+1}^2]=E[q_n^2]+\rho+E[v_{n+1}^2]-2E[q_n]+2E[q_n]E[v_{n+1}]-2\rho E[v_{n+1}]\](/wiki/images/math/6/5/7/657921837c1d47156bdadf3ffcebd8e8.png)
- Take limit on both sides
:
![0=\rho+E[v^2]-2E[q]+2E[q]E[v]-2\rho E[v]\](/wiki/images/math/4/9/5/4952fce2153666de05770306be6ec351.png)
- And we already know:
![E[v]=V'(1)=\left \langle X \right \rangle\lambda=\rho](/wiki/images/math/a/f/8/af8b4ecf06334413e190445aa1ba2158.png)
- Finally, we get:
![\begin{align}
E[q]&=\frac{\rho}{2(1-\rho)}+\frac{E[v^2]-2\rho^2}{2(1-\rho)}\\
&=\frac{E[v^2]+\rho-2\rho^2-\rho+\rho}{2(1-\rho)}\\
&=\frac{2\rho(1-\rho)+E[v^2]-E[v]}{2(1-\rho)}\\
&=\rho+\frac{E[v^2-v]}{2(1-\rho)}\\
&=V'(1)+\frac{V''(1)}{2(1-V'(1))}
\end{align}](/wiki/images/math/4/e/7/4e7b3f4abcc869328947ea119539ff2e.png)
Connect Mean Queue Length to B * (s)
- P-K transform equation:


- So, we have:
![E[q]=\rho+\frac{\left \langle (\lambda X) ^2 \right \rangle}{2(1-\rho)}](/wiki/images/math/2/e/5/2e5177e595da2079b9d257442d703aca.png)
- Remember:

- We can rewrite
as:
![\begin{align}
E[q]&=\rho+\frac{\lambda^2\left \langle X \right \rangle ^2 + \lambda^2\sigma_b^2}{2(1-\rho)}\\
&=\rho+\frac{\rho ^2}{2(1-\rho)}(1+C_b^2)
\end{align}](/wiki/images/math/4/0/7/407fbbebab83931cd5e506949b4d9343.png)
Verification with M/M/1 Queue
- For M/M/1 queue, we have:

- Then,
![\begin{align}
E[q]&=\rho+\frac{\rho^2}{2(1-\rho)}\\
&=\rho+\frac{\rho ^2}{2(1-\rho)}(1+1^2)\\
&=\frac{\rho}{1-\rho}\\
&=\sum_{k=0}^{\infty}k\rho^k(1-\rho)\\
&=\bar{N}\\
which\ is\ the&\ same\ as\ we\ derived\ before
\end{align}](/wiki/images/math/1/8/d/18deda690b5327bb82b161e93eb3cbc9.png)
Expected System Size for M/D/1
- For M/D/1 queue, we have:

- Hence,
![\begin{align}
E[q]&=\rho+\frac{\rho^2}{2(1-\rho)}\\
&=\frac{2\rho-\rho^2}{2(1-\rho)}\\
&=\frac{\rho}{1-\rho}-\frac{\rho^2}{2(1-\rho)}\\
which\ gives\ us\ a\ smaller&\ expected\ queue\ length\ than\ M/M/1\ queue\ gives\ us
\end{align}](/wiki/images/math/0/4/4/044e74356093be7e6108bcf35c649d41.png)
