Queue

queue theory

  • performance evaluation

    • λ\lambda average arrival rate, packets per second
    • μ\mu average service rate, packets servered per second
    • cc number of servers
    • ρ=λ/cμ\rho = \lambda/c\mu traffic congestion in servers
      • if >1 averge exceeds service capability
      • if = 1 randomness prevents queue from emptying
    • pnp_n is probability of a particular number n customers in the system
    • expected number in system: L=(npn)L = \sum(n p_n)
    • expected number in queue: L=n=c+1((nc)pn)L = \sum_{n=c+1}((n-c) p_n)
    • time : T=Tq+ST = T_q + S time in queue + service time
    • little law
      • W=E[T]Wq=E[Tq]W = E[T] W_q = E[T_q] mean waiting time in system
      • L=λWL = \lambda W
      • E[T]=E[Tq]+E[S]E[T] = E[T_q] + E[S] to get W=Wq+1/μW = W_q + 1/\mu
      • expected servered people: E[Ns]=LLq=λ(WWq)=λ(1/μ)=λ/μE[N_s] = L-L_q = \lambda(W-W_q) = \lambda(1/\mu) = \lambda/\mu
      • c=1,r=ρ,LLq=n=1npn=1(n1)p=n=1pn=1p0=ρc = 1, r = \rho , L-L_q = \sum_{n=1} np- \sum_{n=1} (n-1)p = \sum_{n=1} p_n = 1-p_0=\rho
    • busy probability
      • for G/G/c system, E[Ns]=rE[N_s] = r
      • Pb=ρP_b = \rho one server being busy brobability
      • ...
  • rate transition diagrams

    • a type of continuous-time Markov chain
    • (λn+μn)pn=(λn1+μn1)pn1+(λn+1+μn+1)pn+1(\lambda_n+\mu_n)p_n =(\lambda_{n-1}+\mu_{n-1})p_{n-1}+(\lambda_{n+1}+\mu_{n+1})p_{n+1}
    • $p_3 = \frac{\lambda_2 \lambda_1 \lambda_0}{\mu_3 \mu_2 \mu_1} p_0 $
    • pn=i=1nλi1μip_n = \prod_{i=1}^n\frac{\lambda_{i-1}}{\mu_i}
  • M/M/1 system

    • Exponentially distributed
      • interarrival time TI(t)=λeλtTI(t)=\lambda e^{-\lambda t}
      • service time TI(t)=μeμtTI(t)=\mu e^{-\mu t}
    • if all μ\mu and λ\lambda equal get pn=p0(λμ)np_n = p_0 (\frac{\lambda}{\mu})^n
    • p0=1ρp_0 = 1-\rho - > pn=(1ρ)ρnp_n = (1-\rho)\rho^n