Medium Access Control Methods:: Mobile Computing
Medium Access Control Methods:: Mobile Computing
MEDIUM ACCESS CONTROL METHODS: With both the ring and bus topologies there is only a single logical transmission path linking all the DTEs. Consequently, a discipline must be imposed on all the DTEs connected to the network to ensure that the transmission medium is accessed and used in a fair way. The techniques that have been adopted for use in the various standards documents are Carrier-Sense Multiple-Access with Collision Detection (CSMA/CD) for bus network topologies CSMA/CD The CSMA/CD method is used solely with bus networks. Multiple Access (MA) With this network topology, all DTEs are connected directly to the same cable, which is used for transmitting all data between any pair of DTEs. The cable is said to operate in a multiple access (MA) mode. To transmit data the sending DTE first encapsulates the data in a frame with the required destination DTE address at the head of the frame. The frame is then transmitted (or broadcast) on the cable. All DTEs connected to the cable detect whenever a frame is being transmitted. When the required destination DTE detects that the frame currently being transmitted has its own address at the head of the frame, it continues reading the data contained within the frame and responds according to the defined link protocol. The source DTE address is included as part of the frame header so that the receiving DTE can direct its response to the originating DTE. Carrier-Sense With this style of operation, two DTEs can attempt to transmit a frame over the cable at the same time, causing the data from both sources to be corrupted. To reduce this possibility, before transmitting a frame the source DTE first listens - electronically to the cable to detect whether a frame is currently being transmitted. If a carrier is sensed (CS), the DTE defers its transmission until the passing frame has been transmitted, and only then does it attempt to send the frame. Collision Detection Even so, two DTEs wishing to transmit a frame may simultaneously determine that there is no activity (transmission) on the bus, and both start to transmit their frames simultaneously. A collision is then said to occur since the contents of both frames will collide and be corrupted. A DTE simultaneously monitors the data signal on the cable when transmitting the contents of a frame on the cable. If the transmitted and monitored signals are different, a collision is assumed to have occurred collision detected (CD).
Page 1
Jam Sequence To ensure that the other DTE(s) involved in the collision is (are) aware that a collision has occurred, the first DTE reinforces the collision by continuing to send a random bit pattern for a short period. This is known as the jam sequence. Retransmission The two (or more) DTEs involved then wait for a further short random time interval before trying to retransmit the affected frames. We can conclude that access to a CSMA/CD bus is probabilistic and depends on the network (cable) loading. Since the bit rate used on the cable is very high (up to 10Mbps), the network loading tends to be low. Since the transmission of a frame is initiated only if the cable is inactive, the probability of a collision occurring is in practice also low. NEED FOR A SPECIALIZED MAC: Medium access control(MAC) algorithms are specifically adopted to the wireless domain, that comprises all mechanisms that regulates user access to a medium using SDM, TDM, FDM or CDM. MAC belongs to layer2 of Data Link Control layer (DLC) that is subdivided into Logical Link Control layer (LLC) layer2b and the MAC layer2a.
Page 2
The transmission range of A reaches B, but not C (the detection range does not reach C either). The transmission range of C reaches B, but not A. Finally, the transmission range of B reaches A and C, i.e., A cannot detect C and vice versa. Hidden Terminal Problem A starts sending to B. C does not receive this transmission. C also wants to send something to B and senses the medium. The medium appears to be free, the carrier sense fails. Thus, C also starts sending causing a collision at B. But now A cannot detect this collision and continues with its transmission. A is hidden for C and vice versa. Exposed Terminal This effect causes unnecessary delay. Now consider the situation that B sends something to A and C wants to transmit data to some other mobile phone outside the interference ranges of A and B. C senses the carrier and detects that the carrier is busy. Thus, C postpones its transmission. But as A is outside the interference range of B waiting is not necessary Causing a collision at B does not matter because the collision is too weak to propagate to A. In this situation, C is exposed to B.
B.Srinivas, Asst. Professor, CSE Dept Page 3
A and B are both sending with the same transmission power. As the signal strength decreases proportionally to the square of the distance, Bs signal drowns out As signal. As a result, C cannot receive As transmission. MULTIPLEXING: A mechanism using which several users can share a common medium with a min or no interference. SPACE DIVISION MULTIPLE ACCESS (SDMA): Used by old analog telephone systems and useful for allocating a separate space to users in wireless networks also. A typical application of SDMA involves deciding and assigning an optimal Base Station (BS) with good signal quality and strength to a mobile phone by a MAC algorithm. The bases for SDMA algorithm is formed by cells and sectorized antennas which constitute the infrastructure implementing Space Division Multiplexing (SDM). The following figure shows Space Division Multiplexing (SDM) scheme that consists of six channels ki that can be mapped into 3 spaces with dimensions space(S), code(C) and frequency(F). Here the space is
represented via separated circles indicating the interference range (guard spaces). Channels ki
K1
C
K2
K3
K4
K5
C
K6
S1
C T
S2
S3
Fig: Frequency Division Multiplexing (FDM) Allocation of frequencies can be either fixed(as for radio stations) or dynamic(demand driven) FDMA can be of two types: Pure FDMA: channel can be assigned to the same frequency at all times. Frequency Hoping: Change the frequency according to a pattern (known as FDMA with TDMA). The sender and receiver should have to agree on hoping scheme to know the dynamic frequency change. FDM is often used for simultaneous access to the medium b BTS & MS in cellular networks. Here two patterns are possible for duplex channel establishment. Using FDMA fixed allocation in mobile phone network based on GSM standard for 900MHz, 2 directions MS->BTS and BTS->MS are separated using different frequencies. This scheme is known as Frequency Division Duplex (FDD) and the 2 frequencies are known as uplink and down link frequencies respectively.
Page 5
Fig: FDD/FDMA - general scheme, example GSM TIME DIVISION MULTIPLE ACCESS (TDMA) In the TDMA all the senders use the same frequency but at different time interval. Channel ki is given the whole band width for a certain amount of time according to Time division Multiplexing(TDM) scheme. Guard Space represents the time gaps for senders. For example on a high way road multiple cars can travel in the same lane in at different time gaps. This approach can be called as TDMA.
C F
Fig: Time Division Multiplexing (TDM) Drawbacks: Senders need precise clocks or alternatively a way for synchronization signal to all senders. Receiver has to tune and listen the medium up to a particular fixed time slot only. Enhancements: Providing more sending time to senders with a heavy load and less to those with light load. FDM & TDM can be combined; a channel ki can use a certain frequency band for certain amount time according its need. (Ex: Mobile phone GSM network)
Page 6
C F
Fig: FDM+TDM Combination Multiplexing Typical Examples for Fixed and Dynamic TDMA schemes: 1. Fixed TDM: Allocating time slots for channels in a fixed pattern, results in a fixed band width. Can be used to implement multiple-access and a duplex channel (slots for uplink, down link) between BTS and MS. Assigning different slots for uplink and down link using same frequency s called TDD (Time Division Duplex) scheme.
Fig: TDM for multiple access and duplex BTS uses one of the 12 different slots from the down link and MS performs vice versa form uplink. Pattern repeats after every 10ms with each slot duration as 417s. With this method, each (node) has a specific time interval/slot and, once the time slot of a transmitter reached, it transmits at the full bandwidth for the (fixed) duration of the time
B.Srinivas, Asst. Professor, CSE Dept Page 7
Page 8
Differences Between Pure ALOHA and Slotted ALOHA Transmission In Pure ALOHA when a frame first arrives, the node immediately transmits the frame in its entirely into the Broadcast Channel. In Slotted ALOHA when a node has a fresh frame to send, it waits until the beginning of the next slot and transmits the entire frame in the slot. Timing In Pure ALOHA Nodes can transmit frames at Random Times. In Slotted ALOHA Nodes can transmit frames in their respective slot boundaries only at the beginning of the Slot. Synchronization Pure ALOHA does not require Synchronization of slots of any nodes. Slotted ALOHA requires synchronization between slots of nodes. Mode of Transfer In Pure ALOHA the Mode of Transfer is Continuous. In Slotted ALOHA the mode of transfer is Discrete. Collision In Pure ALOHA If a Collision Occurs the nodes will then immediately retransmit the frame with probability P or the frame transmission time for retransmitting the frame. In Slotted ALOHA, if a collision occurs, the node detects the collision before the end of the slot the node retransmits its frame in each subsequent slot with probability P until the frame transmitted without a collision. Efficiency In Pure ALOHA Efficiency is Half of Slotted ALOHA. In Slotted ALOHA efficiency is more than that of Pure ALOHA.
Page 9
4. Carrier Sense Multiple Access Protocols (CSMA) With slotted ALOHA the best channel utilization that can be achieved is 1/e. In local area networks, it is possible for stations to detect what other stations are doing, and adapt their behavior accordingly. These networks can achieve a much better utilization than 1/e. Protocols in which stations listen for a carrier (i.e., a transmission) and act accordingly are called carrier sense protocols. Persistent and Non-persistent CSMA 1-Persistent The first carrier sense protocol that we will study here is called 1-persistent CSMA (Carrier Sense Multiple Access). When a station has data to send, it first listens to the channel to see if anyone else is transmitting at that moment. If the channel is busy, the station waits until it becomes idle. When the station detects an idle channel, it transmits a frame. If a collision occurs, the station waits a random amount of time and starts all over again. The protocol is called 1-persistent because the station transmits with a probability of 1 whenever it finds the channel idle. The propagation delay has an important effect on the performance of the protocol. There is a small chance that just after a station begins sending, another station will become ready to send and sense the channel. If the first station's signal has not yet reached the second one, the latter will sense an idle channel and will also begin sending, resulting in a collision. The longer the propagation delay, the more important this effect becomes, and the worse the performance of the protocol. Even if the propagation delay is zero, there will still be collisions. If two stations become ready in the middle of a third station's transmission, both will wait politely until the transmission ends and then both will begin transmitting exactly simultaneously, resulting in a collision. If they were not so impatient, there would be fewer collisions. Even so, this protocol is far better than pure ALOHA, because both stations have the decency to desist from interfering with the third station's frame. Intuitively, this will lead to a higher performance than pure ALOHA. Exactly the same holds for slotted ALOHA. NonPersistent A second carrier sense protocol is nonpersistent CSMA. In this protocol, a conscious attempt is made to be less greedy than in the previous one. Before sending, a station senses the channel. If no one else is sending, the station begins doing so itself. However, if the channel is already in use, the station does not continually sense it for the
B.Srinivas, Asst. Professor, CSE Dept Page 10
CSMA/CA
Another adaptation of CSMA/CD known as CSMA with collision avoidance (CSMA/CA) is also used. Its principle of operation is shown in Figure
Page 11
As we can see, instead of initiating the transmission of a frame immediately the medium becomes quiet, the node first waits a further short random time interval, and only if the medium is still quiet after this interval does it start to transmit. In this way, if other nodes are also waiting then the node that computes the shortest time will gain access first and the remaining nodes will defer to this. Again, the efficiency of the scheme is a function of the number of time increments and hence bits in the pseudorandom sequence in the maximum collision avoidance time period. Handshaking Procedure Another issue that must be addressed when using radio (and infrared) arises because there is no guarantee that an intended communications partner (node) is in radio contact with the source node. Therefore, an additional handshake procedure over and above the basic MAC method is incorporated into the MAC protocol. Since it is intended that this should be used with the different types of MAC method, it is known as the distributed foundation wireless MAC (DFW MAC) protocol. The four-way handshake procedure used is shown in Figure. It is intended for use in both infrastructure and ad hoc applications.
Whenever a portable unit needs to send a frame, it first sends a short request- to-send (RTS) control message/frame to either its PAU or another portable unit using one of the MAC methods just described CSMA/CD or CSMA/CA. The RTS control message contains the MAC address of both the source and destination units and, on receipt of this, providing the intended destination receives the request and is ready to receive a frame, it broadcasts a clear-to-send (CTS) reply message/frame with the same pair of addresses but with their order reversed within it. Alternatively, if the destination is not prepared to receive a frame, it returns a receiver-busy reply. If the reply is positive, then the requesting unit transmits the waiting frame (DATA) and, if this is received correctly, the destination returns a positive acknowledgment (ACK) message. However, if the frame is corrupted, then a negative acknowledgment (NAK) message is returned and the source tries to send it again. This procedure will repeat up to a defined number of retries. Remember that all of the control messages identified are sent using the particular MAC method adopted.
B.Srinivas, Asst. Professor, CSE Dept Page 12
Implicit reservation (PRMA - Packet Reservation MA): a certain number of slots form a frame, frames are repeated stations compete for empty slots according to the slotted aloha principle once a station reserves a slot successfully, this slot is automatically assigned to this station in all following frames as long as the station has data to send competition for this slots starts again as soon as the slot was empty in the last frame
7. Reservation Time Division Multiple Accesses: Every frame consists of N mini-slots and x data-slots Every station has its own mini-slot and can reserve up to k data-slots using this mini-slot (i.e. x = N * k). Other stations can send data in unused data-slots according to a round-robin sending scheme (best-effort traffic)
B.Srinivas, Asst. Professor, CSE Dept Page 13
8. MACA - collision avoidance: MACA (Multiple Access with Collision Avoidance) uses short signaling packets for collision avoidance RTS (request to send): a sender request the right to send from a receiver with a short RTS packet before it sends a data packet CTS (clear to send): the receiver grants the right to send as soon as it is ready to receive Signaling packets contain sender address receiver address packet size Variants of this method can be found in IEEE802.11 as DFWMAC (Distributed Foundation Wireless MAC) MACA examples MACA avoids the problem of hidden terminals A and C want to send to B A sends RTS first C waits after receiving CTS from B MACA avoids the problem of exposed terminals B wants to send to A, C to another terminal now C does not have to wait for it cannot receive CTS from A MACA variant: DFWMAC in IEEE802.11
Page 14
Code division multiple access (CDMA) systems use codes to separate different users in code space and to enable access to a shared medium without interference. Different systems use different codes for Spread Spectrum and will use the medium at the same time. Code Division Multiple access (CDM) can be used to decide codes in CDMA.
Page 16