 Hello and welcome to this video session on medium access control protocols CSMA and CSMA CD. Myself Mr. Vipul Kondekar from Walton Institute of Technology, Sholapur. These are the learning outcomes for this video session. So first what is the problem called as channel allocation problem? We will try to understand. And then after this how this problem is solved by the protocols CSMA, CSMA CD. And then we will compare its performance over Aloha protocols and other medium access protocols also at the end. So these are the contents of the presentation. We will try to understand channel allocation problem and then how channel allocation problem can be solved by using the protocols CSMA and CSMA CD. Now channel allocation problem is when a single channel is shared by multiple nodes in the network. Then who will get access for the channel? If more than one node is transmitting the data simultaneously onto the channel and if you are not taking care of this transmission, then what may result is called as collision. So collision may result if more than one stations are transmitting the data and if you are not taking care of such simultaneous transmissions, then it will be the frames will get garbled, invalid frames will be resulting and there is no access use of those frames. We need to discard those frames. So even if a single bit overlaps, then also collision will occur. So this is the problem called as channel allocation problem. So how to solve this channel allocation problem? So there are different approaches. So shared channel access can be controlled by static channel allocation where you may go for using this TDMA, FDMA and CDMA. Usually whenever all the nodes have sufficient data or traffic to be sent onto the network, these static channel allocation schemes are performing better. But if all nodes are not having data at all times in that case, you should go for dynamic allocation of the channel and dynamic allocation can be done by scheduling where polling or reservation type of approaches can be used or another approach is go for random access where aloha or slotted aloha schemes can be used or another way is you go for using CSMA or CSMA CD. Now basic drawback of aloha or slotted aloha is you are transmitting the data randomly whenever you want to send the data. You send the data in pure aloha. When you want to send the data, you wait for the time slot in case of slotted aloha. At the start of time slot only you are supposed to transmit the data. But still there is possibility of getting the collision. So what is the solution for this problem is you can have one enhanced approach called as CSMA. Carrier sense multiple access. So what you are doing here is you are sensing the carrier. You are listening to the channel and you check whether somebody is transmitting or not. If somebody is already transmitting on to the channel you should not transmit because if you transmit the result will be collision. So you sense the carrier. If the carrier is idle then only you are supposed to transmit the data. So this is the basic concept of the CSMA protocol. There are several types of CSMA protocol. One persistent CSMA, non persistent CSMA, P persistent CSMA. And this performance can be still improved by making the use of a CSMA protocol called as CSMA CD. Carrier sense multiple access with collision detect. Now let us try to understand what these CSMA types are. So first type of CSMA is one persistent CSMA. Here what you are doing is you sense the carrier. If nobody is transmitting, if nobody is transmitting you transmit. But if you find that somebody is transmitting the data on to the shared channel then continuously go on checking whether the channel is becoming free or not. So if the channel is sense free again you transmit. But again if you find that channel is busy then again continuously go on monitoring the channel. So this approach is called as one persistent CSMA. Second approach is non persistent CSMA. In non persistent CSMA what you are doing is you initially check whether the channel is idle or not. If nobody is transmitting again you transmit the data. But if somebody is transmitting in that case wait for some random amount of time instead of continuously monitoring the channel. If somebody is transmitting do one thing wait for random amount of time and then again after that time monitor the channel. We will assume here that if the network load is very less after that random amount of time probability of having that channel again ideal will be more. And in that case you can transmit the data. So this approach is called as non persistent CSMA or this is also called as zero persistent CSMA. Third type of CSMA protocol is P persistent CSMA. In P persistent CSMA basic approach is same. You check for the channel whether the channel is free or not. If somebody is transmitting wait if nobody is transmitting you can transmit. If nobody is transmitting you can transmit the data. But if the channel is not idle then what you have to do is if the channel is not idle you have to monitor until channel becomes free. But if you find the channel is free after that particular time don't transmit the data send the data with probability P. Means you may be one approach of having this probability P maybe generate some random number. And check whether that random number is greater than that predefined number some predefined number or not. If it is greater than transmit if it is not greater if it is having less value then wait don't transmit the data. Again wait for some time you may call it as some end to end delay time let us say it is tau. So wait for that time tau and then you can go for the transmission of the data. This is P persistent CSMA. Now we have seen you are making sure that nobody is transmitting then only you do the transmission. That is the concept of CSMA. Now you think is it possible to get collision if you are going for the CSMA protocol. Yes it is possible that you will get collision though you are going for this CSMA approach. What are the reasons for getting collision is one reason may be simultaneous transmissions. Means two nodes are simultaneously checking the carrier and both are finding that nobody is transmitting the data. At that time nobody was transmitting and then the result is both the nodes will feel that channel is idle and they will send their data. And what will happen is it will result into the collision. Another reason for getting the collision in CSMA is may be due to propagation delay. The concept is suppose A has started transmission of the data and then A checks channel it finds that channel is idle. So A has started transmission of the data. Now when A has started transmission of the data definitely that data transmission will take some non-zero amount of time to reach to some destination. Let us say on to the shared channel suppose another user B is present and A has already done the transmission. But A's data is not received up to the B. Now in that case B is sensing the carrier and B will find that the channel is idle. Though already A has started the transmission because of this propagation delay. B will find that nobody is transmitting on to the channel and if again B starts doing the transmission what happens is again collision will occur. So these are the two reasons why you may get collision though you are having this improved protocol called as CSMA. So improvement over CSMA is the protocol called as CSMA CD carrier says multiple access with collision detect. So here what you do is you continuously monitor the channel if the channel is free you transmit the data. If channel is not idle somebody is transmitting the data so you can have weight based on that P persistent one persistent CSMA. But ultimately every time what you do is you can go for detection of the collisions all stations transmit the data by sensing the carrier. After commencement of the transmission continuously check if the collision has occurred or not and if the collision is detected then stop doing the transmission. There is no use of transmitting the data if you find that collision has occurred. So stop the transmission and try for the transmission again by rescheduling the timings. So in CSMA collision will result collision is possible and it will result into the wastage of the x seconds spent in the transmitting the entire frame. So time wastage is there but if you go for CSMA CD this is going to reduce the wastage of time as soon as collision is detected the transmission gets aborted. So you will start to stop that transmission. So this is the improvement in CSMA CD and hence whatever Ethernet you are using for internet connectivity wired internet connectivity that Ethernet protocol also makes the use of this CSMA CD for medium access control. So this is the performance if you compare the performance with respect to the throughput and the offer load this performance is observed for a propagation delay of 0.01 seconds. So you find that as compared this is a pure aloha performance it gets improved in slotted aloha it gets still improved in one persistent, non-persistent and maximum throughput is possible if you go for this CSMA CD protocol. So this is how you can conclude that the performance of CSMA CD protocol is comparatively better as when you are doing its comparison with its prior alternative protocols called as non-persistent, one-persistent, slotted or pure aloha. These are the references used for this video presentation. Thank you.