Sunteți pe pagina 1din 26

The Channel Allocation Problem

Static Channel Allocation in LANs and MANs


FDM: Frequency Division Multiplexing TDM: Time Division Multiplexing Suitable for fixed number of users with constant traffic

Disadvantage: when the number of users is large and continuously varying, or the traffic is bursty, FDM presents some problems.

A simple queuing theory calculation


For a channel of capacity C bps, with an arrival rate of l frames/sec, each frame having a length drawn from an exponential probablity density function with mean 1/m bits/frame, the mean time delay 1

mC l

Now let us divide the single channel up into N independent subchannels, each with capacity C/N bps. The mean input rate on each of the subchannel will now be l/N. 1 Recomputing T, we get T NT FDM m (C / N ) ( l / N )

Dynamic Channel Allocation in LANs and MANs Five key assumptions: 1. Station Model. The model consists of N independent stations, each with a program or user that generates frames for transmission.

The probability of a frame being generated in an interval of length Dt is lDt, where l is a constant (the arrival rate of new frames). Once a frame has been generated, the station is blocked and does nothing until the frame has been successfully transmitted.

Five key assumptions: 2. Single Channel Assumption. A single channel is available for all communication. All stations can transmit on it and all can receive from it.

As far as the hardware is concerned, all stations are equivalent, although some protocol software may assign priorities to them.

Five key assumptions: 3. Collision Assumption. If two frames are transmitted simultaneously, they overlap in time and the resulting signal is garbled. This event is called a collision.

All stations can detect collisions. A collided frame must be transmitted again alter. There are no errors other than those generated by collisions.

Five key assumptions: 4a. Continuous Time. Frame transmission can begin at any instant. There is no master clock dividing time into discrete intervals.

4b. Slotted Time. Time is divided into discrete intervals (slots). Frame transmissions always begin at the start of a slot. A slot may contain 0, 1, or more frames, corresponding to an idle slot, a successful transmission, or a collision, respectively.

Five key assumptions: 5a. Carrier Sense. Stations can tell if the channel is in use before trying to use it. If the channel is sensed as busy, no station will attempt to use it until it goes idle.

5b. No Carrier Sense. Stations cannot sense the channel before trying to use it. They just go ahead and transmit. Only later can they determine whether or not the transmission was successful.

Multiple Access Protocols ALOHA Pure ALOHA ALOHA of U. of Hawaii


the first multipleaccess protocol: a method for sharing a transmission channel by enabling the transmitter to access the channel at random times

Computer Center 413MHz at 9600bps 407MHz at 9600bps

Pure ALOHA

Frames are transmitted at completely arbitrary times.

Pure ALOHA protocol nodes transmit on a common channel transmit frame of fixed length when two transmissions overlap, they garble each other (collision) the central node acknowledges the correct frames it receives when a node does not get an acknowledgment within a specific timeout, it assumes that its frame collided when a frame collides, the transmitting node schedules a retransmission after a random delay

ALOHA nodes new frame old frame

S
G

channel

collision?
No S

Yes
S: the mean number of new frames generated by the infinite population G: the mean number of transmission attempts (new and old combined)

S G P0

where P0 is the probability that a frame does not suffer a collision

ALOHA pure ALOHA and slotted ALOHA pure ALOHA time Nodes can starting transmitting at any time. slotted ALOHA slot time Nodes must start their transmissions at the beginning of a time slot.

ALOHA

vulnerability period
pure ALOHA packet slotted ALOHA packet

Other nodes that are ready at this period will result in collision.

ALOHA The probability that k frames are generated during a given frame time is given by the Poisson distribution:

G k eG Pr[ k ] k!

So the probability of zero frames in a slot is just e-G.

In an interval two time slots long, the mean number of frames generated is 2G. Therefore, the distribution is:

( 2G ) k e 2G Pr[ k ] k!

The probability of zero frames is e-2G.

ALOHA Using S=GP0, we get For pure ALOHA: S=Ge-2G For slotted ALOHA: S=Ge-G To find the maximum value:
dS dS e G Ge G , 0 G 1, S e 1 dG dG 1 dS dS 1 e S Ge 2G , e 2G 2Ge 2G , 0 G ,S dG dG 2 2 S Ge G ,

ALOHA

ALOHA In slotted ALOHA, the best we can hope for is 37% success, 37% slots empty, and 26% collisions. Operating at higher values of G reduces the number of empties but increases the number of collisions exponentially. Consider the transmission of a test frame: success: e-G, failure: 1-e-G, success for k attempts: Expected number of transmissions:
k 1 k 1 G G k 1 G E kP ke ( 1 e ) e k

Pk e (1 e )

G k 1

As a result of the exponential dependence of E upon G, small increases in the channel load can drastically reduce its performance.

With slotted ALOHA the best channel utilization that can be achieved is 1/e. This is hardly surprising, since with stations transmitting at will, without paying attention to what other stations are doing, there are bound to be many collisions. In local area networks, however, it is possible for stations to detect what other stations are doing, and adapt their behavior accordingly. Protocols in which stations listen for a carrier (i.e. a transmission) and act accordingly are called carrier sense protocols.

Carrier Sense Multiple Access Protocols 1-persistent CSMA: the station transmits with a probability of 1 whenever it finds the channel idle, if the channel is busy, it waits until it becomes idle non-persistent CSMA: the station transmits if the channel is idle, if the channel is busy, it waits a random time and tries again p-persistent CSMA (slotted): the station transmits with a probability of p whenever it finds the channel idle, with a probability of 1-p, it waits until the next slot. If another station has begun transmitting, it acts as if there had been a collision. It waits a random time and starts again.

Carrier Sense Multiple Access Protocols

Carrier Sense Multiple Access Protocols

CSMA with collision detection (CSMA/CD) Abort a transmission as soon as they detect a collision. Quickly terminating damaged frames saves time and bandwidth.
After a station detects a collision, it aborts its transmission, waits a random period of time, and then tries again, assuming that no other station has started transmitting in the meantime.

A conceptual model for CSMA/CD (How long should each slot be?)

maximum collision detection time A B 1.A starts t=0 3. A reaches B 2.B starts transmitting transmitting 5.B reaches A PROP 2PROP 4.B detects collision, transmits JAM, stops

6.A detects collision, transmits JAM, stops


The maximum collision detection time is equal to twice the maximum end-to-end propagation delay.

For this reason we will model the contention interval as a slotted ALOHA system with slot width 2t (t is the end to end delay). On a 1-km long coaxial cable, t5msec. It is important to realize that collision detection is an analog process. The stations hardware must listen to the cable while it is transmitting. The signal encoding must allow collisions to be detected (e.g., a collision of two 0-volt signals may well be impossible to detect). For this reason, special encoding is commonly used.

Collision-Free Protocols Although collisions do not occur with CSMA/CD once a station has unambiguously seized the channel, they can still occur during the contention period. These collisions adversely affect the system performance, especially when the cable is long and the frames are short. As very long, high bandwidth fiber optic networks come into use, the combination of large t and short frames will become an increasingly serious problem.

In the protocols to be described, we make the assumption that there are N stations, each with a unique address from 0 to N-1 wired into it.

S-ar putea să vă placă și