Salta al contenuto
Note per Studenti Multiple Access Protocols - ALOHA and CSMA Report

Multiple Access Protocols - ALOHA and CSMA

In questa pagina 9
In questa pagina 7

The problem: one medium, many stations

On the link layer (Data Link Layer and FramingThe data link layer (DLL) delivers a frame from a node to an adjacent node over a link. Services: framing, medium access (MAC) with 48-bit MAC addresses, flow control, error detection and correction. It splits into DLC (framing, error and flow control) and MAC (shared medium access). Framing delimits frames with a flag: byte-oriented protocols (8-bit flag, ESC) use byte stuffing, bit-oriented ones (flag 01111110) use bit stuffing, which inserts a 0 after every five consecutive 1s.Data Link Layer and Framing →) problems split into two families. Data Link Control (DLC: framing, error control with ARQ Protocols - Stop-and-Wait, Go-Back-N and Selective RepeatARQ (Automatic Repeat reQuest) makes an error-prone link reliable: the receiver acknowledges (ACK) frames received correctly and the sender retransmits when the timeout expires. Timeouts (against deadlock) and sequence numbers (against duplicates) are needed. With t_G = t_F + 2 tau_p + t_A and error probability p: Stop-and-Wait rho = t_F(1-p)/t_G; Go-Back-N with window N >= t_G/t_F rho = (1-p)/(1+(N-1)p); Selective Repeat rho = 1-p. Efficiency eta = rho I/F. The optimal window is the pipe capacity in packets. For Selective Repeat there is also an optimal frame length: with overhead o and bit error probability P_b, x_opt is about o/2 + sqrt(o/P_b) (shorter frames when the channel errs more).ARQ Protocols - Stop-and-Wait, Go-Back-N and Selective Repeat →, flow control) applies to both point-to-point and shared links. Medium Access Control (MAC) is needed only when the medium is shared (usually broadcast, everybody hears everybody): it decides when a station may transmit a frame.

The MAC delivers the LLC PDU between source and destination station and offers an acknowledged service. The MAC PDU contains:

Field Content
Destination address (DA) 66 bytes
Source address (SA) 66 bytes
Control depends on the MAC protocol
Information the upper-layer (LLC) PDU
FCS (Frame Check Sequence) 44 bytes for frame integrity check

MAC protocols fall into three families:

  • random access: ALOHA, slotted ALOHA, CSMA, CSMA/CD, CSMA/CA;
  • controlled access: reservation, polling, token passing;
  • channelization: FDMA, TDMA, OFDMA, CDMA, SDMA.

The performance (throughput, delay) of random protocols is computed in 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 →. Here the algorithms are described.

Random access: the idea

In random (or contention) access no station is superior to the others: whoever has data uses a procedure to decide whether to transmit, and there is no predetermined instant to transmit. Stations compete for the channel. If two stations transmit at the same time there is a collision and the frames involved are very likely lost.

Every protocol answers four questions:

  1. when may a station access the medium?
  2. what does it do if the medium is busy?
  3. how is success or failure of a transmission established?
  4. what does it do if there is an access conflict?

Pure ALOHA

Designed in the early 1970s to link computers on different islands of the Hawaiian archipelago (no cables): it is the protocol of ALOHAnet, the first wireless packet data network (History and Structure of the InternetThe Internet grew from ARPANET (1969), a packet-switched network; TCP/IP (1972-77) moved error control from the network nodes to the end hosts, which is what makes it scalable; today it is a network of networks made of local, regional and national ISPs that exchange traffic by peering at IXPs, with IANA, IETF, IRTF, IAB and ISOC coordinating addresses and standards.History and Structure of the Internet →).

Definition (pure ALOHA algorithm).

  1. When: as soon as there is something to transmit.
  2. Medium busy? Transmit anyway, without looking.
  3. Outcome: an ACK/NACK scheme with a timeout. If the ACK does not arrive within the timeout, a collision is assumed.
  4. Conflict: wait a random time (backoff) and retransmit; repeat until success.

The backoff is random for a precise reason: two stations that collided, if they waited the same time, would retransmit together again and collide forever.

One single bit of a frame coexisting on the channel with one single bit of another frame destroys both: pure ALOHA has no rule limiting overlap.

Definition (vulnerable time of pure ALOHA). If station B starts transmitting a frame at time tt (the frame lasts tFt_F), the frame suffers no collision only if no other frame (new or retransmitted) starts from tFt_F seconds before to tFt_F seconds after its start. The vulnerable time is Tvuln=2 tF.T_{vuln}=2\,t_F.

Why two tFt_F: a frame AA started before t−tFt-t_F has already ended when B starts, so it does not disturb; but a frame started in [t−tF,t][t-t_F,t] is still going when B begins, and one started in [t,t+tF][t,t+t_F] overlaps the tail of B. The critical interval is tF+tFt_F+t_F long.

Example. A 10001000-bit frame on a 11 Mbit/s channel: tF=1t_F=1 ms. If B starts at t=10t=10 ms, any other frame starting between 99 ms and 1111 ms destroys it: Tvuln=2T_{vuln}=2 ms.

Grafico interattivo: Vulnerable time of pure ALOHA with tF = 1 ms: frame B starts at 10 ms (lasts 10-11 ms); the coloured band, from 9 to 11 ms, is the start interval that destroys B. A1 (starts at 9.3) and A2 (starts at 10.7) collide, A3 (ends at 9.4) and A4 (starts at 11.3) do not

Slotted ALOHA

Definition (slotted ALOHA algorithm). Time is divided into slots of duration tFt_F and stations are forced to start transmitting only at the beginning of a slot. A frame generated mid-slot waits for the start of the next one (mean wait tF/2t_F/2). Otherwise the algorithm is that of pure ALOHA (ACK, timeout, random backoff).

Since everybody starts only at slot boundaries, two frames overlap either completely or not at all: collision occurs only if two frames are ready in the same slot. The vulnerable time halves: Tvuln=tF.T_{vuln}=t_F.

The price is synchronization: all stations must know the slot boundaries.

The maximum normalized throughput of pure ALOHA is about 0.180.18, that of slotted ALOHA about 0.370.37 (1/e1/e), twice as much (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 → gives the proof).

CSMA: listen before talking

Definition (CSMA). Carrier Sense Multiple Access: each station listens to the medium before transmitting (listen before talk) and transmits only if it finds it idle.

The collision probability decreases, but does not vanish, because of the propagation delay τp\tau_p: a station may sense the channel idle only because the first bit sent by another station has not reached it yet.

Definition (vulnerable time of CSMA). It is the (maximum) propagation time τp\tau_p from one end of the medium to the other: Tvuln=τp.T_{vuln}=\tau_p.

Why: if a station starts transmitting and another tries to do so within τp\tau_p, the latter has not sensed anything yet and there is a collision. But once the first bit of the frame has reached the opposite end, all stations have sensed it and refrain.

Example. A 22 km bus with propagation 2⋅1082\cdot10^{8} m/s: τp=2000/(2⋅108)=10 μ\tau_p=2000/(2\cdot10^{8})=10\ \mus. A 10001000-bit frame at 1010 Mbit/s: tF=1000/107=100 μt_F=1000/10^{7}=100\ \mus. The vulnerable time is 10 μ10\ \mus, one tenth of the frame (τp/tF=0.1\tau_p/t_F=0.1); for pure ALOHA it would be 2tF=200 μ2t_F=200\ \mus, twenty times more. If instead τp\tau_p were comparable to tFt_F (satellite, very fast network), listening would help little: the difference between CSMA and ALOHA disappears.

Variants: what to do if the channel is busy

Variant Algorithm Effect
1-persistent listens continuously; as soon as the channel is idle transmits immediately (with probability 1); if busy keeps listening high collision probability: two or more waiting stations transmit together as soon as the channel frees
non-persistent listens once: if idle transmits immediately; if busy waits a random backoff and listens again fewer collisions (random wait), but lower efficiency: the channel stays idle while frames are waiting
p-persistent channel has slots of duration ≥\ge maximum τp\tau_p; if idle: with probability pp transmits; with probability q=1−pq=1-p waits for the start of the next slot and listens again fewer collisions and better efficiency

In detail, p-persistent, if the channel is idle:

  1. with probability pp send the frame;
  2. with probability q=1−pq=1-p wait for the start of the next slot and listen again:

Logic of the values: p=1p=1 is the 1-persistent case; with small pp the probability that several waiting stations start together drops, but some slots of idle channel are wasted.

Non-persistent CSMA (the Wi-Fi one). Flow: monitor the channel; if idle, send the frame; if no ACK arrives do a random backoff and, while attempts remain, start over; if the channel is busy do a random backoff immediately and listen again. The link layer thus uses a stop-and-wait retransmission policy (ARQ Protocols - Stop-and-Wait, Go-Back-N and Selective RepeatARQ (Automatic Repeat reQuest) makes an error-prone link reliable: the receiver acknowledges (ACK) frames received correctly and the sender retransmits when the timeout expires. Timeouts (against deadlock) and sequence numbers (against duplicates) are needed. With t_G = t_F + 2 tau_p + t_A and error probability p: Stop-and-Wait rho = t_F(1-p)/t_G; Go-Back-N with window N >= t_G/t_F rho = (1-p)/(1+(N-1)p); Selective Repeat rho = 1-p. Efficiency eta = rho I/F. The optimal window is the pipe capacity in packets. For Selective Repeat there is also an optimal frame length: with overhead o and bit error probability P_b, x_opt is about o/2 + sqrt(o/P_b) (shorter frames when the channel errs more).ARQ Protocols - Stop-and-Wait, Go-Back-N and Selective Repeat →).

CSMA/CD (Ethernet)

Definition (CSMA/CD). Carrier Sense Multiple Access with Collision Detection: adds to CSMA the detection of collisions while transmitting. The station monitors the medium during frame transmission:

  • if the energy level on the channel is consistent with the transmission of its own frame, all is well;
  • if it is abnormal (higher), there is a collision: transmission is aborted and a short jamming signal is sent to warn all other stations.

Algorithm: monitor the channel; if idle send the frame; on collision send the jam signal and, if attempts remain, do a random backoff and retry; otherwise terminate. Here too the link layer uses stop-and-wait. Advantage over CSMA: as soon as a frame is understood to be lost, the channel stops being wasted with the rest of a frame doomed to be lost.

Minimum transmission duration

For detection to work, the station must notice the collision before it has finished transmitting the frame. If it had already sent the last bit when the collision reaches it, it would believe it succeeded and would never retransmit that frame (no lower layer would discover it).

Worst case. Station A starts transmitting at t=0t=0. Another station B, at the other end of the medium, starts just before A's signal reaches it, i.e. at t≈τpt\approx\tau_p. The collision occurs near B, but its effect travels back to A in another τp\tau_p: A notices at t≈2τpt\approx2\tau_p. B is sure to have captured the channel only after 2τp2\tau_p.

Formula (minimum frame duration in CSMA/CD). To be sure a transmission succeeded, tF ≥ 2 τp,tF=FR ⟹ F ≥ 2 τp R.t_F\ \ge\ 2\,\tau_p,\qquad t_F=\frac FR\ \Longrightarrow\ F\ \ge\ 2\,\tau_p\,R.

The second relation follows by substituting tF=F/Rt_F=F/R (frame length in bits over bitrate) and multiplying both sides by R>0R>0. The meaning: the frame must contain at least as many bits as fit on the medium in the round-trip time, 2τpR2\tau_pR (the bandwidth-delay product of 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 →).

Grafico interattivo: Space-time diagram of the CSMA/CD worst case (position on the x axis from A at 0 to B at 1; time on the y axis in units of tau_p): A starts at t = 0, B starts at t = tau_p, just before sensing A; the collision reaches A at t = 2 tau_p, so A must still be transmitting

Example (reference values). R=10R=10 Mbit/s and τp=25.6 μ\tau_p=25.6\ \mus (the maximum delay, including repeaters): tF≥2τp=2⋅25.6=51.2 μt_F\ge2\tau_p=2\cdot25.6=51.2\ \mus, so Fmin=10⋅106 bit/s⋅51.2⋅10−6 s=512F_{min}=10\cdot10^{6}\ \text{bit/s}\cdot51.2\cdot10^{-6}\ \text{s}=512 bit =512/8=64=512/8=64 B. This is exactly the minimum Ethernet frame length (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 →).

Performance and network size. Compare τ~p=τp/tF\tilde\tau_p=\tau_p/t_F (=a=a):

  • R=10R=10 Mbit/s, F=10F=10 kbit, d=200d=200 m of cable: tF=104/107=1t_F=10^4/10^7=1 ms, τp=200/(2⋅108)=1 μ\tau_p=200/(2\cdot10^8)=1\ \mus, so τ~p=0.001\tilde\tau_p=0.001: propagation is negligible, collisions are very rare.
  • Same network at R=10R=10 Gbit/s: tF=1 μt_F=1\ \mus and τ~p=1\tilde\tau_p=1: now propagation and transmission are equal, CSMA/CD is much less efficient (and the constraint tF≥2τpt_F\ge2\tau_p would not be met).
  • If the shared medium is "compressed" into a box (hub or switch, a few cm), τp\tau_p becomes tiny and a mini-LAN results where the problem disappears.

CSMA/CA (Wi-Fi)

Definition (CSMA/CA). Carrier Sense Multiple Access with Collision Avoidance: invented for wireless networks, where a collision cannot be detected during transmission (one's own transmission overwhelms what is received). Collisions are not detected, they are avoided.

There are four ingredients: IFS, contention window (CW), ACK, and optionally RTS/CTS.

Interframe space (IFS). When the channel is idle the station does not transmit immediately: it waits a time called IFS. The data frame starts after the channel has been sensed idle for DIFSDIFS seconds (a protocol constant; in the standard DIFS=SIFS+2DIFS=SIFS+2 slots). IFSs also give priority: a shorter IFS goes first. They are SIFS<PIFS<DIFSSIFS<PIFS<DIFS, with SIFS=16 μSIFS=16\ \mus fixed in 802.11 (the minimum separation: round-trip propagation plus local MAC processing).

Two-way handshake. The data frame starts only after DIFSDIFS of idle channel; the receiver answers with an explicit ACK after a time SIFSSIFS. Since SIFS<DIFSSIFS<DIFS, the ACK has priority over any new frame. The link layer uses stop-and-wait retransmission: if the frame fails it is retransmitted until success or the maximum number of attempts.

Contention window and backoff. If the channel is busy (or after a failure) a random time is waited, with this mechanism:

  • the contention window CWCW is defined, expressed in transmission slots (constant duration TslotT_{slot});
  • when the channel is found busy, an integer backoff counter bb is drawn uniformly in [0,CW−1][0,CW-1] (each of the CWCW values has probability 1/CW1/CW); the backoff time is tb=b Tslott_b=b\,T_{slot};
  • start from CWmin=15CW_{min}=15 and CWCW doubles at every failure of the frame (CWn+1=min⁡{2 CWn, CWmax}CW_{n+1}=\min\{2\,CW_n,\,CW_{max}\}), up to CWmax=1023CW_{max}=1023 (in 802.11 Tslot=9 μT_{slot}=9\ \mus; the standard values are 15,31,63,…,102315,31,63,\dots,1023, powers of two minus one);
  • the channel is sensed at the end of each slot: while idle the counter decreases by one; when busy the countdown freezes and resumes when the channel is idle again;
  • transmission is allowed when the counter reaches 00.

Grafico interattivo: Contention window CW after n consecutive failures (802.11 standard): 15, 31, 63, ..., 1023 and then stays at the maximum

Example. At the first attempt CW=15CW=15 and Tslot=9 μT_{slot}=9\ \mus: if b=7b=7 is drawn the station waits 7⋅9=63 μ7\cdot9=63\ \mus of idle channel. If the channel becomes busy after 44 idle slots, the counter stays frozen at 33 until the other transmission ends, then resumes and at 00 the station transmits. The station with the lowest counter wins the contention: this is why stations that waited longer (frozen counter) tend to go first next time.

Why the window doubles. Two stations in contention draw the same value, and therefore collide, with probability ∑b1CW⋅1CW=1CW\sum_b\frac1{CW}\cdot\frac1{CW}=\frac1{CW} (independent draws): about 1/15=6.7 %1/15=6.7\,\% with CW=15CW=15. After a failure CW=31CW=31 and the probability drops to about 1/31≈3.2 %1/31\approx3.2\,\%: the more stations contend, the wider the window must be, and doubling widens it only when a collision happened. The mean wait of one draw is (CW−1)/2(CW-1)/2 slots: with CW=15CW=15, 77 slots =7⋅9=63 μ=7\cdot9=63\ \mus.

Even with all these precautions a collision can still destroy data (two stations draw the same bb), and data may also be corrupted during transmission. The positive ACK and the timeout assure the sender that the receiver got the frame.

RTS/CTS and NAV (optional). To reduce collisions due to stations that do not hear each other (hidden terminal, see 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 →):

  1. the station that won the channel sends a control frame RTS (Request To Send) to the destination;
  2. after a SIFSSIFS interval only the destination answers with a CTS (Clear To Send), heard by everybody: "I am ready to receive";
  3. after another SIFSSIFS the source sends the data; after SIFSSIFS the ACK arrives;
  4. all other stations hearing RTS or CTS set a timer, the NAV (Network Allocation Vector), indicating how long must pass before they may listen to the channel again; before sensing the channel every station checks whether its NAV has expired.

The NAV is a "virtual" listening of the channel: even a station that does not hear the data transmission knows the channel is busy.

Summary of random access protocols

Protocol Rule Vulnerable period
ALOHA no rule: transmit as soon as there is a frame, regardless of network state 2tF2t_F
Slotted ALOHA start transmitting only at the beginning of a slot tFt_F
CSMA before transmitting, listen to the channel and check nobody else is transmitting τp\tau_p
CSMA/CD like CSMA, and keep listening during transmission, aborting on collision τp\tau_p (with tF≥2τpt_F\ge2\tau_p)
CSMA/CA IFS + CW + ACK + RTS/CTS + NAV τp\tau_p (collisions avoided, not detected)

Controlled access

Here stations do not compete: a mechanism decides who may transmit, and there are no collisions.

Reservation. Time is divided into intervals; in each interval a reservation frame precedes the data frames. With NN stations there are exactly NN minislots, one per station. A station with data reserves in its minislot; those that reserved send data after the reservation frame.

Polling (used, e.g., in Bluetooth). One station is primary and the others secondary (star topology, Network Types and TopologiesNetworks are classified by extent (BAN, WLAN, LAN, MAN, WAN, WSN), by transmission medium (air, fibre, copper, visible light) and by topology: bus (shared medium, collisions), star (central node, bottleneck), ring (each node forwards to the next), mesh (a direct link between every pair: n(n-1)/2 links). The choice depends on reliability, scalability, protocol and physical medium.Network Types and Topologies →): all exchanges go through the primary device, which controls the link and decides who uses the channel and when; the primary always starts and uses the poll and select functions to avoid collisions. Drawback: if the primary fails, the system fails.

  • Select (the primary has something to send): the primary warns the secondary of the incoming transmission with a SEL frame containing the secondary's address, and waits for an ACK confirming it is ready; then it sends the data and the secondary answers with an ACK.
  • Poll (the primary wants to receive): it asks each device whether it has something to send; the polled secondary answers with a NAK (nothing to say) or with data; with data the primary reads the frame and returns an ACK. The walk time is the time to pass control from one station to the next in the polling cycle.

Token passing. Stations are organized in a logical ring, each with a predecessor and a successor. A special packet, the token, circulates on the ring: holding the token gives the right to access the channel. A station with data waits for the token from its predecessor, keeps it and sends data, and at the end releases it, passing it to the successor; a station without data passes the token immediately. Token management requires limiting the holding time (otherwise a station monopolizes the network) and checking that the token is not lost or destroyed.

Channelization

The channel is split among stations in a fixed way, by frequency, time, code or space.

Method How it splits the channel
FDMA (Frequency Division) the available band is divided into frequency bands; each band is reserved for one station for all the time; bandpass filters confine frequencies; suited to continuous flows (cellular telephony)
TDMA (Time Division) stations share the channel band in time: each is assigned a slot; the problem is synchronization (each station must know the start and position of its slot, hard over large distances because of propagation delays)
OFDMA (Orthogonal FDMA) the band is distributed to different users at the same instant; subcarriers assigned to contiguous groups; used together with TDMA, resources are split in the time-frequency plane (in 4G/5G each block is a Resource Block)
CDMA (Code Division) each station uses the whole band and all transmit simultaneously, told apart by special codes (like two people talking privately in a crowded room using a language others do not understand)
SDMA (Space Division) whole band for the whole time, but users are multiplexed in space with directional beams (antenna arrays): different areas reuse the same frequency

The performance of TDMA and FDMA as queueing systems is in 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 →.

Versione ripasso

Pure ALOHA

  • Algorithm. Transmit as soon as there is a frame, without looking at the channel. Outcome via ACK and timeout. If the ACK is missing, random backoff and retransmit. Backoff is random because stations waiting the same time would collide again.
  • Collision. A single bit of overlap destroys both frames.
  • Vulnerable time Tvuln=2tFT_{vuln}=2t_F: no other frame may start from tFt_F before to tFt_F after the start.
  • Example. 10001000-bit frame at 11 Mbit/s, tF=1t_F=1 ms, start at t=10t=10 ms: collides with any frame starting between 9 and 11 ms.

Slotted ALOHA

CSMA (listen before talk)

  • Listen to the medium and transmit only if idle. Collisions do not vanish: the propagation delay τp\tau_p remains, because another station's first bit may not have arrived yet.
  • Vulnerable time Tvuln=τpT_{vuln}=\tau_p: after τp\tau_p all stations have heard the frame and refrain.
  • Example. 22 km bus, v=2⋅108v=2\cdot10^8 m/s: τp=10 μ\tau_p=10\ \mus. 10001000-bit frame at 1010 Mbit/s: tF=100 μt_F=100\ \mus, so τp/tF=0.1\tau_p/t_F=0.1. Vulnerable 10 μ10\ \mus against 200 μ200\ \mus for pure ALOHA.
variant algorithm effect
1-persistent listens continuously; when idle transmits at once (probability 1) many collisions: several waiting stations start together
non-persistent listens once; if busy waits a random backoff and listens again fewer collisions, but the channel stays idle while frames wait
p-persistent slots of duration ≥τp\ge\tau_p; when idle transmits with probability pp, otherwise waits for the next slot and listens again; if busy, backoff fewer collisions and better efficiency

CSMA/CD (Ethernet)

CSMA/CA (Wi-Fi)

Summary of random access

protocol rule vulnerable period
ALOHA no rule 2tF2t_F
Slotted ALOHA start only at a slot boundary tFt_F
CSMA listen before transmitting τp\tau_p
CSMA/CD like CSMA, listening during transmission τp\tau_p (with tF≥2τpt_F\ge2\tau_p)
CSMA/CA IFS, CW, ACK, RTS/CTS, NAV τp\tau_p (collisions avoided, not detected)

Controlled access

Channelization

  • FDMA: frequency bands reserved for all the time (analog cellular). TDMA: one time slot per station; synchronization is hard over large distances. OFDMA: subcarriers assigned to groups of users at the same instant, combined with TDMA (4G/5G, Resource Block). CDMA: whole band, different codes for each station. SDMA: directional antenna beams, same frequency in different areas.
  • Typical mistakes: believing CSMA eliminates collisions (τp\tau_p remains); forgetting that CSMA/CD requires tF≥2τpt_F\ge2\tau_p; confusing RTS/CTS (reserves the channel) with the ACK (confirms the frame); using the same backoff for all stations.

Teoria collegata