Stop and Wait is a flow control protocol. In which the sender sends one packet and waits for the receiver to acknowledge and then it will send the next packet. In case if the acknowledgment is not received, the sender will retransmit the packet. This is the simplest one and easy to implement. but the main disadvantage is the efficiency is very low.
Total time taken to send one packet,
= Tt(data) + Tp(data) + Tq + Tpro + Tt(ack) + Tp(ack) Since, Tp(ack) = Tp(data) And, Tt(ack) << Tt(data). So we can neglect Tt(ack) Tq = 0 and Tpro = 0 Hence, Total time = Tt(data) + 2 * Tp
Tt(data) : Transmission delay for Data packet Tp(data) : propagation delay for Data packet Tq: Queuing delay Tpro: Processing delay Tt(ack): Transmission delay for acknowledgment Tp(ack) : Propagation delay for acknowledgment
We know that the Efficiency (η),
= Useful time / Total cycle time. = Tt / (Tt + 2*Tp) = 1 / (1+2*(Tp/Tt)) = 1 / (1+2*a) where, a = Tp / Tt
Throughput: Number of bits send per second, which is also known as Effective Bandwidth or Bandwidth utilization.
Throughput, = L/(Tt + 2*Tp) = ((L/BW)*BW)/(Tt + 2*Tp) = Tt/(Tt + 2*Tp) * BW = 1/(1 + 2a) * BW Hence, Throughput = η * BW where, BW : BandWidth L : Size of Data packet
Factors affecting Efficiency:
n = 1/(1 + 2*(Tp/Tt) = 1/(1 + 2*(d/v)*(BW/L)) where, d = distance between source and receiver v = velocity
Lets see an example.
Tt = 1ms Tp = 2ms Bandwidth = 6 Mbps Efficiency(η) = 1/(1 + 2*a) = 1/(1 + 2*(2/1)) = 1/5 = 20 % Throughput = η * BW = (1/5) * 6 = 1.2 Mbps
As we can observe from the above given formula of Efficiency that:
- On increasing the distance between source and receiver the Efficiency will decrease. Hence, Stop and Wait is only suitable for small area network like LAN. It is not suitable for MAN or WAN, as the efficiency will be very low.
- If we increase the size of the Data packet, the efficiency is going to increase. Hence, it is suitable not for small packets. Big data packets can be send by Stop and Wait efficiently.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Difference between Stop and Wait protocol and Sliding Window protocol
- Stop and Wait protocol, its problems and solutions
- Difference between Stop and Wait, GoBackN and Selective Repeat
- Stop and Wait ARQ
- Efficiency of CSMA/CD
- Efficiency Of Token Ring
- Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
- Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)
- Difference between Serial Line Internet Protocol (SLIP) and Point-to-Point Protocol (PPP)
- Cisco Discovery Protocol (CDP) and Link Layer Discovery Protocol (LLDP) in Data Link Layer
- Difference between Border Gateway Protocol (BGP) and Routing Information Protocol (RIP)
- Stop Wi-Fi from stealing
- Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration
- Difference Between Go-Back-N and Selective Repeat Protocol
- Difference Between High-level Data Link Control (HDLC) and Point-to-Point Protocol (PPP)
- Difference between Stateless and Stateful Protocol
- Difference between Virtual Private Network (VPN) and Multi-Protocol Label Switching (MPLS)
- Main difference between Timestamp protocol and Thomos write rule in DBMS
- Responsibilities and Design issues of MAC Protocol
- Difference between Hierarchical and Flat routing protocol
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : arifhbd120