280 likes | 438 Views
Chap 4 Multiaccess Communication (Part 1). Ling-Jyh Chen. Overview. Ethernet and Wi-Fi are both “multi-access” technologies Broadcast medium, shared by many hosts Simultaneous transmissions will result in collisions Media Access Control (MAC) protocol required Rules on how to share medium.
E N D
Chap 4 Multiaccess Communication(Part 1) Ling-Jyh Chen
Overview • Ethernet and Wi-Fi are both “multi-access” technologies • Broadcast medium, shared by many hosts • Simultaneous transmissions will result in collisions • Media Access Control (MAC) protocol required • Rules on how to share medium
Media Access Control Protocols • Channel partitioning • Divide channel into smaller “pieces” (e.g., time slots, frequency) • Allocate a piece to node for exclusive use • E.g. Time-Division-Multi-Access (TDMA) cellular network • Taking-turns • Tightly coordinate shared access to avoid collisions • E.g. Token ring network • Contention • Allow collisions • “recover” from collisions • E.g. Ethernet, Wi-Fi
Contention Media Access Control Goals • Share medium • If two users send at the same time, collision results in no packet being received (interference) • If no users send, channel goes idle • Thus, want to have only one user send at a time • Want high network utilization • TDMA doesn’t give high utilization • Want simple distributed algorithm • no fancy token-passing schemes that avoid collisions
Developed in the 1970s for a packet radio network Evolution of Contention Protocols Aloha SlottedAloha Improvement: Start transmission only at fixed times (slots) CSMA = Carrier Sense Multiple Access Improvement: Start transmission only if no transmission is ongoing CSMA CD = Collision Detection Improvement: Stop ongoing transmission if a collision is detected (e.g. Ethernet) CSMA/CD
4.2 Idealized slotted multiaccess model m transmitting nodes and one receiver • Slotted system • packets are of the same length • each packet requires one time unit for transmission • the reception of each packet starts at an integer time and ends before the next integer time
Poisson Arrivalsoverall arrival rate of the system: λindividual rate of each node: λ/m • Collision or Perfect Reception • If just one node sends a packet in a given slot, the packet is correctly received. • If two or more nodes send a packet in a given time slot, then there is a collision and the receiver obtains no information about the contents or the source of the transmitted packets.
0,1,e Immediate Feedback • Assuming each node obtains feedback from the receiver at the end of each slot • Retransmission of Collisions • Assuming each packet involved in a collision must be retransmitted in some later slot. • A node with a packet that must be retransmitted is said to be backlogged.
Two addition assumptions • No buffering • If one packet at a node is currently waiting for transmission or colliding with another packet during transmission, new arrivals at that node are discarded and never transmitted. • This assumption provides the lower bound to the delay for systems with buffering and flow control! • Infinite set of nodes (m=∞): • This assumption provides the upper bound!
Slotted ALOHA • The basic idea: • Each unbacklogged node simply transmit a newly arriving packet in the first slot after packet arrival. • Slotted ALOHA risks occasional collisions but achieves very small delay if collisions are rare. • Contrast to TDM systems, which avoids collisions at the expense of large delays.
Slotted ALOHA (cont.) • When a collision occurs, each node sending one of the colliding packets discovers the collision at the end of the slot and becomes backlogged. • Such nodes wait for some random number of slots before retransmitting.
Slotted ALOHA (cont.) • Using infinite-node assumption, the total number of retx and tx in a given slot is a Poisson random variable with parameter G, where G> λ. • The prob. of a successful transmission in a slot is • In equilibrium, the arrival rate, λ, should be the same as the departure rate, Ge-G.
Slotted ALOHA (cont.) • Using GNUPlotset xr [0:5]plot x*exp(-x)
Slotted ALOHA (cont.) • The MAX departure rate occurs at G=1 and is 1/e ≈ 0.368. • If G<1, too many idle slots are generated. • If G>1, too many collisions are generated.
Slotted ALOHA (cont.) • Markov Chain for Slotted ALOHA • State: the number of backlogged packets • Increases by the number of new arrivals transmitted by unbacklogged nodes • Decreases by one each time if a packet is transmitted successfully.
Slotted ALOHA (cont.) • qr: the prob. of a backlogged node retx in the next slot • i.e., the number of slots from a collision until a given node involved in the collision retx is a geometric R.V. having value i>1 with prob. qr(1-qr)i-1 • qa: the prob. of an unbacklogged node transmits a packet in the given slot • i.e. qa=1-e-λ/m
Slotted ALOHA (cont.) • Qa(i, n): the prob. that i unbacklogged nodes transmit packets in a given slot • Qr(i, n): the prob. that i backlogged nodes transmit.
Slotted ALOHA (cont.) • Dn: “drift” in state n, i.e. the expected change in backlog over one slot time • G(n): the expected number of attempted transmissions in a slot • If qa and qr are small,
Slotted ALOHA (cont.) • The “drift” is the difference between the throughput curve (Ge-G) and the straight line:
Slotted ALOHA (cont.) • Using infinite-node assumption: • Using no-buffering assumption: • 4.2.3 (optional)
Unslotted ALOHA • Unslotted ALOHA (a.k.a. Pure ALOHA) was the precursor to slotted ALOHA. • In Pure ALOHA, each node transmits a new packet immediately upon receiving, rather than waiting for a slot boundary. • If a packet is involved in a collision, it is retransmitted after a random delay.
Unslotted ALOHA (cont.) • A frame (red frame) will be in a collision if and only if another transmission begins in the vulnerable period of the frame • Vulnerable period has the length of 2 frame times
Unslotted ALOHA (cont.) • Since arrivals are independent, Psucc=e-2G • Since attempted transmissions occur at rate G(n), the throughput = Ge-2G • The MAX throughput of a Pure ALOHA system = 1/(2e), achieved when G=0.5. • If λ is very small and the mean retx time is very large, the system can be expected to run for long periods w/o major backlog buildup. • The main adv. of pure ALOHA is that it can be used with variable-length packets.