Salta al contenuto
Note per Studenti Introduction to Queueing Theory Report

Introduction to Queueing Theory

In questa pagina 6

Why it is needed

In Network Performance AnalysisNetwork performance is measured by traffic metrics (bitrate R0, the link maximum; throughput S <= R0, data delivered successfully; goodput at the application layer), delay (end-to-end d = d_proc + d_queue + d_trans + d_prop with d_trans = L/R and d_prop = d/v; jitter; RTT), pipe capacity (BDP = rate times delay) and reliability (PER, PDR, PLR). The throughput of a path is that of its bottleneck link, the minimum bitrate, remembering that shared links split their capacity.Network Performance Analysis → the queueing delay dqueued_{queue} was set aside: it depends on the traffic intensity, not only on link characteristics. To compute it, and to estimate the delay of the medium access protocols (Performance of Multiple Access ProtocolsWith Poisson arrivals, the success probability of a frame is the probability that no other frame arrives in the vulnerable time: pure ALOHA P_S = e^(-2G), throughput S = G e^(-2G) with maximum 1/(2e) = 0.18 at G = 1/2; slotted ALOHA S = G e^(-G) with maximum 1/e = 0.37 at G = 1; non-persistent CSMA with a = tau_p/t_F: S = G e^(-aG) / (G(1+2a) + e^(-aG)), which tends to 1 as a tends to 0 but collapses for large a, where slotted ALOHA is better. For TDMA (M/D/1) E[T] = t_F (N_u/2 + S N_u / (2(1-S)) + 1 + a) and for FDMA E[T] = t_F (N_u + S N_u / (2(1-S)) + a): FDMA is slower by t_F (N_u/2 - 1).Performance of Multiple Access Protocols →) or the jitter, the link is modelled as a queueing system (QS).

The treatment has three parts: (1) notation and definition of a queueing system, (2) performance metrics, (3) selected results (Little's law, the M/M/1 queue, the M/G/1 queue). Proofs are given only for Little's law and for the M/M/1 and M/D/1 formulas.

Part 1: the model

Definition (queueing system). A population of customers (in networks: data packets) arrives at a system made of a queue (buffer, waiting room) and a service facility with mm servers. Customers leave after service (departure process).

The arrival process

Customers arrive according to a random process. An infinite population is assumed: new arrivals are not affected by past ones (memorylessness). Customer CnC_n is the nn-th:

  • arrival instant of CnC_n: tnt_n;
  • interarrival time between Cn−1C_{n-1} and CnC_n: τn=tn−tn−1\tau_n=t_n-t_{n-1};
  • assumption: the τn\tau_n are independent and identically distributed (i.i.d.) with common distribution function Pτ(a)=P[τn≤a]P_\tau(a)=P[\tau_n\le a], a≥0a\ge0.

The counting process A(t)A(t) gives the number of arrivals up to time tt. If interarrivals are i.i.d. the process is homogeneous, and with E[τ]E[\tau] the mean interarrival time the arrival rate is λ≜1E[τ][customers/s].\lambda\triangleq\frac1{E[\tau]}\quad[\text{customers/s}].

Poisson arrivals. Only the homogeneous Poisson process of rate λ\lambda is considered. The number of arrivals in an interval of duration τ\tau is Poisson with parameter λτ\lambda\tau. The interarrival time follows: "the next arrival comes after more than aa seconds" equals "no customer arrives in aa seconds", with probability e−λae^{-\lambda a} (Poisson with k=0k=0). So P[τ>a]=e−λaP[\tau>a]=e^{-\lambda a}, Pτ(a)=1−e−λaP_\tau(a)=1-e^{-\lambda a}: the interarrival time is exponential (mean 1/λ1/\lambda): pτ(a)=λe−λa,Pτ(a)=1−e−λa,a≥0.p_\tau(a)=\lambda e^{-\lambda a},\qquad P_\tau(a)=1-e^{-\lambda a},\qquad a\ge0. The probability that exactly kk customers arrive in an interval of duration τ\tau is P(k,τ)≜e−λτ(λτ)kk!.P(k,\tau)\triangleq\frac{e^{-\lambda\tau}(\lambda\tau)^k}{k!}.

Example. Packets with λ=2\lambda=2 per second: mean interarrival E[τ]=1/2=0.5E[\tau]=1/2=0.5 s. In τ=1.5\tau=1.5 s the mean number of arrivals is λτ=3\lambda\tau=3, and P(k,τ)=e−33k/k!P(k,\tau)=e^{-3}3^k/k! with e−3=0.0498e^{-3}=0.0498: no arrival e−3=0.0498e^{-3}=0.0498; exactly 11: 3e−3=0.14943e^{-3}=0.1494; exactly 22: 92e−3=0.2240\frac{9}{2}e^{-3}=0.2240; exactly 33: 276e−3=0.2240\frac{27}{6}e^{-3}=0.2240. The k=0k=0 formula is exactly the one that gives the success probability of ALOHA (e−2Ge^{-2G}, e−Ge^{-G}): no other frame must arrive in the vulnerable time.

Grafico interattivo: Exponential interarrival time with lambda = 2 per second: density 2e^(-2a) (decreasing, equal to 2 at a = 0) and cumulative distribution 1 - e^(-2a); the mean is 0.5 s and the probability of an interarrival <= 0.5 s is 1 - e^(-1) = 0.632

The service process

The service facility has one or more servers working in parallel and independently. The service time of CnC_n is the time yny_n spent in the facility; service times are i.i.d. random variables, independent of the arrival process. The service rate of one server is μ≜1E[y][customers/s],\mu\triangleq\frac1{E[y]}\quad[\text{customers/s}], and with mm servers in parallel it is mμm\mu.

Common service-time distributions:

  • deterministic: constant time 1/μ1/\mu; the cumulative distribution is a step. It is the case of a link sending packets all of the same length: 1/μ=tF=F/R1/\mu=t_F=F/R;
  • exponential: py(a)=μe−μap_y(a)=\mu e^{-\mu a}, Py(a)=1−e−μaP_y(a)=1-e^{-\mu a} (exponentially distributed packet length). Mean E[y]=1/μE[y]=1/\mu and second moment E[y2]=2/μ2E[y^2]=2/\mu^2 (variance 1/μ21/\mu^2), values needed for the Pollaczek-Khinchin formula.

The queue structure

  • Queue capacity QQ: the maximum number of customers that can wait (for packets: those that fit in the buffer).
  • System storage capacity KK: the maximum number of customers in the system (queue or service): K=m+QK=m+Q.
  • Blocking systems: if KK is finite, customers finding the system full do not enter (blocking probability PblkP_{blk}). The rates of accepted and discarded customers are λa=λ(1−Pblk),λd=λ−λa=λPblk.\lambda_a=\lambda(1-P_{blk}),\qquad\lambda_d=\lambda-\lambda_a=\lambda P_{blk}.
  • Non-blocking systems: infinite buffer. Example: one server and infinite queue.

Service discipline: the order in which customers leave the queue. The most common are FCFS (First Come First Served, also FIFO, the one used in the mathematical analysis), LCFS (Last Come First Served, LIFO) and queues with priorities.

Kendall notation. A queueing system is described by A / B / C / K / N − SA\,/\,B\,/\,C\,/\,K\,/\,N\,-\,S where AA is the statistical model of interarrivals, BB that of service, CC the number of servers, KK the capacity, NN the population size and SS the discipline. KK, NN, SS are optional: if missing, KK and NN are infinite and the discipline is FCFS. AA and BB are typically M (Markovian, exponential/Poisson), D (deterministic), G (general).

Example. M/M/1: Poisson arrivals, exponential service, one server, infinite queue, FCFS. M/D/1: Poisson arrivals, deterministic service. M/G/1: Poisson arrivals, service with any distribution.

Occupancy measures

At time tt: q(t)q(t) customers in the waiting queue; z(t)z(t) in service; x(t)x(t) in the whole system, with x(t)=q(t)+z(t)=A(t)−D(t)x(t)=q(t)+z(t)=A(t)-D(t) (D(t)D(t) = departures up to tt).

Definition (stability). A QS is stable if it admits a proper asymptotic distribution px(n)p_x(n), n=0,1,2,…n=0,1,2,\dots, for x(t)x(t), independent of the initial state x(0)x(0). If it is identically zero or depends on the initial state, the QS is unstable.

Part 2: the metrics

Stability for non-blocking systems. Customers must arrive, on average, at a rate smaller than the rate at which they can be served: λ<mμ.\lambda<m\mu. If λ>mμ\lambda>m\mu the queue grows indefinitely, accumulating at the average rate λ−mμ\lambda-m\mu. Blocking systems are always stable, since the number of customers is bounded by KK.

Time measures

  • wnw_n: waiting time of CnC_n (time in the buffer before service);
  • yny_n: service time;
  • sns_n: system time, the total time spent in the system.

With dnd_n the departure instant: sn=dn−tns_n=d_n-t_n, sn=wn+yns_n=w_n+y_n.

Traffic measures

  • Arrival rate λ\lambda: mean number of arrivals per unit time.
  • Offered traffic GG: mean number of arrivals during the mean service time,

    G=λμ=λE[y].G=\frac\lambda\mu=\lambda E[y].

  • Throughput η\eta (departure rate): mean number of customers leaving the system per unit time. With rn=dn−dn−1r_n=d_n-d_{n-1} the interdeparture time, η=1/E[r]\eta=1/E[r].
  • Useful traffic SS: mean number of departures during the mean service time, i.e. the throughput normalized to the service rate: S=ημ=ηE[y](S∈[0,1] for a single server).S=\frac\eta\mu=\eta E[y]\qquad(S\in[0,1]\text{ for a single server}).
  • Load factor (utilization, traffic intensity) ρ\rho, with mm servers:

    ρ=E[y]mE[τ]=λmμ=Gm.\rho=\frac{E[y]}{mE[\tau]}=\frac\lambda{m\mu}=\frac Gm.

The stability condition λ<mμ\lambda<m\mu is equivalent to ρ<1\rho<1. For a stable, non-blocking system the output rate equals the input rate, so: η={λρ<1 (stable)mμρ≥1 (unstable: servers work at maximum)S={Gρ<1mρ≥1\eta=\begin{cases}\lambda&\rho<1\ \text{(stable)}\\ m\mu&\rho\ge1\ \text{(unstable: servers work at maximum)}\end{cases}\qquad S=\begin{cases}G&\rho<1\\ m&\rho\ge1\end{cases}

Example. A 11 Mbit/s link sends 10001000-bit packets: μ=1000\mu=1000 packets/s (E[y]=tF=1E[y]=t_F=1 ms). If λ=800\lambda=800 packets/s arrive: G=ρ=0.8G=\rho=0.8, throughput η=800\eta=800 packets/s, useful traffic S=0.8S=0.8. If λ=1200\lambda=1200 packets/s arrived: ρ=1.2≥1\rho=1.2\ge1, unstable; only η=μ=1000\eta=\mu=1000 packets/s leave (S=1S=1) and the queue grows by 200200 packets per second.

Part 3: Little's law

Theorem (Little's law). The mean number of customers E[x]E[x] in a facility that conserves flow equals the arrival rate times the mean time a customer spends in it: E[x]=λ E[s].E[x]=\lambda\,E[s].

It is fundamental because it makes no assumption on arrival and departure processes (only that steady-state values exist), nor on the service discipline (it holds for non-FIFO scheduling too), nor on the dependence between arrivals and service, nor on the number of servers.

Proof. Count in two ways the total "customer-time" accumulated up to time tt, i.e. the sum of the seconds spent in the facility by all customers.

  1. Per instant. At instant uu there are x(u)=A(u)−D(u)x(u)=A(u)-D(u) customers; each consumes one customer-second per second, so the total is the area under x(u)x(u): ∫0tx(u) du\int_0^t x(u)\,du.
  2. Per customer. CnC_n stays sns_n seconds, so the total is ∑n=1A(t)sn\sum_{n=1}^{A(t)}s_n. The two totals coincide apart from customers still present at time tt, an error that in a stable system becomes negligible as t→∞t\to\infty.

Equating and dividing by tt, multiplying and dividing by A(t)A(t): 1t∫0tx(u) du=A(t)t⋅1A(t)∑n=1A(t)sn.\frac1t\int_0^tx(u)\,du=\frac{A(t)}{t}\cdot\frac1{A(t)}\sum_{n=1}^{A(t)}s_n. As t→∞t\to\infty the left side is the mean number of customers E[x]E[x]; A(t)/t→λA(t)/t\to\lambda; the last factor is the mean of the sns_n, i.e. E[s]E[s]. Hence E[x]=λE[s]E[x]=\lambda E[s]. Neither the arrival distribution nor the service order was used, which is why the result is so general.

Applications. Choosing the facility:

Facility Mean number Mean time Little
whole QS E[x]E[x] E[s]E[s] (system) E[x]=λE[s]E[x]=\lambda E[s]
the queue only E[q]E[q] E[w]E[w] (waiting) E[q]=λE[w]E[q]=\lambda E[w]
the service only E[z]E[z] E[y]E[y] (service) E[z]=λE[y]=ρE[z]=\lambda E[y]=\rho (one server)

The last row says that the mean number of customers in service is the utilization: for a single server ρ\rho is the fraction of time it is busy.

Part 3: the M/M/1 queue

Poisson arrivals (rate λ\lambda), exponential service (rate μ\mu), one server, infinite buffer. Load factor ρ=λ/μ\rho=\lambda/\mu, stability ρ<1\rho<1.

Formula (distribution and mean number in the system, M/M/1). The number of customers in the system is geometric: px(n)=(1−ρ)ρ n,n=0,1,2,…p_x(n)=(1-\rho)\rho^{\,n},\qquad n=0,1,2,\dots E[x]=ρ1−ρ,Var(x)=ρ(1−ρ)2.E[x]=\frac\rho{1-\rho},\qquad\mathrm{Var}(x)=\frac\rho{(1-\rho)^2}.

Check: px(0)=1−ρp_x(0)=1-\rho is the probability that the system is empty, the complement of the utilization.

Where the formulas come from. With Poisson arrivals and exponential service (both memoryless) the system changes state only by ±1\pm1: from nn to n+1n+1 on an arrival (rate λ\lambda), from n+1n+1 to nn on a departure (rate μ\mu). In steady state the number of passages per second from nn to n+1n+1 and from n+1n+1 to nn must be equal: λ px(n)=μ px(n+1) ⇒ px(n+1)=ρ px(n) ⇒ px(n)=ρ npx(0).\lambda\,p_x(n)=\mu\,p_x(n+1)\ \Rightarrow\ p_x(n+1)=\rho\,p_x(n)\ \Rightarrow\ p_x(n)=\rho^{\,n}p_x(0). Probabilities must sum to 11; ∑n≥0ρn=11−ρ\sum_{n\ge0}\rho^n=\frac1{1-\rho} is the geometric series and converges only if ρ<1\rho<1, the stability condition: px(0)∑n=0∞ρn=px(0)1−ρ=1 ⇒ px(0)=1−ρ.p_x(0)\sum_{n=0}^{\infty}\rho^n=\frac{p_x(0)}{1-\rho}=1\ \Rightarrow\ p_x(0)=1-\rho. For the mean, using ∑n≥1nρn−1=ddρ11−ρ=1(1−ρ)2\sum_{n\ge1}n\rho^{n-1}=\frac{d}{d\rho}\frac1{1-\rho}=\frac1{(1-\rho)^2}: E[x]=∑n=0∞n(1−ρ)ρn=(1−ρ) ρ∑n=1∞nρn−1=(1−ρ) ρ⋅1(1−ρ)2=ρ1−ρ.E[x]=\sum_{n=0}^{\infty}n(1-\rho)\rho^n=(1-\rho)\,\rho\sum_{n=1}^{\infty}n\rho^{n-1}=(1-\rho)\,\rho\cdot\frac1{(1-\rho)^2}=\frac\rho{1-\rho}. For the variance, first E[x(x−1)]E[x(x-1)] with ∑n≥2n(n−1)ρn−2=2(1−ρ)3\sum_{n\ge2}n(n-1)\rho^{n-2}=\frac2{(1-\rho)^3}: E[x(x−1)]=2ρ2(1−ρ)2,E[x2]=E[x(x−1)]+E[x],Var(x)=E[x2]−E[x]2=ρ(1−ρ)2.E[x(x-1)]=\frac{2\rho^2}{(1-\rho)^2},\qquad E[x^2]=E[x(x-1)]+E[x],\qquad\mathrm{Var}(x)=E[x^2]-E[x]^2=\frac\rho{(1-\rho)^2}. The tail has a formula too: P[x≥n]=∑k≥n(1−ρ)ρk=ρ nP[x\ge n]=\sum_{k\ge n}(1-\rho)\rho^k=\rho^{\,n}.

Grafico interattivo: Distribution of the number of customers in the M/M/1 system with rho = 0.8: p(n) = 0.2*0.8^n, decreasing geometric (p(0) = 0.2 = 1 - rho, p(1) = 0.16, p(2) = 0.128); the mean is rho/(1-rho) = 4

Formula (queue and times, M/M/1). Removing the number in service (ρ\rho) from the number in the system: E[q]=E[x]−ρ=ρ21−ρ.E[q]=E[x]-\rho=\frac{\rho^2}{1-\rho}. With Little: E[s]=E[x]λ=1/μ1−ρ,E[w]=E[s]−1μ=ρ/μ1−ρ.E[s]=\frac{E[x]}\lambda=\frac{1/\mu}{1-\rho},\qquad E[w]=E[s]-\frac1\mu=\frac{\rho/\mu}{1-\rho}.

The mean system time is the service time 1/μ1/\mu divided by (1−ρ)(1-\rho): as ρ→1\rho\to1 the delay grows without bound.

Example. The 11 Mbit/s link with 10001000-bit packets, μ=1000\mu=1000 packets/s, and λ=800\lambda=800 packets/s (ρ=0.8\rho=0.8), exponential packet length (M/M/1):

  • E[x]=0.8/0.2=4E[x]=0.8/0.2=4 packets in the system;
  • E[q]=0.82/0.2=3.2E[q]=0.8^2/0.2=3.2 in the queue; E[z]=0.8E[z]=0.8 in service, and 3.2+0.8=43.2+0.8=4;
  • E[s]=(1/1000)/0.2=5E[s]=(1/1000)/0.2=5 ms; Little: λE[s]=800⋅0.005=4\lambda E[s]=800\cdot0.005=4;
  • E[w]=0.8⋅(1/1000)/0.2=4E[w]=0.8\cdot(1/1000)/0.2=4 ms, and 4+1=54+1=5 ms;
  • the system is empty with probability 1−ρ=0.21-\rho=0.2 and has at least 55 packets with probability P[x≥5]=ρ5=0.85=0.328P[x\ge5]=\rho^5=0.8^5=0.328.

If the load rises to ρ=0.95\rho=0.95: E[s]=1/(1000⋅0.05)=20E[s]=1/(1000\cdot0.05)=20 ms, four times more: the queue is very sensitive to load near 11.

Part 3: the M/G/1 queue

Poisson arrivals, general service distribution, one server. With ρ=λ/μ<1\rho=\lambda/\mu<1 the Pollaczek-Khinchin formula gives the mean waiting time in the queue in terms of the second moment of service: E[w]=λE[y2]2(1−ρ).E[w]=\frac{\lambda E[y^2]}{2(1-\rho)}. For constant service time (E[y2]=1/μ2E[y^2]=1/\mu^2, i.e. M/D/1; the case of equal packets, later used in TDMA and FDMA), substitute and use λ/μ=ρ\lambda/\mu=\rho: E[w]=λ⋅1μ22(1−ρ)=ρ2μ(1−ρ);E[w]=\frac{\lambda\cdot\frac1{\mu^2}}{2(1-\rho)}=\frac{\rho}{2\mu(1-\rho)}; then E[s]=E[w]+E[y]=1μ+ρ2μ(1−ρ)E[s]=E[w]+E[y]=\frac1\mu+\frac{\rho}{2\mu(1-\rho)} and, with Little, E[x]=λE[s]=ρ+ρ22(1−ρ)E[x]=\lambda E[s]=\rho+\frac{\rho^2}{2(1-\rho)}:

Formula (M/G/1 with constant service). E[x]=ρ+ρ22(1−ρ),E[w]=ρ2μ(1−ρ),E[s]=E[x]λ=1μ(1+ρ2(1−ρ)).E[x]=\rho+\frac{\rho^2}{2(1-\rho)},\qquad E[w]=\frac{\rho}{2\mu(1-\rho)},\qquad E[s]=\frac{E[x]}\lambda=\frac1\mu\left(1+\frac{\rho}{2(1-\rho)}\right).

With exponential service E[y2]=2/μ2E[y^2]=2/\mu^2 and Pollaczek-Khinchin returns E[w]=ρ/μ1−ρE[w]=\frac{\rho/\mu}{1-\rho}, the M/M/1 result. In general E[y2]E[y^2] grows with the variability of service: constant service halves the waiting time compared with exponential at the same ρ\rho.

Example. Same data (μ=1000\mu=1000, λ=800\lambda=800, ρ=0.8\rho=0.8) but all packets of 10001000 bits (constant service, M/D/1): E[w]=0.82⋅1000⋅0.2=2E[w]=\dfrac{0.8}{2\cdot1000\cdot0.2}=2 ms (against 44 ms for M/M/1), E[s]=2+1=3E[s]=2+1=3 ms, E[x]=0.8+0.640.4=2.4E[x]=0.8+\dfrac{0.64}{0.4}=2.4 packets (Little: 800⋅0.003=2.4800\cdot0.003=2.4).

Grafico interattivo: Normalized mean system time E[s]*mu versus load factor rho: M/M/1 (1/(1-rho)) and constant service (1 + rho/(2(1-rho))). Both diverge as rho tends to 1

Up to ρ≈0.5\rho\approx0.5 the delay is less than twice the service time, then it climbs steeply. A link should be dimensioned to work far from ρ=1\rho=1.

Versione ripasso

  • Why. The queueing delay dqueued_{queue} depends on traffic intensity, not only on links (Network Performance AnalysisNetwork performance is measured by traffic metrics (bitrate R0, the link maximum; throughput S <= R0, data delivered successfully; goodput at the application layer), delay (end-to-end d = d_proc + d_queue + d_trans + d_prop with d_trans = L/R and d_prop = d/v; jitter; RTT), pipe capacity (BDP = rate times delay) and reliability (PER, PDR, PLR). The throughput of a path is that of its bottleneck link, the minimum bitrate, remembering that shared links split their capacity.Network Performance Analysis →). The link is modelled as a queueing system (QS), also for access protocols (Performance of Multiple Access ProtocolsWith Poisson arrivals, the success probability of a frame is the probability that no other frame arrives in the vulnerable time: pure ALOHA P_S = e^(-2G), throughput S = G e^(-2G) with maximum 1/(2e) = 0.18 at G = 1/2; slotted ALOHA S = G e^(-G) with maximum 1/e = 0.37 at G = 1; non-persistent CSMA with a = tau_p/t_F: S = G e^(-aG) / (G(1+2a) + e^(-aG)), which tends to 1 as a tends to 0 but collapses for large a, where slotted ALOHA is better. For TDMA (M/D/1) E[T] = t_F (N_u/2 + S N_u / (2(1-S)) + 1 + a) and for FDMA E[T] = t_F (N_u + S N_u / (2(1-S)) + a): FDMA is slower by t_F (N_u/2 - 1).Performance of Multiple Access Protocols →).
  • Model. Customers (packets) →\to queue (buffer, capacity QQ) →\to mm servers. System capacity K=m+QK=m+Q. With blocking (KK finite): customers finding the system full do not enter, λa=λ(1−Pblk)\lambda_a=\lambda(1-P_{blk}), λd=λPblk\lambda_d=\lambda P_{blk}. Non-blocking: infinite buffer.
  • Discipline. FCFS (FIFO, the default), LCFS (LIFO), priority queues.
  • Kendall notation A/B/C/K/N−SA/B/C/K/N-S: AA arrivals, BB service (M Markovian/exponential, D deterministic, G general), CC servers. If KK and NN are missing they are infinite and the discipline is FCFS. Examples: M/M/1, M/D/1, M/G/1.
  • Arrivals. Interarrival times τn=tn−tn−1\tau_n=t_n-t_{n-1} i.i.d.; rate λ=1/E[τ]\lambda=1/E[\tau]. For Poisson the interarrival is exponential, pτ(a)=λe−λap_\tau(a)=\lambda e^{-\lambda a}, Pτ(a)=1−e−λaP_\tau(a)=1-e^{-\lambda a}, and the probability of kk arrivals in τ\tau is P(k,τ)=e−λτ(λτ)kk!P(k,\tau)=\frac{e^{-\lambda\tau}(\lambda\tau)^k}{k!}.
  • Arrival example. λ=2\lambda=2/s, τ=1.5\tau=1.5 s, mean λτ=3\lambda\tau=3: P(0)=e−3=0.0498P(0)=e^{-3}=0.0498, P(1)=3e−3=0.1494P(1)=3e^{-3}=0.1494, P(2)=P(3)=0.2240P(2)=P(3)=0.2240. The k=0k=0 case, e−λτe^{-\lambda\tau}, is the success probability of ALOHA.
  • Service. Times yny_n i.i.d., independent of arrivals; rate μ=1/E[y]\mu=1/E[y] per server, mμm\mu in total. Deterministic (1/μ=tF=F/R1/\mu=t_F=F/R for equal packets); exponential py(a)=μe−μap_y(a)=\mu e^{-\mu a}.
  • Occupancy. q(t)q(t) queued, z(t)z(t) in service, x(t)=q(t)+z(t)=A(t)−D(t)x(t)=q(t)+z(t)=A(t)-D(t).
  • Stability. The QS is stable if an asymptotic distribution px(n)p_x(n) independent of the initial state exists.
  • Times. ww waiting, yy service, ss system time: s=w+ys=w+y.
  • Traffic.
    • Offered G=λ/μ=λE[y]G=\lambda/\mu=\lambda E[y]; load factor ρ=λmμ=Gm\rho=\frac{\lambda}{m\mu}=\frac{G}{m}.
    • Throughput η=1/E[r]\eta=1/E[r], with rn=dn−dn−1r_n=d_n-d_{n-1} interdeparture time; useful traffic S=η/μS=\eta/\mu.
    • Stable (non-blocking) ⇔λ<mμ⇔ρ<1\Leftrightarrow\lambda<m\mu\Leftrightarrow\rho<1: η=λ\eta=\lambda, S=GS=G. Unstable (ρ≥1\rho\ge1): η=mμ\eta=m\mu, S=mS=m, the queue grows at rate λ−mμ\lambda-m\mu. Blocking systems are always stable.
  • Traffic example. 11 Mbit/s link, 10001000-bit packets: μ=1000\mu=1000/s. With λ=800\lambda=800: G=ρ=S=0.8G=\rho=S=0.8, η=800\eta=800/s. With λ=1200\lambda=1200: ρ=1.2\rho=1.2, η=1000\eta=1000/s and the queue grows by 200200 packets/s.
  • Little's law. E[x]=λ E[s]E[x]=\lambda\,E[s], valid with no assumption on arrivals, service, discipline or number of servers. Idea: the total time spent in the system is the same counted per customer (∑sn\sum s_n) or per instant (∫x dt\int x\,dt). Applications: system E[x]=λE[s]E[x]=\lambda E[s]; queue E[q]=λE[w]E[q]=\lambda E[w]; service E[z]=λE[y]=ρE[z]=\lambda E[y]=\rho (fraction of time busy).
  • M/M/1. With ρ=λ/μ<1\rho=\lambda/\mu<1:
    • px(n)=(1−ρ)ρnp_x(n)=(1-\rho)\rho^n (geometric), so px(0)=1−ρp_x(0)=1-\rho; E[x]=ρ1−ρE[x]=\frac{\rho}{1-\rho}; Var(x)=ρ(1−ρ)2\mathrm{Var}(x)=\frac{\rho}{(1-\rho)^2}; P[x≥n]=ρnP[x\ge n]=\rho^n;
    • E[q]=E[x]−ρ=ρ21−ρE[q]=E[x]-\rho=\frac{\rho^2}{1-\rho}; E[s]=E[x]λ=1/μ1−ρE[s]=\frac{E[x]}{\lambda}=\frac{1/\mu}{1-\rho}; E[w]=E[s]−1μ=ρ/μ1−ρE[w]=E[s]-\frac1\mu=\frac{\rho/\mu}{1-\rho}.
  • M/M/1 example. ρ=0.8\rho=0.8, μ=1000\mu=1000/s: E[x]=0.8/0.2=4E[x]=0.8/0.2=4; E[q]=3.2E[q]=3.2; E[s]=(1/1000)/0.2=5E[s]=(1/1000)/0.2=5 ms, Little 800⋅0.005=4800\cdot0.005=4; E[w]=4E[w]=4 ms; empty with probability 0.20.2; at least 5 packets with probability ρ5=0.328\rho^5=0.328. With ρ=0.95\rho=0.95: E[s]=20E[s]=20 ms, four times more.
  • M/G/1 (Pollaczek-Khinchin). E[w]=λE[y2]2(1−ρ)E[w]=\frac{\lambda E[y^2]}{2(1-\rho)}. Exponential service (E[y2]=2/μ2E[y^2]=2/\mu^2): M/M/1 again. Constant service (M/D/1, E[y2]=1/μ2E[y^2]=1/\mu^2, equal packets, used for TDMA and FDMA): E[x]=ρ+ρ22(1−ρ)E[x]=\rho+\frac{\rho^2}{2(1-\rho)}, E[w]=ρ2μ(1−ρ)E[w]=\frac{\rho}{2\mu(1-\rho)}, E[s]=1μ(1+ρ2(1−ρ))E[s]=\frac1\mu\left(1+\frac{\rho}{2(1-\rho)}\right). Constant service halves the wait compared with exponential at the same ρ\rho.
  • M/D/1 example. Same data (μ=1000\mu=1000, ρ=0.8\rho=0.8): E[w]=2E[w]=2 ms (against 4 ms), E[s]=3E[s]=3 ms, E[x]=2.4E[x]=2.4 packets (Little: 800⋅0.003=2.4800\cdot0.003=2.4).
  • Why it matters. E[s]μ=11−ρE[s]\mu=\frac{1}{1-\rho} in M/M/1 diverges as ρ→1\rho\to1. Up to ρ≈0.5\rho\approx0.5 the delay is below twice the service time, then climbs steeply: dimension a link far from ρ=1\rho=1.
  • Typical mistakes: forgetting that the delay explodes as ρ→1\rho\to1; using λ\lambda instead of ρ\rho in the formulas; confusing E[s]E[s] (system) with E[w]E[w] (queue only); applying M/M/1 formulas to constant service, or vice versa.

Teoria collegata