Salta al contenuto
Note per Studenti Performance of Multiple Access Protocols Report

Performance of Multiple Access Protocols

In questa pagina 7
In questa pagina 6

This note computes the throughput and the delay of the protocols described in Multiple Access Protocols - ALOHA and CSMAWhen several stations share a medium a medium access (MAC) protocol must decide who transmits. Random access: pure ALOHA (transmit immediately, vulnerable time 2 t_F), slotted ALOHA (start only at slot boundaries, vulnerable t_F), CSMA (listen before talking, vulnerable tau_p) with 1-persistent, non-persistent and p-persistent variants, CSMA/CD (detects collisions while transmitting: needs t_F >= 2 tau_p, hence a minimum frame) and the Wi-Fi CSMA/CA (IFS, contention window with backoff, ACK, RTS/CTS and NAV). Controlled access: reservation, polling, token. Channelization: FDMA, TDMA, OFDMA, CDMA, SDMA.Multiple Access Protocols - ALOHA and CSMA →, with the tools of Introduction to Queueing TheoryA queueing system is made of an arrival process (Poisson, rate lambda), a queue and one or more servers with service rate mu. Offered load G = lambda/mu, load factor rho = lambda/(m mu): the system is stable only if rho < 1, and then the throughput is lambda (otherwise m mu). Little's law E[x] = lambda E[s] holds for any discipline. M/M/1: E[x] = rho/(1-rho), E[s] = (1/mu)/(1-rho), E[w] = (rho/mu)/(1-rho). With deterministic service (M/D/1, a special case of Pollaczek-Khinchin): E[w] = rho/(2 mu (1-rho)). The delay grows without bound as rho tends to 1.Introduction to Queueing Theory →. The Poisson probability with k=0k=0, the geometric distribution and the exponential distribution are needed.

Symbols

Quantity Symbol Unit
Number of stations NuN_u customers
Propagation time τp\tau_p s
Frame size (data PDU, constant) FF bit
Frame transmission time (constant) tF=F/Rt_F=F/R s
Timeout tot_o s
Arrival rate of new frames (Poisson process, PP) λ\lambda frame/s
Backoff time after a collision tbt_b s
New plus retransmitted frames (modelled as PP) λ′≥λ\lambda'\ge\lambda frame/s
Service rate (constant) μ=1/tF\mu=1/t_F frame/s

The model assumes that the set of new frames and frames retransmitted after a collision still forms a Poisson process of rate λ′\lambda'. It is an approximation, but makes the computations tractable.

Pure ALOHA

Three metrics are defined:

Definition (metrics of a random access protocol).

  • Offered traffic GG: mean number of frames (new and retransmitted) arriving in one service time, G=λ′μ=λ′tFG=\dfrac{\lambda'}{\mu}=\lambda't_F.
  • Success probability PSP_S: probability that a transmission succeeds, PS=λλ′=new arrivals/stotal arrivals/s (new + retransmitted)P_S=\dfrac{\lambda}{\lambda'}=\dfrac{\text{new arrivals/s}}{\text{total arrivals/s (new + retransmitted)}}.
  • Throughput SS: mean number of frames transmitted successfully in one frame time, S=GPS=λtFS=GP_S=\lambda t_F.

The last equality has a physical meaning: in steady state all new frames eventually get through, so the frames successfully delivered per second are λ\lambda, and normalized to the frame time they give λtF\lambda t_F (the useful traffic of queueing theory).

Throughput

A frame transmitted at time tt succeeds if no other frame (new or retransmitted) arrives during the vulnerable period [t−tF, t+tF][t-t_F,\,t+t_F] of duration 2tF2t_F. The number of arrivals in an interval of length TT is Poisson with mean λ′T\lambda'T, and the probability of zero arrivals (k=0k=0) is e−λ′Te^{-\lambda'T}. The two half-intervals are disjoint, so arrivals in each are independent and probabilities multiply: PS=P[N(t−tF,t)=0, N(t,t+tF)=0]=e−λ′tF⋅e−λ′tF=e−λ′ 2tF=e−2G.P_S=P[N(t-t_F,t)=0,\ N(t,t+t_F)=0]=e^{-\lambda't_F}\cdot e^{-\lambda't_F}=e^{-\lambda'\,2t_F}=e^{-2G}.

Formula (throughput of pure ALOHA). S=G PS=G e−2G.S=G\,P_S=G\,e^{-2G}.

The maximum is found by differentiating. By the product rule: d(Ge−2G)dG=e−2G+G⋅(−2)e−2G=e−2G(1−2G)=0 ⇒ G=12.\frac{d(Ge^{-2G})}{dG}=e^{-2G}+G\cdot(-2)e^{-2G}=e^{-2G}(1-2G)=0\ \Rightarrow\ G=\frac12. The derivative is positive for G<12G<\frac12 and negative afterwards, so it is a maximum: Smax=12e−1=12e≃0.184.S_{max}=\frac12e^{-1}=\frac1{2e}\simeq0.184.

Example. With G=0.5G=0.5: PS=e−1=0.368P_S=e^{-1}=0.368 and S=0.5⋅0.368=0.184S=0.5\cdot0.368=0.184, the channel is used 18.4 %18.4\,\%: on a 11 Mbit/s channel at most 184184 kbit/s are delivered. With G=0.1G=0.1 (low load) PS=e−0.2=0.819P_S=e^{-0.2}=0.819 and S=0.082S=0.082: almost everything that arrives gets through, but 18 %18\,\% of attempts collide. With G=2G=2 (high load) PS=e−4=0.018P_S=e^{-4}=0.018 and S=0.037S=0.037: the channel is flooded by collisions.

Delay

The mean number of transmissions needed to deliver a frame: each has success probability PSP_S, so the count is geometric: E[ntx]=∑n=1+∞n(1−PS)n−1PS=1PS,E[nretx]=1−PSPS=e2G−1.(∗1)E[n_{tx}]=\sum_{n=1}^{+\infty}n(1-P_S)^{n-1}P_S=\frac1{P_S},\qquad E[n_{retx}]=\frac{1-P_S}{P_S}=e^{2G}-1.\qquad(*1) The total delay is the successful transmission (tF+τpt_F+\tau_p) plus, for each retransmission, the failed transmission (tFt_F), the wait for the NACK or timeout (propagation round trip 2τp2\tau_p) and the mean backoff E[tb]E[t_b]:

Formula (mean delay of pure ALOHA). E[T]=tF+τp+(e2G−1)(tF+2τp+E[tb]).E[T]=t_F+\tau_p+(e^{2G}-1)(t_F+2\tau_p+E[t_b]).

Example. tF=1t_F=1 ms, τp=0.1\tau_p=0.1 ms, E[tb]=5E[t_b]=5 ms (so the repeated term is tF+2τp+E[tb]=6.2t_F+2\tau_p+E[t_b]=6.2 ms and the fixed part tF+τp=1.1t_F+\tau_p=1.1 ms).

GG S=Ge−2GS=Ge^{-2G} E[nretx]=e2G−1E[n_{retx}]=e^{2G}-1 E[T]E[T]
0.10.1 0.0820.082 0.2210.221 1.1+0.221⋅6.2=2.471.1+0.221\cdot6.2=2.47 ms
0.250.25 0.1520.152 0.6490.649 1.1+0.649⋅6.2=5.121.1+0.649\cdot6.2=5.12 ms
0.50.5 0.1840.184 1.7181.718 1.1+1.718⋅6.2=11.751.1+1.718\cdot6.2=11.75 ms

The delay grows fast with load, already before the throughput maximum.

Slotted ALOHA

The vulnerable period is a single tFt_F (the frame suffers no collision if no other frame was generated in the slot preceding its start): PS=P[N(t−tF,t)=0]=e−λ′tF=e−G.P_S=P[N(t-t_F,t)=0]=e^{-\lambda't_F}=e^{-G}.

Formula (throughput of slotted ALOHA). S=G PS=G e−G,dSdG=e−G(1−G)=0 ⇒ G=1,Smax=1e≃0.37.S=G\,P_S=G\,e^{-G},\qquad\frac{dS}{dG}=e^{-G}(1-G)=0\ \Rightarrow\ G=1,\quad S_{max}=\frac1e\simeq0.37.

The maximum doubles with respect to pure ALOHA (1e=2⋅12e\frac1e=2\cdot\frac1{2e}), and is reached at twice the offered load (G=1G=1 against G=12G=\frac12).

Delay. Each (re)transmission waits on average half a slot, E[W]=tF/2E[W]=t_F/2, before starting at the slot boundary: E[T]=E[W]+tF+τp+1−PSPS(E[W]+tF+2τp+E[tb])=3tF2+τp+(eG−1)(3tF2+2τp+E[tb]).E[T]=E[W]+t_F+\tau_p+\frac{1-P_S}{P_S}\big(E[W]+t_F+2\tau_p+E[t_b]\big)=\frac{3t_F}2+\tau_p+(e^{G}-1)\Big(\frac{3t_F}2+2\tau_p+E[t_b]\Big).

Example. Same data as pure ALOHA: G=0.1G=0.1 gives E[T]=1.5+0.1+0.105⋅(1.5+0.2+5)=2.30E[T]=1.5+0.1+0.105\cdot(1.5+0.2+5)=2.30 ms (against 2.472.47 ms for pure ALOHA); G=0.5G=0.5 gives 5.955.95 ms (against 11.7511.75); G=1G=1 gives 13.113.1 ms. At low load slotted ALOHA has a larger delay because of the slot wait, but then grows much more slowly: what counts is the number of collisions. For G=0.5G=0.5: fixed part 3tF2+τp=1.6\frac{3t_F}{2}+\tau_p=1.6 ms, retransmissions e0.5−1=0.649e^{0.5}-1=0.649, cost of each 1.5+0.2+5=6.71.5+0.2+5=6.7 ms, so E[T]=1.6+0.649⋅6.7=5.95E[T]=1.6+0.649\cdot6.7=5.95 ms.

Grafico interattivo: Throughput S versus offered load G: pure ALOHA S = G e^(-2G) (maximum 0.18 at G = 0.5) and slotted ALOHA S = G e^(-G) (maximum 0.37 at G = 1)

Beyond the maximum the throughput decreases as load increases: too many frames destroy each other and even more are retransmitted. Note that the comparison is at equal GG, not at equal SS.

Stability: the two operating points

The offered load GG is not a given: it also depends on retransmissions. In steady state the throughput must equal the normalized arrival rate λtF\lambda t_F: operating points are the intersections of the curve S(G)S(G) with the horizontal line S=λtFS=\lambda t_F.

If λtF<Smax\lambda t_F<S_{max} there are two intersections, G1<G2G_1<G_2:

  • at G1G_1 (low load) the point is stable: if GG rises a little, S>λtFS>\lambda t_F (the system clears more frames than arrive) and the load goes back down;
  • at G2G_2 (high load) the point is unstable: beyond G2G_2 the throughput SS is below the arrival rate, the queue of frames to (re)transmit grows and the load keeps rising: the instability region, where throughput tends to 00.

Example (slotted ALOHA). With λtF=0.12\lambda t_F=0.12 frames per slot: Ge−G=0.12Ge^{-G}=0.12 has the two solutions G1=0.138G_1=0.138 and G2=3.32G_2=3.32. The equation has no elementary solution; it is found by trial or iteration. Low branch: G=0.12eGG=0.12e^{G} starting from G=0.12G=0.12 gives 0.135, 0.1374, 0.1377→0.1380.135,\ 0.1374,\ 0.1377\to0.138. High branch: G=ln⁡(G/0.12)G=\ln(G/0.12) starting from 33 gives 3.22, 3.29, 3.31→3.323.22,\ 3.29,\ 3.31\to3.32. The system lives at G1G_1: PS=e−0.138=0.871P_S=e^{-0.138}=0.871 (12.9 %12.9\,\% of attempts collide). A traffic peak pushing it beyond G2=3.32G_2=3.32 sends it into collapse. If λtF>1/e=0.368\lambda t_F>1/e=0.368 there is no intersection: the system is never stable.

Non-persistent CSMA

The analysis divides time into cycles: each cycle is a busy period (BB, activity on the channel) followed by an idle period (II, channel free). The normalized propagation delay is a=τ~p=τptF.a=\tilde\tau_p=\frac{\tau_p}{t_F}.

Idle period. Frames (new and retransmitted) arrive as a Poisson process of rate λ′\lambda', so the time between two arrivals, i.e. the idle period, is exponential with parameter λ′\lambda' and has mean mI=1λ′=tFG(from G=λ′tF).m_I=\frac1{\lambda'}=\frac{t_F}{G}\qquad(\text{from }G=\lambda't_F).

Useful part of the busy period. A busy period is successful (BP-S) if a single frame passes in it, colliding (BP-C) if more than one does. A period starting at tt succeeds if no other frame arrives in the vulnerable time τp\tau_p: PBP−S=P[N(t,t+τp)=0]=e−λ′τp=e−Ga,PBP−C=1−e−Ga.P_{BP-S}=P[N(t,t+\tau_p)=0]=e^{-\lambda'\tau_p}=e^{-Ga},\qquad P_{BP-C}=1-e^{-Ga}. The useful part UU is tFt_F if successful and 00 if colliding, so mU=tFPBP−S=tFe−Ga.m_U=t_FP_{BP-S}=t_Fe^{-Ga}.

Successful period. Lasts the frame plus its propagation: mBP−S=tF+τpm_{BP-S}=t_F+\tau_p.

Colliding period. Let YY be the time between the start of the first and of the last frame of the period: Y∈[0,τp]Y\in[0,\tau_p] since after τp\tau_p all stations have heard the transmission and no longer start. The period lasts Y+tF+τpY+t_F+\tau_p. The distribution of YY is the probability that in [t+y,t+τp][t+y,t+\tau_p] (length τp−y\tau_p-y) no frame arrives: PY(y)=e−λ′(τp−y), 0≤y≤τp,pY(y)=λ′e−λ′(τp−y),P_Y(y)=e^{-\lambda'(\tau_p-y)},\ 0\le y\le\tau_p,\qquad p_Y(y)=\lambda'e^{-\lambda'(\tau_p-y)}, E[Y]=∫0τpy pY(y) dy=τp−1−e−λ′τpλ′=tF(a−1−e−aGG).E[Y]=\int_0^{\tau_p}y\,p_Y(y)\,dy=\tau_p-\frac{1-e^{-\lambda'\tau_p}}{\lambda'}=t_F\left(a-\frac{1-e^{-aG}}G\right). The integral by parts, with u=yu=y and dv=λ′e−λ′(τp−y)dydv=\lambda'e^{-\lambda'(\tau_p-y)}dy: ∫0τpy λ′e−λ′(τp−y)dy=[y e−λ′(τp−y)]0τp−∫0τpe−λ′(τp−y)dy=τp−1−e−λ′τpλ′.\int_0^{\tau_p}y\,\lambda'e^{-\lambda'(\tau_p-y)}dy=\Big[y\,e^{-\lambda'(\tau_p-y)}\Big]_0^{\tau_p}-\int_0^{\tau_p}e^{-\lambda'(\tau_p-y)}dy=\tau_p-\frac{1-e^{-\lambda'\tau_p}}{\lambda'}. In the last step τp=atF\tau_p=at_F and λ′=G/tF\lambda'=G/t_F are substituted.

Mean duration of the busy period. Averaging the two cases: mB=(tF+τp)PBP−S+(E[Y∣BP-C]+tF+τp)PBP−C=tF+τp+E[Y]=tF(1+2a−1−e−aGG),m_B=(t_F+\tau_p)P_{BP-S}+\big(E[Y|BP\text{-}C]+t_F+\tau_p\big)P_{BP-C}=t_F+\tau_p+E[Y]=t_F\left(1+2a-\frac{1-e^{-aG}}G\right), because E[Y∣BP-C]PBP−C=E[Y]E[Y|BP\text{-}C]P_{BP-C}=E[Y] and PBP−S+PBP−C=1P_{BP-S}+P_{BP-C}=1.

Formula (throughput of non-persistent CSMA). The throughput is the mean useful time per cycle over the mean cycle duration mB+mIm_B+m_I: S=mUmB+mI=tFe−aGtF(1+2a−1−e−aGG)+tFG=G e−aGG(1+2a)+e−aG.S=\frac{m_U}{m_B+m_I}=\frac{t_Fe^{-aG}}{t_F\left(1+2a-\frac{1-e^{-aG}}G\right)+\frac{t_F}G}=\frac{G\,e^{-aG}}{G(1+2a)+e^{-aG}}.

Step to the result: in the denominator factor out tFt_F and add the two fractions with GG, −1−e−aGG+1G=e−aGG-\frac{1-e^{-aG}}G+\frac1G=\frac{e^{-aG}}G, so the denominator is tF(1+2a+e−aGG)t_F\left(1+2a+\frac{e^{-aG}}G\right); cancel tFt_F and multiply numerator and denominator by GG.

Extreme cases: with a→0a\to0 (negligible propagation) S=GG+1→1S=\frac G{G+1}\to1 for large GG: CSMA fills the channel. With large aa propagation weighs and SS drops, as for ALOHA.

Example. a=0.1a=0.1, G=1G=1: 1+2a=1.21+2a=1.2 and e−aG=e−0.1=0.9048e^{-aG}=e^{-0.1}=0.9048, so S=0.90481.2+0.9048=0.430S=\dfrac{0.9048}{1.2+0.9048}=0.430. With a=0.01a=0.01: S=0.493S=0.493; with a=1a=1: S=0.109S=0.109.

Grafico interattivo: Normalized throughput of non-persistent CSMA for different normalized propagation delays a = tau_p/t_F, compared with slotted ALOHA (G axis in log scale)

The maximum of CSMA (computed numerically) depends on aa:

a=τp/tFa=\tau_p/t_F 0.0010.001 0.010.01 0.10.1 11 1010
SmaxS_{max} 0.940.94 (at G≈31G\approx31) 0.820.82 (G≈9.4G\approx9.4) 0.520.52 (G≈2.5G\approx2.5) 0.140.14 (G≈0.46G\approx0.46) 0.0180.018 (G≈0.05G\approx0.05)

For a=1a=1 CSMA peaks at 0.140.14, below slotted ALOHA (0.370.37), and for a=10a=10 it collapses to 0.0180.018, below even pure ALOHA (0.180.18). The comparison with slotted ALOHA thus depends on aa:

  • small propagation delay relative to tFt_F (e.g. a=0.01a=0.01): CSMA does better than slotted ALOHA;
  • large propagation delay (e.g. a=1a=1): slotted ALOHA does better, because with a long propagation listening gives old, hence useless, information.

Delay of CSMA

The total delay has three parts: the time to transmit the packets (with all collision failures), propagation, and the wait for the channel to become idle while listening.

In a cycle there are mB−τpm_B-\tau_p seconds in which the channel may be found busy, so Pbusy=mB−τpmB+mI=G(1+a)−(1−e−aG)G(1+2a)+e−aG.P_{busy}=\frac{m_B-\tau_p}{m_B+m_I}=\frac{G(1+a)-(1-e^{-aG})}{G(1+2a)+e^{-aG}}. When the channel is busy (or after a collision) a backoff tbt_b exponential with parameter β\beta is waited, E[tb]=1/βE[t_b]=1/\beta. The number of times the channel is found busy before finding it idle is geometric with "failure" probability PbusyP_{busy}: P[i waits]=Pbusy i(1−Pbusy)P[i\text{ waits}]=P_{busy}^{\,i}(1-P_{busy}), each wait lasting E[tb]E[t_b] on average. Hence the mean wait before transmitting is E[W]=∑i=0+∞i E[tb] Pbusy i(1−Pbusy)=1β⋅Pbusy1−Pbusy.E[W]=\sum_{i=0}^{+\infty}i\,E[t_b]\,P_{busy}^{\,i}(1-P_{busy})=\frac1\beta\cdot\frac{P_{busy}}{1-P_{busy}}. The mean number of retransmissions is (from (∗1)(*1) with PS=S/GP_S=S/G): E[nretx]=1−PSPS=GS−1.E[n_{retx}]=\frac{1-P_S}{P_S}=\frac{G}{S}-1.

Formula (mean delay of non-persistent CSMA). E[T]=E[W]+tF+τp+(GS−1)(E[W]+tF+2τp+E[tb]).E[T]=E[W]+t_F+\tau_p+\left(\frac GS-1\right)\big(E[W]+t_F+2\tau_p+E[t_b]\big).

The first group is the last (successful) transmission: wait for the idle channel, transmission and propagation. Each retransmission costs: wait for the idle channel, transmission, propagation round trip (to notice the failure), backoff.

Example. tF=1t_F=1 ms, τp=0.1\tau_p=0.1 ms (a=0.1a=0.1), E[tb]=5E[t_b]=5 ms, G=1G=1. Step by step:

  • S=0.430S=0.430 (computed above);
  • mB=tF(1+0.2−(1−e−0.1))=1.2−0.0952=1.105m_B=t_F\left(1+0.2-(1-e^{-0.1})\right)=1.2-0.0952=1.105 ms and mI=tF/G=1m_I=t_F/G=1 ms;
  • Pbusy=(mB−τp)/(mB+mI)=1.005/2.105=0.477P_{busy}=(m_B-\tau_p)/(m_B+m_I)=1.005/2.105=0.477;
  • E[W]=5⋅0.477/(1−0.477)=4.57E[W]=5\cdot0.477/(1-0.477)=4.57 ms;
  • mean retransmissions G/S−1=1/0.430−1=1.33G/S-1=1/0.430-1=1.33;
  • E[T]=4.57+1+0.1+1.33⋅(4.57+1+0.2+5)=5.67+1.33⋅10.77≈19.9E[T]=4.57+1+0.1+1.33\cdot(4.57+1+0.2+5)=5.67+1.33\cdot10.77\approx19.9 ms.

For a=0.01a=0.01 CSMA has lower delay at equal throughput; for a=1a=1 the opposite holds.

TDMA (M/D/1 queue)

Definition (TDMA). The time axis is divided into slots of equal duration, preassigned to the NuN_u users; each user may transmit freely in its slot, where it has the full bitrate RR. Assignment follows a periodic scheme (the TDMA frame: 1,2,…,Nu1,2,\dots,N_u). The packet transmission time equals the slot duration: tF=F/Rt_F=F/R.

Throughput. Each user has Poisson arrivals of rate λ\lambda; the total rate is λt=Nuλ\lambda_t=N_u\lambda. If each user's queue is stable: S=G=ρ=λtμ=NuλtF.S=G=\rho=\frac{\lambda_t}\mu=N_u\lambda t_F. TDMA has no collisions: throughput equals load as long as ρ<1\rho<1, and S≤1S\le1 (no peak and no decline).

Delay. For a given user: after transmitting it must wait Nu−1N_u-1 slots before its next turn, so it serves constantly one packet per frame: E[y]=1μ=NutF ⇒ μ=1NutF packets/s.E[y]=\frac1\mu=N_ut_F\ \Rightarrow\ \mu=\frac1{N_ut_F}\ \text{packets/s}. The queueing wait is that of an M/G/1 queue with constant service (Pollaczek-Khinchin formula, Introduction to Queueing TheoryA queueing system is made of an arrival process (Poisson, rate lambda), a queue and one or more servers with service rate mu. Offered load G = lambda/mu, load factor rho = lambda/(m mu): the system is stable only if rho < 1, and then the throughput is lambda (otherwise m mu). Little's law E[x] = lambda E[s] holds for any discipline. M/M/1: E[x] = rho/(1-rho), E[s] = (1/mu)/(1-rho), E[w] = (rho/mu)/(1-rho). With deterministic service (M/D/1, a special case of Pollaczek-Khinchin): E[w] = rho/(2 mu (1-rho)). The delay grows without bound as rho tends to 1.Introduction to Queueing Theory →), i.e. the M/D/1 formula with 1/μ=NutF1/\mu=N_ut_F: E[w]=ρ2μ(1−ρ)=S NutF2(1−S).E[w]=\frac{\rho}{2\mu(1-\rho)}=\frac{S\,N_ut_F}{2(1-S)}. The delay E[T]E[T] has four contributions:

  1. slot wait: when a packet arrives, its arrival instant falls at random within the frame of duration NutFN_ut_F (uniform), so on average half a frame, NutF2\dfrac{N_ut_F}2, is waited until the user's turn returns;
  2. queueing wait E[w]=SNutF2(1−S)E[w]=\dfrac{SN_ut_F}{2(1-S)}, due to packets already present;
  3. the transmission time tFt_F;
  4. the final propagation τp\tau_p.

Formula (mean delay of TDMA). E[T]=NutF2+SNutF2(1−S)+tF+τp=tF(Nu2+SNu2(1−S)+1+a).E[T]=\frac{N_ut_F}2+\frac{SN_ut_F}{2(1-S)}+t_F+\tau_p=t_F\left(\frac{N_u}2+\frac{SN_u}{2(1-S)}+1+a\right).

Example. Nu=10N_u=10 users, tF=1t_F=1 ms, a≈0a\approx0, load S=0.5S=0.5: slot wait Nu/2=5N_u/2=5, queueing wait 10⋅0.52⋅(1−0.5)=5\dfrac{10\cdot0.5}{2\cdot(1-0.5)}=5, transmission 11, so E[T]/tF=5+5+1=11E[T]/t_F=5+5+1=11, i.e. E[T]=11E[T]=11 ms. At low load (S=0.1S=0.1) E[T]/tF=5+10⋅0.12⋅0.9+1=6.56E[T]/t_F=5+\dfrac{10\cdot0.1}{2\cdot0.9}+1=6.56; with S=0.9S=0.9 the queue weighs 10⋅0.92⋅0.1=45\dfrac{10\cdot0.9}{2\cdot0.1}=45 and the total is 5+45+1=515+45+1=51.

FDMA (M/G/1 queue)

Definition (FDMA). The available band is divided into disjoint subbands, each assigned to a user. The system has total bitrate RR, split equally among the NuN_u users: each has R/NuR/N_u bit/s. The service rate of a user is μ=R/NuF=RFNu[packets/s].\mu=\frac{R/N_u}{F}=\frac R{FN_u}\quad[\text{packets/s}].

The packet transmission time in FDMA is therefore NutFN_ut_F (a packet of FF bits goes at R/NuR/N_u bit/s: F/(R/Nu)=NutFF/(R/N_u)=N_ut_F, i.e. on a band NuN_u times narrower).

Throughput (per user, in steady state): S=G=ρ=λμ=λNuFR=λNutF.S=G=\rho=\frac\lambda\mu=\lambda N_u\frac FR=\lambda N_ut_F. The same expression as TDMA: at equal offered load, equal throughput.

Delay. For an M/G/1 queue with constant service the mean number of packets in the system is E[x]=ρ+ρ22(1−ρ)E[x]=\rho+\frac{\rho^2}{2(1-\rho)} and, with Little, the system time is E[s]=E[x]λ=S+S22(1−S)λ.E[s]=\frac{E[x]}\lambda=\frac{S+\frac{S^2}{2(1-S)}}{\lambda}. With λ=S/(NutF)\lambda=S/(N_ut_F) (from S=λNutFS=\lambda N_ut_F) the factor 1/λ=NutF/S1/\lambda=N_ut_F/S multiplies each term: E[s]=NutFS(S+S22(1−S))=NutF+NutF S2(1−S).E[s]=\frac{N_ut_F}{S}\left(S+\frac{S^2}{2(1-S)}\right)=N_ut_F+\frac{N_ut_F\,S}{2(1-S)}. Adding the propagation τp\tau_p:

Formula (mean delay of FDMA). E[T]=NutF+NutFS2(1−S)+τp=tF(Nu+SNu2(1−S)+a).E[T]=N_ut_F+\frac{N_ut_FS}{2(1-S)}+\tau_p=t_F\left(N_u+\frac{SN_u}{2(1-S)}+a\right).

TDMA versus FDMA

Comparing the two formulas, the normalized delay T~=E[T]/tF\tilde T=E[T]/t_F differs by a constant: E[T~]FDMA=E[T~]TDMA+Nu2−1.E[\tilde T]_{FDMA}=E[\tilde T]_{TDMA}+\frac{N_u}2-1.

Why: the queueing wait is the same (same ρ=S\rho=S and same constant service of duration NutFN_ut_F); what changes is how the packet is served. In FDMA the packet occupies NutFN_ut_F to be transmitted; in TDMA it waits on average NutF/2N_ut_F/2 for the slot and then is sent in tFt_F, total NutF/2+tFN_ut_F/2+t_F. TDMA is therefore faster by tF(Nu/2−1)t_F(N_u/2-1) (for Nu=2N_u=2 they are equal), and the difference grows linearly with the number of users.

Grafico interattivo: Normalized delay E[T]/tF versus throughput S, with Nu = 10 users and a = 0: TDMA lies below FDMA by Nu/2 - 1 = 4 frame times

With Nu=100N_u=100 the difference rises to 4949 frame times: e.g. at S=0.5S=0.5 TDMA has E[T]/tF=101E[T]/t_F=101 and FDMA 150150; at low load the delay is dominated by the Nu/2N_u/2 or NuN_u term, i.e. by the number of users, not by the load.

Neither has a decreasing throughput: they are fixed-division protocols (no collisions, but resources reserved even for those who do not transmit). ALOHA and CSMA, instead, have very low minimum delays when the channel is little used, but maximum throughput limited by collisions.

Summary comparison

Protocol Throughput SmaxS_{max} Notes
Pure ALOHA Ge−2GGe^{-2G} 0.180.18 (G=0.5G=0.5) no synchronization, vulnerable 2tF2t_F
Slotted ALOHA Ge−GGe^{-G} 0.370.37 (G=1G=1) slot synchronization
Non-persistent CSMA Ge−aGG(1+2a)+e−aG\dfrac{Ge^{-aG}}{G(1+2a)+e^{-aG}} →1\to1 as a→0a\to0 better than slotted ALOHA only if aa is small
TDMA, FDMA S=G=ρS=G=\rho 11 no collisions; E[T]FDMA=E[T]TDMA+tF(Nu/2−1)E[T]_{FDMA}=E[T]_{TDMA}+t_F(N_u/2-1)

For Ethernet (LAN - Ethernet and Wi-FiA LAN covers a limited area and is defined by the IEEE 802.x family (802.3 Ethernet, 802.11 Wi-Fi), which splits the link layer into LLC and MAC. Ethernet is connectionless, with no flow control and no ACK; it uses 1-persistent CSMA/CD; the frame is 64 to 1518 bytes (6-byte addresses, type/length, data 46-1500, 4-byte CRC) and the 64 B minimum comes from t_F >= 2 tau_p. From 10 Mbit/s on coax up to 10 Gbit/s on fibre, with full-duplex switches removing collisions. Wi-Fi (802.11) uses CSMA/CA, has BSS (with access point) and ad hoc modes, EBSS with a distribution system, adapts its bitrate to the SNR, and has hidden and exposed terminal problems, partly solved by RTS/CTS and NAV.LAN - Ethernet and Wi-Fi →) aa is very small, where CSMA is ideal.

Versione ripasso

Pure ALOHA

  • Vulnerable time 2tF2t_F: PS=e−2GP_S=e^{-2G}, S=Ge−2GS=Ge^{-2G}. Maximum at G=12G=\frac12: Smax=12e≃0.18S_{max}=\frac1{2e}\simeq0.18.
  • Example. G=0.5G=0.5: S=0.184S=0.184 (18.4 % of the channel, i.e. 184 kbit/s out of 1 Mbit/s). G=0.1G=0.1: S=0.082S=0.082. G=2G=2: S=2e−4=0.037S=2e^{-4}=0.037, channel flooded by collisions.
  • Delay. Transmissions are geometric: E[ntx]=1/PSE[n_{tx}]=1/P_S, so E[nretx]=1−PSPS=e2G−1E[n_{retx}]=\frac{1-P_S}{P_S}=e^{2G}-1. Formula: E[T]=tF+τp+(e2G−1)(tF+2τp+E[tb])E[T]=t_F+\tau_p+(e^{2G}-1)(t_F+2\tau_p+E[t_b]).
  • Example (tF=1t_F=1 ms, τp=0.1\tau_p=0.1 ms, E[tb]=5E[t_b]=5 ms, repeated term 6.2 ms): G=0.1→2.47G=0.1\to2.47 ms; G=0.25→5.12G=0.25\to5.12 ms; G=0.5→11.75G=0.5\to11.75 ms.

Slotted ALOHA

  • Vulnerable time tFt_F: PS=e−GP_S=e^{-G}, S=Ge−GS=Ge^{-G}. Maximum at G=1G=1: Smax=1e≃0.37S_{max}=\frac1e\simeq0.37, twice pure ALOHA.
  • Delay. Each attempt waits half a slot on average, E[W]=tF/2E[W]=t_F/2: E[T]=3tF2+τp+(eG−1)(3tF2+2τp+E[tb])E[T]=\frac{3t_F}{2}+\tau_p+(e^{G}-1)\left(\frac{3t_F}{2}+2\tau_p+E[t_b]\right).
  • Example (same data): G=0.1→2.30G=0.1\to2.30 ms; G=0.5→5.95G=0.5\to5.95 ms; G=1→13.1G=1\to13.1 ms. At low load it is slower than pure ALOHA because of the slot wait, but it grows much more slowly.
  • Beyond the maximum the throughput drops: collisions generate retransmissions that raise GG.

Two operating points

The steady-state throughput must equal λtF\lambda t_F: the working points are the intersections of S(G)S(G) with the line S=λtFS=\lambda t_F.

  • G1G_1 (low load) stable: if GG rises, S>λtFS>\lambda t_F and the load goes back down.
  • G2G_2 (high load) unstable: beyond G2G_2 the queue grows and throughput goes to 00.
  • Example (slotted, λtF=0.12\lambda t_F=0.12): Ge−G=0.12Ge^{-G}=0.12 gives G1=0.138G_1=0.138 and G2=3.32G_2=3.32; at G1G_1, PS=e−0.138=0.871P_S=e^{-0.138}=0.871. If λtF>1/e\lambda t_F>1/e there is no intersection: the system is never stable.

Non-persistent CSMA

  • Parameter. a=τp/tFa=\tau_p/t_F. The channel alternates busy periods BB and idle periods II.
  • Idle. The time between arrivals is exponential: mI=1λ′=tFGm_I=\frac{1}{\lambda'}=\frac{t_F}{G}.
  • Busy. Successful (single frame) with probability PBP−S=e−GaP_{BP-S}=e^{-Ga}, duration mBP−S=tF+τpm_{BP-S}=t_F+\tau_p; colliding with probability 1−e−Ga1-e^{-Ga}, duration Y+tF+τpY+t_F+\tau_p. Here Y∈[0,τp]Y\in[0,\tau_p] is the time between first and last frame, with E[Y]=tF(a−1−e−aGG)E[Y]=t_F\left(a-\frac{1-e^{-aG}}{G}\right).
  • Mean duration mB=tF(1+2a−1−e−aGG)m_B=t_F\left(1+2a-\frac{1-e^{-aG}}{G}\right). Useful part mU=tFe−aGm_U=t_Fe^{-aG}.
  • Formula. S=mUmB+mI=G e−aGG(1+2a)+e−aGS=\dfrac{m_U}{m_B+m_I}=\dfrac{G\,e^{-aG}}{G(1+2a)+e^{-aG}}.
  • Examples. a=0.1a=0.1, G=1G=1: S=0.430S=0.430. a=0.01a=0.01: S=0.493S=0.493. a=1a=1: S=0.109S=0.109. For a→0a\to0: S=GG+1→1S=\frac{G}{G+1}\to1.
  • Maximum SmaxS_{max} for a=10−3a=10^{-3}, 0.010.01, 0.10.1, 11, 1010: 0.940.94, 0.820.82, 0.520.52, 0.140.14, 0.0180.018. With small aa CSMA beats slotted ALOHA; with large aa slotted ALOHA beats CSMA, because listening gives old information.
  • Delay. Pbusy=G(1+a)−(1−e−aG)G(1+2a)+e−aGP_{busy}=\frac{G(1+a)-(1-e^{-aG})}{G(1+2a)+e^{-aG}}; wait before transmitting E[W]=1βPbusy1−PbusyE[W]=\frac1\beta\frac{P_{busy}}{1-P_{busy}} (exponential backoff, E[tb]=1/βE[t_b]=1/\beta); retransmissions E[nretx]=GS−1E[n_{retx}]=\frac GS-1. Formula: E[T]=E[W]+tF+τp+(GS−1)(E[W]+tF+2τp+E[tb])E[T]=E[W]+t_F+\tau_p+\left(\frac GS-1\right)(E[W]+t_F+2\tau_p+E[t_b]).
  • Example. a=0.1a=0.1, G=1G=1, E[tb]=5E[t_b]=5 ms: Pbusy=0.477P_{busy}=0.477, E[W]=4.57E[W]=4.57 ms, retransmissions 1.331.33, E[T]=19.9E[T]=19.9 ms.

TDMA (M/D/1 queue)

  • Idea. Slots of duration tF=F/Rt_F=F/R preassigned to the NuN_u users, in a periodic frame 1,2,…,Nu1,2,\dots,N_u. No collisions: λt=Nuλ\lambda_t=N_u\lambda and S=G=ρ=NuλtFS=G=\rho=N_u\lambda t_F, with S≤1S\le1, no peak and no decline.
  • Delay. Constant service of duration E[y]=NutFE[y]=N_ut_F, so E[w]=SNutF2(1−S)E[w]=\frac{SN_ut_F}{2(1-S)} (Pollaczek-Khinchin).
  • Formula. E[T]=NutF2⏟slot wait+SNutF2(1−S)+tF+τp=tF(Nu2+SNu2(1−S)+1+a)E[T]=\underbrace{\tfrac{N_ut_F}{2}}_{\text{slot wait}}+\tfrac{SN_ut_F}{2(1-S)}+t_F+\tau_p=t_F\left(\tfrac{N_u}{2}+\tfrac{SN_u}{2(1-S)}+1+a\right).
  • Example. Nu=10N_u=10, S=0.5S=0.5, a≈0a\approx0: E[T]/tF=5+5+1=11E[T]/t_F=5+5+1=11. With S=0.1S=0.1 it is 6.566.56; with S=0.9S=0.9, 5151.

FDMA (M/G/1 queue)

  • Idea. The band is divided into subbands: each user has R/NuR/N_u bit/s, μ=RFNu\mu=\frac{R}{FN_u}, and a packet lasts NutFN_ut_F. Throughput equal to TDMA: S=λNutFS=\lambda N_ut_F.
  • Formula. E[s]=S+S22(1−S)λE[s]=\frac{S+\frac{S^2}{2(1-S)}}{\lambda} (Little), so E[T]=tF(Nu+SNu2(1−S)+a)E[T]=t_F\left(N_u+\frac{SN_u}{2(1-S)}+a\right).

TDMA versus FDMA

  • E[T~]FDMA=E[T~]TDMA+Nu2−1E[\tilde T]_{FDMA}=E[\tilde T]_{TDMA}+\frac{N_u}{2}-1 (normalized delay T~=E[T]/tF\tilde T=E[T]/t_F): same queue, but FDMA takes NutFN_ut_F to transmit, TDMA NutF2+tF\frac{N_ut_F}{2}+t_F.
  • Examples. Nu=10N_u=10, S=0.5S=0.5: TDMA 11 tF11\,t_F, FDMA 15 tF15\,t_F. Nu=100N_u=100: 101101 against 150150. At low load the delay depends on the number of users, not on the load.

Comparison

Teoria collegata