Multiple Access Protocols Chapter 6 of Hiroshi Harada Book Khurram Masood 200806100 Introduction • Multiple access control channels – Each node is attached to a transmitter/receiver which communicates via a channel shared by other nodes – Transmission from any node is received by other nodes Node 3 Node 1 Shared Multiple Access Control Channel to BS Node 4 … Node 2 Node N 2 Introduction (Cont’d) • Multiple access issues – If more than one node transmit at a time on the control channel to BS, a collision occurs – How to determine which node can transmit to BS? • Multiple access protocols – Solving multiple access issues – Different types: • Contention protocols resolve a collision after it occurs. These protocols execute a collision resolution protocol after each collision • Collision-free protocols (e.g., a bit-map protocol and binary countdown) ensure that a collision can never occur. 3 Packet Communication System Configuration 4/13/2015 4 Classification of Multiple Access Protocols Multiple access protocols Contention-based Random access Conflict-free Collision resolution ALOHA, TREE, FDMA, CSMA, WINDOW, etc TDMA, BTMA, ISMA, etc BTMA: Busy Tone Multiple Access ISMA: Internet Streaming Media Alliance CDMA, Token Bus, DQDB, etc DQDB: Distributed Queue Dual Bus 5 Contention Protocols • ALOHA – Developed in the 1970s for a packet radio network by Hawaii University. – Whenever a station has a data, it transmits. Sender finds out whether transmission was successful or experienced a collision by listening to the broadcast from the destination station. Sender retransmits after some random time if there is a collision. • Slotted ALOHA – Improvement: Time is slotted and a packet can only be transmitted at the beginning of one slot. Thus, it can reduce the collision duration. 6 Contention Protocols (Cont’d) • CSMA (Carrier Sense Multiple Access) – Improvement: Start transmission only if no transmission is ongoing • CSMA/CD (CSMA with Collision Detection) – Improvement: Stop ongoing transmission if a collision is detected • CSMA/CA (CSMA with Collision Avoidance) – Improvement: Wait a random time and try again when carrier is quiet. If still quiet, then transmit • CSMA/CA with ACK • CSMA/CA with RTS/CTS 7 ALOHA 4/13/2015 8 ALOHA 4/13/2015 9 ALOHA Waiting a random time Node 1 Packet Node 2 Packet Retransmission 1 2 3 3 Retransmission 2 Time Collision Node 3 Packet Collision mechanism in ALOHA 10 Collisions in (Pure) ALOHA Station 1 1.1 1.2 1.3 Transmission Time (F) 2.1 2.2 Station 2 3.1 3.2 Station 3 Complete Collision Broadcast channel Partial Collision Throughput of ALOHA • The probability that n packets arrive in two packets time is given by P(n ) = n (2G) e-2G n! where G is traffic load. • The probability P(0) that a packet is successfully received without collision is calculated by letting n=0 in the above equation. We get P(0) = e-2G • We can calculate throughput S with a traffic load G as follows: S = G P(0) = G e-2G • The Maximum throughput of ALOHA is S max = 1 0.184 2e 12 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.) Frame which collides with start of red frame Frame which collides with end of red frame Frame t0-F t0 Vulnerable Period of red frame • • t0+F Time 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. Slotted ALOHA Node 1 Packet Nodes 2 & 3 Packets Retransmission 1 2&3 2 Retransmission 3 Time Slot Collision Collision mechanism in slotted ALOHA 16 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. Collisions in S-ALOHA Station 1 1.1 1.3 1.2 Transmission Delay 2.1 2.2 Station 2 3.2 3.1 Station 3 Complete Collision Broadcast channel 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.) • 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. Throughput of Slotted ALOHA • The probability of no collision is given by P(0) = e-G • The throughput S is S = G P(0) = G e-G • The Maximum throughput of slotted ALOHA is S max = 1 0.368 e 21 Throughput 0.5 0.4 0.368 0.3 S Slotted Aloha 0.2 0.1 00 0.184 Aloha 2 4 G 6 8 G 22 Comparison of ALOHA and S-ALOHA 0.5 Throughput (ALOHA) Ideal (no collisions): R 0.4 Slotted ALOHA: Re -R 0.3 0.2 Pure ALOHA: Re-2R 0.1 0 0 0.5 1 1.5 R 2 2.5 3 CSMA 4/13/2015 24 CSMA 4/13/2015 25 CSMA 4/13/2015 26 CSMA (Carrier Sense Multiple Access) • Max throughput achievable by slotted ALOHA is 0.368. • CSMA gives improved throughput compared to Aloha protocols. • Listens to the channel before transmitting a packet (avoid avoidable collisions). 27 Collision Mechanism in CSMA Node 5 sense Node 1 Packet Node 2 Packet Node 3 Packet 1 2 Delay 3 4 5 Time Delay Collision Node 4 sense 28 Kinds of CSMA Unslotted Nonpersistent CSMA Nonpersistent CSMA Slotted Nonpersistent CSMA CSMA Unslotted persistent CSMA Persistent CSMA Slotted persistent CSMA 1-persistent CSMA p-persistent CSMA Non persistent CSMA 4/13/2015 30 Slotted non persistent ISMA 4/13/2015 31 Computer Simulation Configuration 4/13/2015 32 Layout of access point and user terminals 4/13/2015 33 Simulation and results • Simulation – – – – Pure ALOHA Slotted ALOHA Non persistent CSMA Non persistent ISMA • Results – Throughput – Average delay time 4/13/2015 34 Pure ALOHA Throughput of Pure ALOHA system 0.25 Throughput 0.2 0.15 0.1 0.05 0 without capture effect with capture effect theory 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Traffic(Simulation result) 4/13/2015 35 Pure ALOHA Average Delay time of Pure ALOHA system 3000 Average Delay time(packet) without capture effect with capture effect 2500 2000 1500 1000 500 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 Traffic(Simulation result) 4/13/2015 36 Slotted ALOHA Throughput of Slotted ALOHA system 0.5 0.45 Throughput 0.4 0.35 0.3 0.25 0.2 0.15 without capture effect with capture effect theory 0.1 0.05 0 0.5 1 1.5 2 2.5 3 3.5 4 Traffic(Simulation result) 4/13/2015 37 Slotted ALOHA Average Delay time of Slotted ALOHA system Average Delay time(packet) 1400 without capture effect with capture effect 1200 1000 800 600 400 200 0 0 0.5 1 1.5 2 2.5 3 3.5 4 Traffic(Simulation result) 4/13/2015 38 Non persistent CSMA Throughput of np CSMA system Throughput 1.5 without capture effect (a=0.01) with capture effect (a=0.01) theory without capture effect (a=0.1) with capture effect (a=0.1) theory 1 0.5 0 -2 10 -1 10 0 10 1 10 2 10 3 10 Traffic(Simulation result) 4/13/2015 39 Non persistent CSMA Average Delay time of np CSMA system Average Delay time(packet) 900 800 700 without capture effect (a=0.01) with capture effect (a=0.01) without capture effect (a=0.1) with capture effect (a=0.1) 600 500 400 300 200 100 -1 10 0 10 1 10 2 10 Traffic(Simulation result) 4/13/2015 40 Non persistent ISMA Throughput of Slotted np ISMA system 0.9 0.8 Throughput 0.7 0.6 0.5 0.4 without capture effect (d=0.01) with capture effect (d=0.01) theory without capture effect (d=0.1) with capture effect (d=0.1) theory 0.3 0.2 0.1 0 -2 10 -1 10 0 10 1 10 2 10 3 10 Traffic(Simulation result) 4/13/2015 41 Non persistent ISMA Average Delay time of Slotted ISMA system Average Delay time(packet) 450 400 350 without capture effect (d=0.01) with capture effect (d=0.01) without capture effect (d=0.1) with capture effect (d=0.1) 300 250 200 150 100 50 -2 10 -1 10 0 10 1 10 2 10 3 10 Traffic(Simulation result) 4/13/2015 42