1 / 24

U 628 Computer Networks

U 628 Computer Networks. CLASS 10, Wed. Sep. 28 2005 Stefano Basagni Fall 2005 M,W,T 4:35pm-5:40pm. Carrier Sense Multiple Access (CSMA). Slotted Aloha  scarce channel utilization (1/e) In LAN a terminal can check what other terminals are doing Carrier sense protocols

grant
Download Presentation

U 628 Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. U 628Computer Networks CLASS 10, Wed. Sep. 28 2005 Stefano Basagni Fall 2005 M,W,T 4:35pm-5:40pm

  2. Carrier Sense Multiple Access (CSMA) • Slotted Aloha  scarce channel utilization (1/e) • In LAN a terminal can check what other terminals are doing • Carrier sense protocols • A terminal listen for a transmission before using the channel

  3. Persistent CSMA, 1 • 1-persistent CSMA • A terminal check the channel • Idle: Transmits • Busy: Waits till it is idle • Collision: The terminal starts again after a random time • The terminal transmits with a probability of 1 when the channel is idle

  4. Persistent CSMA, 2 • Propagation delay affects the protocol • Two terminals may both start transmitting if the signals have not been mutually detected • Even if the delay is 0 collisions may occur • Two terminal both waiting for a third to finish transmitting

  5. Non-persistent CSMA • If the channel is idle, a terminal transmit • If the channel is busy, a terminal waits for a random time • Instead of keep testing • Better utilization, longer delays

  6. p-Persistent CSMA • Slotted channel • If channel is idle, terminal transmits with probability p • With probability 1-p it waits for the next slot • If the channel is busy, terminal waits a random time and tries again

  7. CSMA Channel Utilization Comparison of the channel utilization versus load for various random access protocols

  8. CSMA with Collision Detection • CSMA/CD • A terminal aborts transmission as soon as it detects a collision • Saves time and bandwidth • Used on LANs • Ethernet

  9. CSMA/CD • A terminal finishes transmitting a frame • Some other terminal starts transmitting immediately • Collisions are detected by looking at what is on the channel • Compared to what has been transmitted • After a collision has been detected a terminal waits a random time and tries again

  10. CSMA/CD, the Model CSMA/CD can be in one of three states: contention, transmission, or idle

  11. Timing Issues • How long it takes to realize that there is collision? • It is important for the contention duration • Minimum time: Propagation between two terminals • Be τ the maximum • A terminal cannot be sure it has the channel before having transmitted for 2τ

  12. Contention Interval • Modeled as a slotted Aloha system • Each slot is long 2τ • Example • Coax cable 1Km long  τ = 5μsec • Note: Collision detection is inherently an analog process • Sometimes coding is needed for detection • CSMA/CD is half-duplex • A terminal cannot send and receive frames at the same time • It has to keep checking for collisions

  13. CSMA/CD: Problems • Collisions occur during the contention period • They adversely affect the performance • Especially for large τs and short frames • Also, collision detection is not universally applicable • E.g., wireless networks

  14. Collision-Free Protocols • Contention is resolved without collisions • Not even in the contention period • Scenario • N terminals • Addresses from 0 to N-1 • Propagation delay is negligible

  15. A Bit-Map Protocol • Each contention period consists of exactly N slots • If terminal i has a frame to transmit, it sends a 1 in the i-th slot • After the contention period is passed, every terminal knows who will transmit • Transmissions are in numerical order • No collision ever occurs

  16. Bit-Map Functioning The basic bit-map protocol

  17. Reservation Protocols • Like the bit-map • The desire to transmit is broadcast before the actual transmission • Drawbacks • If a terminal becomes ready to transmit after its slot is passed, tough • It must wait till the next contention period comes around

  18. Performance Analysis, 1 • Time unit = contention slot • Data frame = d time units • Under low traffic, the map is repeated over and over • For lack of data frames • Low numbered terminals (e.g., 0 or 1) • When they get ready the current map could be in the middle • They have to wait an average of N/2 bit slots for the current scan to finish and a N bit slots for another full scan to complete

  19. Performance Analysis, 2 • High numbered terminals • Will wait an average of N/2 bit slots • Average wait for all: N bit slots • 1.5N for low numbered terminals • 0.5N for high numbered terminals • Channel efficiency at low load • Overhead for frame is N bits • Amount of data is d bits • Efficiency: d / ( N + d )

  20. Binary Countdown • Bit-Map does not scale well • Overhead of 1 bit per station • Solution: Use (fixed size) terminal addresses • Terminal that has a frame transmits its address bit by bit (from leftmost) • Corresponding bits are ORed

  21. Binary Countdown Arbitration Rule • A terminal gives up if a high-order bit position that is 0 in its address is overwritten by a 1 • Example: Competing terminals have addresses 0010, 0100, 1001 and 1010 • In the first bit time they transmit 0,0,1,1 • The OR gives a 1 • Terminals 0010 and 0100 give up • The other two continue with the second bit • The winner sends its frame, and the bidding cycle starts again

  22. Binary Countdown, Example The binary countdown protocol. A dash indicates silence

  23. Binary Countdown, Pro and Cons • High-numbered stations have higher priority • Can be good or bad, depending on the context • Channel efficiency: d / ( d + log2 N ) • The address could be the first bits of the data frame  100% efficiency

  24. Assignments • Textbook, Chapter 4 till page 261 • Updated information in the class Blackboard page

More Related