Distributed systems Module 1 -Basic networking Teaching unit 1 – LAN standards Ernesto Damiani University of Bozen-Bolzano Lesson 5 – Collision management
Collisions Collisions happen when two adaptors transmit at the same time The adaptors sense the collision based on the difference between the signal they transmit and the one they receive –Both have found line to be idle –Both have been waiting to for a busy line to become idle
Collision detections (1) A knows that a collision has happened when: –there is a mechanism ensuring retransmission on collision –A’s message reaches B at time T –B’s message reaches A at time 2T, so A is still transmitting at 2T Jam signal sent after collision is detected to ensure all hosts see collision –48 bit signal
Collision detections (2) IEEE specifies that maximum value of 2T must be 51.2us –This relates to maximum distance of 2500m among hosts –At 10 Mbps it takes 0.1us to transmit one bit so 512 bits (64B) take 51.2us to send –Ethernet frames must be at least 64B long 14B header, 46B data, 4B CRC Padding is used if data is less than 46B
Collision detections (3)
Exponential backoff (1) If a collision is detected, delay and try again Delay time is selected using binary exponential backoff –1 st time: choose K from {0,1}, then delay = K * 51.2us –2 nd time: choose K from {0,1,2,3} then delay = K * 51.2us –n th time: delay = K x 51.2us, for K=0..2n – 1 (max value for k = 1023) –gives up after 16 tries and reports transmission error to host
Exponential backoff (2) If delay were not random, then there is a chance that sources would retransmit at the same time The choice for K is made from a small set of values: technique is appropriate only for a small number of hosts FINE