Unit-II_Multiple_Access

Download as pdf or txt
Download as pdf or txt
You are on page 1of 58

Unit – II

Multiple Access
Multiple Access
• We can consider data link layer as two sublayers as shown in below figure.

• The upper layer is responsible for data link control.


• The lower layer is responsible for resolving access to the shared media.
• If the channel is dedicated we do not need the lower sublayer.
Multiple Access
• The upper sublayer is responsible for flow and error control and called as
Logical Link Control (LLC) sublayer.
• The lower sublayer is responsible for multiple access resolution and called as
Medium Access Control (MAC) sublayer.
• When the stations are connected to a common link we require a multiple
access protocol to co-ordinate access to the link.
• The multiple access protocols are categorized into three groups.
Multiple Access
Multiple Access
Random Access Protocols
• In random access or contention methods, no station is superior to another
station.
• At each instance, a station that has data to send uses a procedure defined by
the protocol to make a decision on whether or not to send.
• The decision depends on the state of the medium.
• This method get its name due to two reasons.
• There is no scheduled time for a station to transmit.
• The transmission is random among the stations.
• Therefore these methods are called as random access.
Multiple Access
• There are no rule to specify which station should send next.
• Stations compete with each other to access the medium.
• Therefore these methods are called as contention methods.
• If more than one system tries to send there will be an access conflict or
collision and the frames will be destroyed.
• To avoid access conflict each station follows a procedure that answers the
following questions.
• When can the system access the medium?
• What can the system do if the medium is busy?
• How can a system determine the success or failure of the transmission?
• What can a system do if there is an access conflict?
Multiple Access
ALOHA
• In 1970’s Norman Abramson and his colleagues at University of Hawaii
devised a new method to solve the channel allocation problem.
• Abramson’s work is called as ALOHA system.
• The basic idea of pure ALOHA is that users transmit whenever they have the
data to transmit.
• To determine whether a transmission was successful a sender waits for an
acknowledgement from the receiver for a time period equal to two
propagation time 2tp.
• The below figure shows an example of frame collision in pure ALOHA.
Multiple Access
• There are four stations connected with each other through a shared channel.
Multiple Access
• Each system sends two frames.
• Some of the frames will collide because multiple frames are in contention for
the shared channel.
• Only two frames will survive frame 1.1 and frame 3.2.
• Even if one of the bit of a frame coexist on the channel with one bit from
another frame there is a collision and both will be destroyed.
• The pure ALOHA relies on acknowledgement from the receiver.
• If the acknowledgement does not arrive within a time out period the sender
assumes that the frame has been destroyed and resends the frame.
• A collision involves two or more stations.
• If all these stations try to resend their frames after time out the frames will
collide again.
Multiple Access
• In pure ALOHA when the time out period passes each station waits a random
amount of time before resending its frame.
• The randomness will help to avoid collisions.
Multiple Access
• Vulnerable Time
• The time duration in which there is a possibility of collision is called as
Vulnerable time.
Multiple Access
• Assume that stations send fixed length frames with each frame taking upto
time tp to send.
• As shown in the above figure station A has transmitted a frame at time t.
• Station B has already transmitted a frame between t – tp and t.
• This will lead to a collision between the frames from station A and B.
• The end of B’s frame will collide with the beginning of A’s frame.
• Suppose a station C sends a frame between t and t + tp.
• There is a collision between frames from station A and C.
• The beginning of C’s frame will collide with end of A’s frame.
Multiple Access
Throughput of Pure ALOHA
• Let the ''frame time'' denote the amount of time needed to transmit the
standard, fixed-length frame.
• At this point we assume that the infinite population of users generates new
frames according to a Poisson distribution with mean N frames per frame
time.
• If N > 1, the user community is generating frames at a higher rate than the
channel can handle, and nearly every frame will suffer a collision.
• For reasonable throughput we would expect 0 < N < 1.
Multiple Access
• In addition to the new frames, the stations also generate retransmissions of
frames that previously suffered collisions.
• Let us further assume that the probability of k transmission attempts per
frame time is also follows a Poisson’s distribution, with mean G per frame
time.
• At low load there will be few collisions, hence few retransmissions.
• At high load there will be many collisions.
• Under all loads, the throughput S, can be specified as the offered load G,
times the probability P0, of a successful transmission.
S = GP0 ---------------- (1)
• where P0 is the probability that a frame does not suffer a collision.
Multiple Access
• The probability that k frames are generated during a given frame time is
given by the Poisson distribution.
k G

Pr[ k ]  G e          (2)
k!
• The probability of zero frames can be obtained by substituting k = 0 in
equation 2.
• Therefore P0 = e-G
• In an interval two frame times long, the mean number of frames generated is
2G.
• The probability of no other traffic being initiated during the entire vulnerable
period is given by
• P0 = e-2G ---------------- (3)
Multiple Access
• Substituting (3) in (1) we can have the throughput of the pure ALOHA as
• S = Ge-2G ----------------- (4)
• The maximum throughput for pure ALOHA system occurs at G = 0.5.
• Substituting G = 0.5 in (4) we have
• S = 0.5e-1
• S = 1/2e
• S = 0.184
• In other words, the best channel utilization in pure ALOHA system is 18
percent.
Multiple Access
Slotted ALOHA
• In 1972, Roberts published a method for doubling the capacity of an
ALOHA system.
• Here the channel is divided into discrete time slots which are exactly equal to
one packet transmission.
• All Stations using the shared channel have been synchronized to these time
slots.
• Each station has to wait for the beginning of the next slot.
• A station is allowed to send only at the beginning of the synchronized time
slot.
• If it misses this moment it must wait until the beginning of next time slot.
Multiple Access
Multiple Access
• If two stations try to send at the beginning of the same time slot there will be
a collision.
Multiple Access
• In slotted ALOHA the vulnerable period is reduced to half as that of the pure
ALOHA.
• The probability of no other traffic during the same slot will be given by
• P0 = e-G ---------------- (5)
• Substituting 5 in 1 we have the throughtput of slotted ALOHA as
• S = G e-G ---------------- (6)
• The maximum throughput for slotted ALOHA system occurs at G = 1.
• Substituting G = 1 in (6) we have
• S = 1*e-1
• S = 1/e
• S = 0.368
• In other words, the best channel utilization in pure ALOHA system is 37 percent.
Multiple Access
• The throughput versus offered traffic for ALOHA system has been shown in
below figure.
Multiple Access
CSMA (Carrier Sense Multiple Access)
• To minimize the chance of collision and to increase the performance the
CSMA method has been developed.
• The chance of collision can be reduced if a station senses the medium before
using it.
• In CSMA each station first listens to the medium before sending.
• CSMA is based on the principle “sense before transmit” or “listen before
talk”.
• CSMA can reduce the possibility of collision but it cannot eliminate it.
• The possibility of collision still exists because of the propagation delay.
• When a station sends a frame it still takes time for the first bit to reach every
station and for every station to sense it.
Multiple Access
• A station may sense the medium and find it idle because the first bit sent by
another station has not yet been received.

Space/time model of the collision in CSMA


Multiple Access
• At time t1 station B senses the medium and finds it idle.
• Hence it transmits a frame.
• At time t2 C senses the medium and finds it idle.
• Because at this time the first bit from station B have not reached upto station
C.
• Hence station C also sends a frame.
• The two signals will collide and both frames are destroyed.
Multiple Access
Vulnerable Time
• The vulnerable time for CSMA is the propagation time tp.
• It is the time required for a signal to propagate from one end of the medium
to the other.
• When a station sends a frame and any other station tries to send a frame
during this time a collision will result.
• But if the first bit of the frame reaches the end of the medium every system
will already heard the bit and will refrain from sending.
Multiple Access
• Below figure shows station A sends a frame at time t1 which reaches the
rightmost system D at time t1 + tp.
• The grey portion of the figure shows the vulnerable time.
Multiple Access
Persistence Methods
• What should a station do if the channel is busy?
• What should a station do if the channel is idle?
• To answer the above questions three methods have been devised.
• These three protocols or methods are known as:
1. Nonpersistent CSMA
2. 1-persistent CSMA
3. p-persistent CSMA
Multiple Access
Nonpersistent CSMA
• A station that has a frame to send senses the channel.
• If the channel or link is idle it sends immediately.
• If the channel is not idle it waits a random amount of time and then sense the
channel again.
• This approach reduces the chance of collision.
• Because two or more stations will wait random amount of time to send the
frames.
Multiple Access
1-Persistent CSMA
• In this method when the station finds the channel idle it sends the frame
immediately.
• If the medium is busy stations continue listening until the channel is idle.
• This method has the highest chance of collision because two or more stations
sense the link idle at the same time and send their frames.
Multiple Access
p-Persistent CSMA
• This method is used if the channel has time slots with a slot duration equal to
or greater than the maximum propagation time.
• It reduces the chance of collision.
• In this method when the station finds the link idle the following steps have
been sued.
Multiple Access
1. The station transmits its frame with probability p.
2. With the probability q = 1 – p the station waits for the beginning of the
next time slot and checks the link again.
a. If the link is idle transmit the frame with probability p.
b. If the link is busy it recognize that a collision has occurred and uses the
back-off procedure.
Multiple Access
CSMA / CD
• The CSMA method does not specify the procedure after a collision occurs.
• Carrier sense multiple access with collision detect provides the procedure to
handle the collisions.
• Here a station monitors the medium after it sends a frame to see if
transmission was successful.
• If so then the station is finished.
• Otherwise if there is a collision the frame is sent again.
• Consider the below figure where two stations are involved in collision.
Multiple Access

Collision of the first bit in CSMA/CD


Multiple Access
• At time t1 station A starts transmitting the bits of the frame.
• At time t2 station C has not yet sensed the first bit sent by A.
• Hence station C starts transmitting the bits of the frame, which propagates
both to the left and to the right.
• The collision occurs after time t2.
• Station C detects a collision at time t3 when it receives the first bit of A’s
frame.
• Station C immediately aborts the transmission.
• Station A detects the collision at time t4 when it receives the first bit of C’s
frame.
• Station A immediately aborts the transmission.
Multiple Access

Collision and abortion in CSMA/CD


Multiple Access
• Station A transmits for the duration t4 – t1 and station C transmits for the
duration t3 – t2.
• For CSMA / CD to work we need a restriction on frame size.
• Before sending the last bit of the frame the sending station must detect a
collision if any and abort the transmission.
• Because once the entire frame is sent out station does not keep a copy of the
frame and does not monitor the line for collision.
• Therefore the frame transmission time tfr must be at least two times the
maximum propagation time tp.
• Suppose two stations involved in a collision are at maximum distance apart.
• The signal from the first takes tp to reach the second and the effect of
collision takes another time tp to reach the first.
Multiple Access
• Throughput
• The throughput of CSMA / CD is greater than that of pure or slotted
ALOHA.
• The maximum throughput occurs at different value of G and based on the
persistence method.
• In p-persistent method the maximum throughput depends on the value of p
and G.
• For 1-persistent method the maximum throughput is around 50% when G =
1.
• For nonpersistent method the maximum throughput can go up to 90% when
G is in between 3 and 8.
Multiple Access
• CSMA / CA
• In a wireless network much of the sent energy is lost in transmission.
• The received signal has very little energy.
• Therefore, a collision may add only 5 to 10 percent additional energy.
• This is not useful for effective collision detection.
• We need to avoid collisions on wireless networks because they cannot be
detected.
• Carrier sense multiple access with collision avoidance (CSMA/CA) was
invented for this network.
Multiple Access
• The Collisions are avoided in CSMA/CA's through the following three
strategies.
• The inter frame space
• The contention window
• Acknowledgments
Multiple Access
• Interframe Space (IFS)
• First, collisions are avoided by deferring transmission even if the channel is
found idle.
• When an idle channel is found, the station does not send immediately. It
waits for a period of time called the interframe space or IFS.
• Even though the channel may appear idle when it is sensed, a distant station
may have already started transmitting.
• The distant station's signal has not yet reached this station.
• The IFS time allows the front of the transmitted signal by the distant station
to reach this station.
• If after the IFS time the channel is still idle, the station can send, but it still
needs to wait a time equal to the contention time.
Multiple Access
• Contention Window
• The contention window is an amount of time divided into slots.
• A station that is ready to send chooses a random number of slots as its wait
time.
• The number of slots in the window changes according to the binary
exponential back-off strategy.
• This means that it is set to one slot the first time and then doubles each time
the station cannot detect an idle channel after the IFS time.
Multiple Access
• This is very similar to the p-persistent method except that a random
outcome defines the number of slots taken by the waiting station.
• One interesting point about the contention window is that the
station needs to sense the channel after each time slot.
• However, if the station finds the channel busy, it does not restart
the process; it just stops the timer and restarts it when the channel
is sensed as idle. This gives priority to the station with the longest
waiting time.
Multiple Access
• Acknowledgment
• With all these precautions, there still may be a collision
resulting in destroyed data.
• In addition, the data may be corrupted during the
transmission.
• The positive acknowledgment and the time-out timer can
help guarantee that the receiver has received the frame.
Multiple Access
• Controlled Access
• In controlled access the stations consult one another to find
which station has the right to send.
• A station can not send unless it has been authorized by
other station.
Multiple Access
• Reservation
• In this method a station needs to make reservation before seeding data.
• Time is divided into intervals.
• In each interval a reservation frame precedes the data frame sent in that
interval.
• If there are N stations in the network there will be exactly N reservation
minislots in the reservation frame.
• Each minislot belongs to a station.
• When a station needs to send a data frame, it makes a reservation in its own
minislot.
Multiple Access
• The stations that have made reservations can send their data frames after the
reservation frame.
• The below figure shows a situation with five stations and a five-minislot
reservation frame.
• In the first interval, only stations 1, 3, and 4 have made reservations. In the
second interval, only station 1 has made a reservation.
Multiple Access
• Polling
• This method where one device is designated as a primary station and the
other devices are secondary stations.
• All data exchanges must be made through the primary device even when the
ultimate destination is a secondary device.
• The primary device controls the link the secondary devices follow its
instructions.
• It is up to the primary device to determine which device is allowed to use the
channel at a given time.
• Therefore the primary device is always the initiator of a session.
Multiple Access
• If the primary wants to receive data, it asks the secondaries if they have
anything to send.
• This is called as poll function.
• If the primary wants to send data, it tells the secondary to get ready to
receive.
• This is called as select function.
• Select
• The select function is used whenever the primary device has something to
send.
• If the primary is neither sending nor receiving data, it knows the link is
available.
Multiple Access
• Poll
• The poll function is used by the primary device to solicit transmissions from
the secondary devices.
• When the primary is ready to receive data, it must ask (poll) each device in
turn if it has anything to send.
• When a secondary station is approached, it responds either with a NAK
frame if it has nothing to send or with data (in the form of a data frame) if it
does.
• If the response is negative (a NAK frame), then the primary polls the next
secondary in the same manner until it finds one with data to send.
• When the response is positive (a data frame), the primary reads the frame
and returns an acknowledgment (ACK frame), verifying its receipt.
Multiple Access

Select and poll functions in polling method


Multiple Access
• Token Passing
• In the token-passing method, the stations in a network are organized in a
logical ring.
• In other words, for each station, there is a predecessor and a successor.
• The predecessor is the station which is logically before the station in the
ring.
• The successor is the station which is after the station in the ring.
• The current station is the one that is accessing the channel now.
• The right to this access has been passed from the predecessor to the current
station.
• The right will be passed to the successor when the current station has no
more data to send.
Multiple Access
• But how is the right to access the channel passed from one station to
another?
• In this method, a special packet called a token circulates through the ring.
• The possession of the token gives the station the right to access the channel
and send its data.
• When a station has some data to send, it waits until it receives the token from
its predecessor.
• It then holds the token and sends its data.
Multiple Access
• When the station has no more data to send, it releases the token, passing it to
the next logical station in the ring.
• The station cannot send data until it receives the token again in the next
round.
• In this process, when a station receives the token and has no data to send, it
just passes the data to the next station.
• Token management is needed for this access method.
• Stations must be limited in the time they can have possession of the token.
• The token must be monitored to ensure it has not been lost or destroyed.
Multiple Access
• For example, if a station that is holding the token fails, the token will
disappear from the network.
• Another function of token management is to assign priorities to the stations
and to the types of data being transmitted.
• And finally, token management is needed to make low-priority stations
release the token to high priority stations.
• Logical Ring In a token-passing network stations do not have to be
physically connected in a ring the ring can be a logical one.
• Below figure shows four different physical topologies that can create a
logical ring.
Multiple Access

Logical ring and physical topology in token-passing access method


Multiple Access
• In the physical ring topology, when a station sends the token to its successor,
the token cannot be seen by other stations; the successor is the next one in
line.
• This means that the token does not have the address of the next successor.
• The problem with this topology is that if one of the links-the medium
between two adjacent stations fails, the whole system fails.
Multiple Access
• The dual ring topology uses a second (auxiliary) ring which operates in the
reverse direction compared with the main ring.
• The second ring is for emergencies only (such as a spare tire for a car).
• If one of the links in the main ring fails, the system automatically combines
the two rings to form a temporary ring.
• After the failed link is restored, the auxiliary ring becomes idle again.
• Note that for this topology to work, each station needs to have two
transmitter ports and two receiver ports.
Multiple Access
• In the bus ring topology, also called a token bus, the stations are connected to
a single cable called a bus.
• They make a logical ring, because each station knows the address of its
successor and also predecessor.
• When a station has finished sending its data, it releases the token and inserts
the address of its successor in the token.
• Only the station with the address matching the destination address of the
token gets the token to access the shared media.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy