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 , the geometric distribution and the exponential distribution are needed.
Symbols
| Quantity | Symbol | Unit |
|---|---|---|
| Number of stations | customers | |
| Propagation time | s | |
| Frame size (data PDU, constant) | bit | |
| Frame transmission time (constant) | s | |
| Timeout | s | |
| Arrival rate of new frames (Poisson process, PP) | frame/s | |
| Backoff time after a collision | s | |
| New plus retransmitted frames (modelled as PP) | frame/s | |
| Service rate (constant) | frame/s |
The model assumes that the set of new frames and frames retransmitted after a collision still forms a Poisson process of rate . It is an approximation, but makes the computations tractable.
Pure ALOHA
Three metrics are defined:
Definition (metrics of a random access protocol).
- Offered traffic : mean number of frames (new and retransmitted) arriving in one service time, .
- Success probability : probability that a transmission succeeds, .
- Throughput : mean number of frames transmitted successfully in one frame time, .
The last equality has a physical meaning: in steady state all new frames eventually get through, so the frames successfully delivered per second are , and normalized to the frame time they give (the useful traffic of queueing theory).
Throughput
A frame transmitted at time succeeds if no other frame (new or retransmitted) arrives during the vulnerable period of duration . The number of arrivals in an interval of length is Poisson with mean , and the probability of zero arrivals () is . The two half-intervals are disjoint, so arrivals in each are independent and probabilities multiply:
Formula (throughput of pure ALOHA).
The maximum is found by differentiating. By the product rule: The derivative is positive for and negative afterwards, so it is a maximum:
Example. With : and , the channel is used : on a Mbit/s channel at most kbit/s are delivered. With (low load) and : almost everything that arrives gets through, but of attempts collide. With (high load) and : the channel is flooded by collisions.
Delay
The mean number of transmissions needed to deliver a frame: each has success probability , so the count is geometric: The total delay is the successful transmission () plus, for each retransmission, the failed transmission (), the wait for the NACK or timeout (propagation round trip ) and the mean backoff :
Formula (mean delay of pure ALOHA).
Example. ms, ms, ms (so the repeated term is ms and the fixed part ms).
| ms | |||
| ms | |||
| ms |
The delay grows fast with load, already before the throughput maximum.
Slotted ALOHA
The vulnerable period is a single (the frame suffers no collision if no other frame was generated in the slot preceding its start):
Formula (throughput of slotted ALOHA).
The maximum doubles with respect to pure ALOHA (), and is reached at twice the offered load ( against ).
Delay. Each (re)transmission waits on average half a slot, , before starting at the slot boundary:
Example. Same data as pure ALOHA: gives ms (against ms for pure ALOHA); gives ms (against ); gives 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 : fixed part ms, retransmissions , cost of each ms, so 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 , not at equal .
Stability: the two operating points
The offered load is not a given: it also depends on retransmissions. In steady state the throughput must equal the normalized arrival rate : operating points are the intersections of the curve with the horizontal line .
If there are two intersections, :
- at (low load) the point is stable: if rises a little, (the system clears more frames than arrive) and the load goes back down;
- at (high load) the point is unstable: beyond the throughput 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 .
Example (slotted ALOHA). With frames per slot: has the two solutions and . The equation has no elementary solution; it is found by trial or iteration. Low branch: starting from gives . High branch: starting from gives . The system lives at : ( of attempts collide). A traffic peak pushing it beyond sends it into collapse. If there is no intersection: the system is never stable.
Non-persistent CSMA
The analysis divides time into cycles: each cycle is a busy period (, activity on the channel) followed by an idle period (, channel free). The normalized propagation delay is
Idle period. Frames (new and retransmitted) arrive as a Poisson process of rate , so the time between two arrivals, i.e. the idle period, is exponential with parameter and has mean
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 succeeds if no other frame arrives in the vulnerable time : The useful part is if successful and if colliding, so
Successful period. Lasts the frame plus its propagation: .
Colliding period. Let be the time between the start of the first and of the last frame of the period: since after all stations have heard the transmission and no longer start. The period lasts . The distribution of is the probability that in (length ) no frame arrives: The integral by parts, with and : In the last step and are substituted.
Mean duration of the busy period. Averaging the two cases: because and .
Formula (throughput of non-persistent CSMA). The throughput is the mean useful time per cycle over the mean cycle duration :
Step to the result: in the denominator factor out and add the two fractions with , , so the denominator is ; cancel and multiply numerator and denominator by .
Extreme cases: with (negligible propagation) for large : CSMA fills the channel. With large propagation weighs and drops, as for ALOHA.
Example. , : and , so . With : ; with : .
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 :
| (at ) | () | () | () | () |
For CSMA peaks at , below slotted ALOHA (), and for it collapses to , below even pure ALOHA (). The comparison with slotted ALOHA thus depends on :
- small propagation delay relative to (e.g. ): CSMA does better than slotted ALOHA;
- large propagation delay (e.g. ): 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 seconds in which the channel may be found busy, so When the channel is busy (or after a collision) a backoff exponential with parameter is waited, . The number of times the channel is found busy before finding it idle is geometric with "failure" probability : , each wait lasting on average. Hence the mean wait before transmitting is The mean number of retransmissions is (from with ):
Formula (mean delay of non-persistent CSMA).
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. ms, ms (), ms, . Step by step:
- (computed above);
- ms and ms;
- ;
- ms;
- mean retransmissions ;
- ms.
For CSMA has lower delay at equal throughput; for the opposite holds.
TDMA (M/D/1 queue)
Definition (TDMA). The time axis is divided into slots of equal duration, preassigned to the users; each user may transmit freely in its slot, where it has the full bitrate . Assignment follows a periodic scheme (the TDMA frame: ). The packet transmission time equals the slot duration: .
Throughput. Each user has Poisson arrivals of rate ; the total rate is . If each user's queue is stable: TDMA has no collisions: throughput equals load as long as , and (no peak and no decline).
Delay. For a given user: after transmitting it must wait slots before its next turn, so it serves constantly one packet per frame: 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 : The delay has four contributions:
- slot wait: when a packet arrives, its arrival instant falls at random within the frame of duration (uniform), so on average half a frame, , is waited until the user's turn returns;
- queueing wait , due to packets already present;
- the transmission time ;
- the final propagation .
Formula (mean delay of TDMA).
Example. users, ms, , load : slot wait , queueing wait , transmission , so , i.e. ms. At low load () ; with the queue weighs and the total is .
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 , split equally among the users: each has bit/s. The service rate of a user is
The packet transmission time in FDMA is therefore (a packet of bits goes at bit/s: , i.e. on a band times narrower).
Throughput (per user, in steady state): 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 and, with Little, the system time is With (from ) the factor multiplies each term: Adding the propagation :
Formula (mean delay of FDMA).
TDMA versus FDMA
Comparing the two formulas, the normalized delay differs by a constant:
Why: the queueing wait is the same (same and same constant service of duration ); what changes is how the packet is served. In FDMA the packet occupies to be transmitted; in TDMA it waits on average for the slot and then is sent in , total . TDMA is therefore faster by (for 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 the difference rises to frame times: e.g. at TDMA has and FDMA ; at low load the delay is dominated by the or 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 | Notes | |
|---|---|---|---|
| Pure ALOHA | () | no synchronization, vulnerable | |
| Slotted ALOHA | () | slot synchronization | |
| Non-persistent CSMA | as | better than slotted ALOHA only if is small | |
| TDMA, FDMA | no collisions; |
Versione ripasso
- Assumptions. Constant frame length: , . New plus retransmitted frames form a Poisson process of rate (an approximation that makes the computations tractable, 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 →).
- Metrics. Offered traffic (includes retransmissions). Success probability . Useful throughput . A frame succeeds only if no other frame arrives in the vulnerable time: probability (Poisson with ).
Pure ALOHA
- Vulnerable time : , . Maximum at : .
- Example. : (18.4 % of the channel, i.e. 184 kbit/s out of 1 Mbit/s). : . : , channel flooded by collisions.
- Delay. Transmissions are geometric: , so . Formula: .
- Example ( ms, ms, ms, repeated term 6.2 ms): ms; ms; ms.
Slotted ALOHA
- Vulnerable time : , . Maximum at : , twice pure ALOHA.
- Delay. Each attempt waits half a slot on average, : .
- Example (same data): ms; ms; 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 .
Two operating points
The steady-state throughput must equal : the working points are the intersections of with the line .
- (low load) stable: if rises, and the load goes back down.
- (high load) unstable: beyond the queue grows and throughput goes to .
- Example (slotted, ): gives and ; at , . If there is no intersection: the system is never stable.
Non-persistent CSMA
- Parameter. . The channel alternates busy periods and idle periods .
- Idle. The time between arrivals is exponential: .
- Busy. Successful (single frame) with probability , duration ; colliding with probability , duration . Here is the time between first and last frame, with .
- Mean duration . Useful part .
- Formula. .
- Examples. , : . : . : . For : .
- Maximum for , , , , : , , , , . With small CSMA beats slotted ALOHA; with large slotted ALOHA beats CSMA, because listening gives old information.
- Delay. ; wait before transmitting (exponential backoff, ); retransmissions . Formula: .
- Example. , , ms: , ms, retransmissions , ms.
TDMA (M/D/1 queue)
- Idea. Slots of duration preassigned to the users, in a periodic frame . No collisions: and , with , no peak and no decline.
- Delay. Constant service of duration , so (Pollaczek-Khinchin).
- Formula. .
- Example. , , : . With it is ; with , .
FDMA (M/G/1 queue)
- Idea. The band is divided into subbands: each user has bit/s, , and a packet lasts . Throughput equal to TDMA: .
- Formula. (Little), so .
TDMA versus FDMA
- (normalized delay ): same queue, but FDMA takes to transmit, TDMA .
- Examples. , : TDMA , FDMA . : against . At low load the delay depends on the number of users, not on the load.
Comparison
- Pure ALOHA , maximum ; slotted ALOHA , maximum ; non-persistent CSMA , near only if (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 →); TDMA and FDMA , maximum . Algorithms 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 →.
- Typical mistakes: confusing (offered, with retransmissions) with (useful); believing always grows with (beyond the maximum it drops); writing for pure ALOHA (it is ); forgetting the slot wait in slotted ALOHA.