Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free...

11
Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical and Computer Engineering University of Arizona

Transcript of Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free...

Page 1: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Fundamentals of Computer NetworksECE 478/578

Lecture #9: Collision Resolution and Collision Free Protocols

Instructor: Loukas LazosDept of Electrical and Computer Engineering

University of Arizona

Page 2: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Collision Resolution ProtocolsAssume collision between only two packetsAll new arrivals defer from transmissionNode transmits at the next slot with prob ½Let X denote the # of slots req to resolve collision

2

2

1

2

1

2

1

2

1

2

1

xmitt]not n[xmitt] n[ xmitt]not n[xmitt] n[2 1221

PPPPXP

4

1 success][ collision][3 PPXP

1-k-2 success][ collision][ PPkXP

slots 31)2/11(

1

12

1)1(

2

1)1(2X

2

012

1

j

j

j

j

k

k jjkE

Throughput = 2/3Throughput = 2/3

Page 3: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Tree Splitting Algorithm

3

Set S

R

LRL

LL

LRRL

LR

LRR

LRRR

Slot Xmit Set Waiting Set Feedback

1 S - e

2 L R e

3 LL LR, R 1

4 LR R e

5 LRL LRR, R 0

6 LRR R e

7 LRRL LRRR,R 1

8 LRRR R 1

9 R - 0

Lidle

collision

collision

success collision

idlecollision

success success

Resolution of collision of three stations

New arrivals accumulate during contention periodThroughput approx 0.43 p/s (need 43 slots for 10 packets)

Page 4: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Improvements

4

Set S

R

LRL

LL

LRRL

LR

LRR

LRRR

Lidle

collision

collision

success collision

idlecollision

success success

Guaranteed to have a collision here

Two collisions in a row, R must have a small number of packetsIncorporate to new arrivals

Page 5: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

First Come First Serve Splitting

5

k

k+1

current time

k+2

k+3

allocation waiting

allocationwaiting

allocation

allocation

Split right awaytwo collisions

current time

current time

current time

Page 6: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Multi-Access ReservationsIdea: Use reservation (contention) slots to make reservations for later transmissions

Reservations much smaller size than data

Any method can be used to contend for reservation slots (or not contend)

6

Page 7: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Contention lasts N slots (equal to # of stations)Station “i” transmits one bit in slot i if it has a frame to transmitAfter all the N slots are completed, every station knows who has

frames to transmit, start data transmission in that orderExample: Assume there are 8 stations

Lower numbered stations have to wait for more timeEfficiency d/(d + N), d = length of data frame

Example: Satellite Reservation System

7

Page 8: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Inefficiency of Reservation SystemWhat if the number of stations N is large?

Nodes have to wait for a long time to send data

Reservation period grows very large

8

Page 9: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Binary Countdown ProtocolEach station is assigned a binary address of bitsStations broadcast their address one bit at the time, if they have a

frame to transmitTake the OR of all bits wanting to transmit (nodes know the outcome

of OR based on electric property of medium)If node with higher address transmits, back off

9

N2log

Drop off after slot 0Drop off after slot 0Drop off after slot 2

Winner Efficiency: Ndd

2log

Page 10: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

(Un)Fairness of Binary CountdownStations with highest addresses always win

Good for implementing a priority scheme

To make the protocol fair, addresses of hosts need to be dynamic

10

Page 11: Fundamentals of Computer Networks ECE 478/578 Lecture #9: Collision Resolution and Collision Free Protocols Instructor: Loukas Lazos Dept of Electrical.

Implementing FairnessAfter node A transmits, all hosts with address less than A increase their address by one

Node’s A address is set to zero

All nodes before A get a higher priority

Round robin type of protocol

11