Fundamentals of Computer Networks ECE 478/578

advertisement
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
Collision Resolution Protocols
Assume collision between only two packets
All new arrivals defer from transmission
Node transmits at the next slot with prob ½
Let X denote the # of slots req to resolve collision
PX  2  P[ n1 xmitt] P[ n 2 not xmitt]  P[ n 2 xmitt] P[ n1 not xmitt]
11 11
1


22 22
2
1
PX  3  P[collision] P[success] 
4

PX  k   P[collision] P[success]  2- k-1
E X  

k2
k 2

  k 1

j
Throughput = 2/3
j

1
1
  ( j  1)    ( j  1)   1
2
2
j 1
j 0
1
 1  3 slots
2
(1  1 / 2)
2
Tree Splitting Algorithm
Set S
Resolution of collision of three stations
Slot
Xmit Set
Waiting Set
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
collision
idle
Feedback
L
LL
collision
success
LRL
R
LR collision
idle
LRRL
success
New arrivals accumulate during contention period
Throughput approx 0.43 p/s (need 43 slots for 10 packets)
collision
LRR
LRRR
success
3
Improvements
Set S
idle
Two collisions in a row, R must have
a small number of packets
Incorporate to new arrivals
Guaranteed to have a collision here
collision
L
LL
collision
success
LRL
R
LR collision
idle
LRRL
success
collision
LRR
LRRR
success
4
First Come First Serve Splitting
allocation
Split right away
two collisions allocation waiting
waiting
current time
k
current time
allocation
k+1
current time
allocation
k+2
current time
k+3
5
Multi-Access Reservations
Idea: 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
Example: Satellite Reservation System
Contention lasts N slots (equal to # of stations)
Station “i” transmits one bit in slot i if it has a frame to transmit
After all the N slots are completed, every station knows who has
frames to transmit, start data transmission in that order
Example: Assume there are 8 stations
Lower numbered stations have to wait for more time
Efficiency d/(d + N), d = length of data frame
7
Inefficiency of Reservation System
What 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
Binary Countdown Protocol
Each station is assigned a binary address of log 2 N  bits
Stations broadcast their address one bit at the time, if they have a
frame to transmit
Take 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
Drop off after slot 0
Drop off after slot 0
Drop off after slot 2
Winner
Efficiency: d d  log 2 N 
9
(Un)Fairness of Binary Countdown
Stations with highest addresses always win
Good for implementing a priority scheme
To make the protocol fair, addresses of hosts need to be dynamic
10
Implementing Fairness
After 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
Download