CMPE 252A: Computer Networks SET 3: Medium edium Acces ccess Cont ontrol ol Prot otocols ocols 1 Medium Access Control Protocols Used to share the use of transmission media that can be accessed concurrently by multiple users. APPLICATION PRESENTATION logical link control Sharing of link and transport SESSION of data over the link medium access TRANSPORT control NETWORK LINK PHYSICAL 2 Contention-Based Medium Access Control (MAC) Protocols No coordination : Stations transmit at will when they have data to send (e.g., ALOHA) Carrier sensing (listen before transmit): Stations sense the channel before transmitting a data packet (e.g., CSMA). Listen before and during transmission: Stations listen before transmitting and stop if noise is heard while transmitting (CSMA/CD). Collision avoidance (floor acquisition): Stations carry out a handshake to determine which one can send a data packet (e.g., MACA, FAMA, IEEE802.11, RIMA). Collision resolution: Stations determine which one should try again after a collision. 3 1
Conflict-Free MAC Protocols Fixed assignment (TDMA, FDMA) Reservations Polling Token passing Dynamic transmission scheduling Can involve division in time, frequency or codes Uses contention-based mechanisms to derive transmission schedules 4 Can You Say ALOHA? S 2 G S Ge − = The ALOHA System 0.18 (Norm Abramson & Frank Kuo): G 0.5 Computer Communication Networks , Packet Switching Aloha Tower in Chapter 14, Honolulu, HI in Radio Channels Prentice Hall, 1973 ALOHA Protocol The first protocol for multiple access channels; and the first analysis of such protocols (Norm Abramson, Univ. of Hawaii, 1970). Originally planned for systems with a central base station or a satellite transponder. Two frequency bands; Up link and down link (413MHz, 407MH at 9600bps) Central node retransmits every packet it receives! 2
ALOHA Protocol Population is a large number of bursty stations. Each station transmits a packet whenever it receives it from its user; no coordination with other stations! Central node retransmits all packets (good or bad) on down link. Stations decide to retransmit based on the information they hear from central node 7 ALOHA Protocol An integral part of the ALOHA protocol is feedback from the receiver no Packet Feedback occurs after a ready? packet is sent No coordination among sources yes transmit delay packet wait for a transmission k times round-trip time positive compute random ack? backoff integer k yes no 8 The ALOHA Channel We assume: An (essentially) infinite population of stations. An ideal perfect down link for the transmission of feedback to senders. Stations are half duplex; have zero processing delays. Retransmissions are scheduled such that all packets are statistically independent. Each packet has the same duration P. Stations have the same round-trip delay from one other; this time can be much longer than P (irrelevant). Packet arrivals are Poisson with rate lambda. Collisions are the only sources of errors. 9 3
The ALOHA Channel P τ user i RET. NEW time user j NEW RET. time ... sum collision NEW RET. NEW NEW RET. time I B I B I B I B I What percentage of time is the channel sending correct packets? This gives us the throughput of the protocol. 10 Throughput of ALOHA Protocol packet overlaps packet overlaps with start of packet with end of packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 Node i ’ s frame is vulnerable from any arrival in the time interval (t0-1, t0+1] All packets have the same length Throughput of ALOHA Protocol packet overlaps packet overlaps with start of packet with end of packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 time slot 1 time slot 2 Organize the time axis around packet from node i in terms of time slots lasting one packet length, and starting times given according to the start of the packet from node i. 4
Throughput of ALOHA Protocol packet overlaps packet overlaps with end of packet with start of packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 N nodes in the system The probability of a station starting a packet in a given time slot is p. Node i transmits in time slot starting at t0, i.e., time slot 2. The packet from node i is successful if no other station transmits in the time slots 1 and 2. Throughput of ALOHA Protocol packet overlaps packet overlaps with start of with end of packet packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 t0 + 1 Because transmissions are independent, this means that the packet from node i succeeds with probability P { pkt from node i succeeds} p ( 1 p ) M ( 1 p ) M p ( 1 p ) 2 M = − − = − M N 1 = − Only one node can succeed, and there are C(N, 1) ways to pick the winning node; hence, the probability that any given packet that starts at time t0 succeeds is: 2 ( ) (a) P {a pkt succeeds} = Np (1 − p ) M Throughput of ALOHA Protocol packet overlaps packet overlaps with start of with end of packet packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 Np is the total traffic generated in a given time slot; call it G , i.e., Np = G and p = G/N The throughput of the channel is the percentage of packets offered to the channel that are successful. The throughput of the channel then equals the probability that a packet is successful, i.e., S = P{a packet succeeds} 5
Throughput of ALOHA Protocol 2 Substituting Np = G and p = G/N " N − 1 % 2 = G " 1 − G % S = Np (1 − p ) N − 1 ( ) in Eq. (a) we obtain: $ ' $ ' $ ' # N & # & Make N tend to infinity (a large user population; N~N-1 ). x 1 ⎛ + ⎞ lim 1 e 1 A useful limit is: ⎜ ⎟ = x x → ∞ ⎝ ⎠ Making x = N , we have for a very large N : 2 2 " N % " N % " 1 − G % " 1 + ( − G ) % 2 = Ge − 2 G → G e − G ( ) G $ ' = G $ ' $ ' $ ' $ ' $ ' # N & # N & # & # & S 2 G S Ge − 0.18 = G 0.5 Simple(r) Throughput Analysis of ALOHA Protocol packet overlaps packet overlaps with start of packet with end of packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 Node i ’ s frame is vulnerable from any arrival in the time interval (t0-1, t0+1] All packets have the same length Poisson arrivals with parameter λ Simple(r) Throughput Analysis of ALOHA Protocol is the arrival rate. λ G P For convenience, we normalize the arrival rate as: = λ Because arrivals are Poisson and all packets have equal length, every packet has the same probability of being successful. S G p From the definition of throughput: = × where p is the probability of a successful packet transmission A packet is successful if no packets arrive within P seconds before it starts or while it is being transmitted; accordingly, S p e − ( 2 P ) λ e − 2 G = = Therefore, 0.18 2 G S Ge − = G 0.5 18 6
Throughput of ALOHA Protocol packet overlaps packet overlaps with end of packet with start of packet from node i from node i interfering frame node i frame interfering frame time t0 - 1 t0 + 1 t0 Node i ’ s frame is vulnerable from any arrival in the time interval (t0-1, t0+1] Highest throughput when we have one packet for each two-packet time period Why Is ALOHA So Important? The first protocol for multiple access channels. The first performance analysis of such protocols (Norm Abramson, Univ. of Hawaii, 1970). Kleinrock and students proposed “ CSMA, ” which evolved into today’s WiFi. Bob Metcalf proposed “ CSMA/CD ” (Ethernet) Local area networking became a reality. Led many to adopt the “independence assumption” in the performance analysis of many protocols Slotted ALOHA The throughput of ALOHA can be improved by reducing the time a packet is vulnerable to interference from other packets. Slotted ALOHA works in a “ slotted channel ” providing discrete time slots. Stations can start transmitting only at the beginning of time slots. The time synchronization needed for slotting is accomplished at the physical layer, and some synchronization is required in many cases anyway. 21 7
Recommend
More recommend