CS 635 Lecture 4, Part 1
CSMA/CD (ETHERNET)
The IEEE 802.3 standard is based on the Ethernet specification. It defines
both a medium access control layer and a physical layer.
History
CSMA/CD and its precursors can be termed random access, or contention,
techniques. Random - there is no predictable or scheduled time for any
station to transmit; contention - stations contend for time on the medium
ALOHA - developed for radio packet networks, applicable to any
shared transmission medium. Two types:
Pure ALOHA (true free for all):
-
Station that has a frame to send does so at will.
-
Station listens for the maximum round-trip propagation delay plus a small
fixed time increment.
-
If the station does not receive an acknowledgment during that time, it
retransmits the frame.
-
The receiving station verifies the FCS, if OK sends an acknowledgment;
if not, drops the frame
Problems:
-
inefficient under heavy load
-
maximum channel utilization is only 18%
Slotted ALOHA - channel is organized into slots whose size equals
the frame transmission time. Needs a central clock or some other synchronization
technique. Transmission is allowed only at a slot boundary. The frames
that do overlap will do so totally. Maximum utilization is increased to
37%.
Conclusion: both algorithms ignored the fact that propagation
delay between stations is very small compared to the frame transmission
time. Short delay time provides stations with better feedback about the
state of the network; this information can used to increase efficiency.
CSMA/CD - If the medium is in use, the station must wait. If
the medium is idle, the station may transmit. If two stations transmit
simultaneously, a collision occurs, the data is garbled and not received.
To account for this a station waits for an ack a reasonable amount of time
(taking into account the round-trip delay and processing time) and then
transmits the frame again. If a station begins to transmit a frame and
there are no collisions during the time it takes for the leading edge of
the packet to propagate to the farthest station, there will be no collision.
The maximum utilization achievable using CSMA can far exceed that of
ALOHA and Slotted ALOHA. The max. utilization depends on the length of
the frame and on the propagation time; the longer the frames or the shorter
the propagation time, the higher utilization.
Three approaches in determining what to do when the medium is found
busy:
Non persistent CSMA
-
If the medium is idle, transmit; otherwise, go to step 2.
-
If the medium is busy, wait an amount of time drawn from a probability
distribution (the retransmission delay) and repeat step 1.
A problem with this approach is that capacity is wasted because the medium
will generally remain idle following the end of a transmission even if
there are one or more stations waiting to transmit.
To avoid idle channel time, the 1-persistent CSMA can be used.
-
If the medium is idle, transmit; otherwise, go to step 2
-
If the medium is busy, continue to listen until the channel is sensed idle;
then transmit immediately
If two or more stations are waiting to transmit, a collision is guaranteed.
The p-persistent CSMA rules
-
If the medium is idle, transmit with probability p and delay one time unit
with probability (1-p). The time unit is typically equal to the maximum
propagation delay
-
If the medium is busy, continue to listen until the channel is idle and
repeat step 1
-
If the transmission is delayed on time unit, repeat step 1
The question is what is an effective value of p, especially under heavy
load. Consider n stations having frames to transmit while a transmission
is taking place. At the end of the transmission, the expected number of
stations that will attempt to transmit is equal to the number of stations
ready to transmit time the probability of transmitting, or np.
-
If np is greater than 1, on average, multiple stations will attempt to
transmit and there will be a collisions. The stations will attempt to retransmit
generating more collisions. Eventually, all the stations will be trying
to transmit and retransmit creating a pathological situation
-
To avoid the above case, np should be less than 1 for the expected peaks
of n; therefore, if a heavy load is expected to occur with some regularity,
p must be small. However, as p is made smaller, stations must wait longer
to attempt to transmit. At low loads, this can result in very long delays.
For example, if only a single station desires to transmit , the expected
number of iterations of step 1, above, is 1/p. Thus, if p=0.1, at low load,
a station will wait an average of 9 time units before transmitting on an
idle line.
Top Next