380 likes | 561 Views
Advanced Computer Networks. Channel Allocation ( MAC) Part II. Outline. Channel Allocation Problem Channel Allocation Classification FCA,DCA,… TDMA, FDMA Aloha, Slotted Aloha CSMA (non-persistent, 1-persistent, p-persistent), CSMA/CD Performance Results. Channel Allocation Schemes.
E N D
Advanced Computer Networks Channel Allocation (MAC)Part II
Outline • Channel Allocation Problem • Channel Allocation Classification • FCA,DCA,… • TDMA, FDMA • Aloha, Slotted Aloha • CSMA (non-persistent, 1-persistent, p-persistent), CSMA/CD • Performance Results
Channel Allocation Schemes • Major Problems With FCA • FCA schemes suffers from static and fixed structures • FCA schemes do not support the network dynamicity • FCA schemes do not adapt user traffics • FCA schemes degrades the channel utilization
Channel Allocation Schemes • Major Problems With DCA • DCA schemes need centralized controller (coordinator) • Centralized controller is a single failure point (SFP) • DCA schemes are time consuming • DCA schemes need (more) complex online control • DCA improves channel efficiency compared to FCA
Channel Allocation Schemes • Contention-based Channel Assignment Schemes • Solution: Contention (random)-based channel assignment • No fixed structure • No centralized controller (coordination) • More adaptive • More appropriate to distributed environments
Channel Allocation Schemes • Contention-based Channel Assignment Schemes • Users contend for channel access • Users that lose access to the channel try again later • User that accesses the channel successfully, starts transmission immediately • These strategies require no coordination among nodes
Channel Allocation Schemes • Contention-based Channel Assignment Schemes • Colliding nodes back off for a random duration and try again • There is no mechanism to make a scheduled transmission time
Channel Allocation Schemes • Contention-based Channel Assignment Schemes • Contention-based schemes are subdivided into • Random access schemes • Collision resolution schemes
Channel Allocation Schemes • Random access schemes • Pure ALOHA • Slotted ALOHA
Channel Allocation Schemes • Pure ALOHA • Channel access is completely asynchronous • User is allowed to transmit data whenever it is ready • After sending, it listens to channel for a time period (round-trip time-RTT) • If it receives an acknowledgment before RTT elapses,
Channel Allocation Schemes • Pure ALOHA • Transmission is successful • Otherwise • Transmission is failed (is repeated) • Acknowledgment is issued by receiver after checking the correctness of the data • ALOHA requires no central control
Channel Allocation Schemes • Pure ALOHA • User waits a random amount of time and sends again (Aloha Retransmission Strategy). • Under light-load conditions, users can access to the channel in a short time • White packets do not collide • Black packets collide
Channel Allocation Schemes • Pure ALOHA • Frame sent at t0 collides with frames sent in [t0-1,t0+1]. • Successful transmission scenario of node i • Node i transmits • No other nodes transmit in [t0-1,t0] • No other nodes transmit in [t0,t0+1]
Channel Allocation Schemes • Pure ALOHA • T: Transmission time of one frame (unit time) • G: Mean of Poisson distribution (transmission dist.) • For any frame-time, the probability of k attempts during that frame-time is: • Probability of k transmission-attempts during those two consecutive frame-times (i.e., [t0 – T to t0 + T]) is:
Channel Allocation Schemes • Pure ALOHA • Probability of no transmission-attempts between t-T and t+T is: • Throughput=Probability of success*transmission-attempts = • Maximum throughput is reached when G = 0.5 • Maximum throughput equals to 1/2e0.184 frames per unit time(frame time)
Channel Allocation Schemes • Slotted ALOHA • Based on synchronized transmission time slots (similar to TDMA) • Nodes can transmit only at the beginning of a time slot • Time slots doubles the throughput (compared to ALOHA) • All packets have the same length • Communication channel is divided into uniform time slots
Channel Allocation Schemes • Slotted ALOHA • Time slot = Packet transmission time • Collision can occur only in the beginning of a slot • Pure and slotted ALOHA remain inefficient under moderate to heavy load conditions • Random Back off
Channel Allocation Schemes • Slotted ALOHA • White packets do not collide • Black packets collide
Channel Allocation Schemes • Slotted ALOHA • Throughput= • [t0 – T to t0 ] one frame transmission time • The maximum throughput is reached when G = 1 • The maximum throughput is 1/e 0.368 frames per frame-time
Channel Allocation Schemes • Slotted ALOHA
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • CSMA obliges the users to sense medium prior to transmission • In CSMA, users can be in three possible states: • Transmitting • Idle • Listening • CSMA protocols can be divided into two categories: • Non-persistent CSMA • Persistent CSMA
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • Non-persistent CSMA: • User first senses the carrier when it is ready to transmit • If the channel is idle, user transmits its packet & waits for Ack. • If channel is busy, user “‘backs off’’ for a random period time and try again • This process is repeated until the data packet is transmitted successfully. • In no Ack is received, user schedules the packet for retransmission.
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • Non-persistent CSMA: • Non-persistent CSMA reduces the interference between transmissions • Major drawback: Channel remains idle during the back-off time of a contending host • Non-persistent CSMA reduces channel utilization
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • 1-persistent CSMA: • User first senses the channel, if it is ready to transmit • If the channel is free, user transmits its data • If the channel is busy, user persistentlycontinues to listen • Listening continues until the channel becomes idle • Transmission is done immediately after the channel is sensed idle
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • p-persistent CSMA: • p-persistent is a compromise between non-persistent and 1-persistent • User that senses the channel idle transmits its packet with probabilityp. • With probability (1-p), user waits for a specific time before reattempting to transmit • After waiting period, user senses the channel again • If channel is busy, user continues to listen until the channel becomes idle
Channel Allocation Schemes • Carrier Sense with Multiple Access (CSMA) • p-persistent CSMA: • When the channel becomes idle, the node repeats the p-persistentalgorithm • This process continues until the data packet is transmitted successfully • As pdecreases, users must wait longer to transmit but collision rate decreases. • The optimal value of p for maximum throughput depends on? • Drawback (all CSMA protocols): hidden terminal problem
Channel Allocation Schemes • Hidden Terminal Problem • A and C are out of range of each other • They want to transmit to B • They both find the carrier Idle, when they sense it • So, they start transmission • This results in a collision at B
Channel Allocation Schemes • Exposed Terminal Problem • B is transmitting to A • C decides to send to D • C senses the carrier and finds it busy by B • C refrains from transmission, while this does not cause a collision at A
Channel Allocation Schemes • Collision Resolution • Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) • CSMA/CA uses two control messages • Request to send (RTS) • Clear to send (CTS) • CSMA/CA solves hidden and exposed terminal problems • User sends an RTS packet to its intended recipient • If recipient receives the packet, it issues a CTS packet • When sender receives the CTS, it begins to transmit
Channel Allocation Schemes • Collision Resolution • Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) • When a nearby node hears an RTS addressed to another node, it inhibits transmission for a while and waits for a CTS • If a CTS is not heard, node can begin its data transmission • If a CTS is received, regardless of whether or not an RTS is heard before, node inhibits transmission to allow the communication is completed
Channel Allocation Schemes Collision Resolution Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA)
Channel Allocation Schemes • Collision Resolution • Carrier Sense Multiple Access/Collision Detection (CSMA/CD) • CSMA/CD improves CSMA by terminating the simultaneous transmissions upon detection of a collision • CSMA/CD=carrier sensing scheme + collision detection algorithm • Description • If some node has data, it checks to see if the channel is busy or not. • If so, the transmitting node waits for a random time interval and tries again. • Otherwise, if the channel is idle, it starts transmitting the data.
Channel Allocation Schemes • Collision Resolution • Carrier Sense Multiple Access/Collision Detection (CSMA/CD) • During the transmission, user checks for a collision • How is the collision detected and recovered?(jam signal) • If no collision occurs, it continues sending • Upon detecting a collision, it terminates the current transmission and calls the collision recovery procedure
Channel Allocation Schemes Collision Resolution Carrier Sense Multiple Access/Collision Detection (CSMA/CD)