Computer Network | Flow control Methods: Stop and Wait
Some times sending data packets at higher rate to a less efficient receiver may cause for the discarding of data from the buffer and lead to data loss. Flow control methods are used to avoid this dilemma.
Stop and WaitWhen the data packet from the sender reaches at the receiver it returns a success message and once the sender acknowledges the success return it will go for the the next one. This sequence of protocols are know as stop and wait method of flow control.
In theoretical questions Tq and Tprocess usually approximates as zero. Generally Transmission delay for the acknowledgement will be negligibly small (about 10-3 times) compared to transmission delay for the data,which may also can approximate to zero.
Piggybacking is a concept where data is send along with acknowledgment and other control information during bidirectional communication. So in Piggybacking acknowledgement time will become equal to that of propagation transmission time.
Cases where Tacknowledgement, Tq and Tprocess is approximated as zero, total time can be written as
Efficiency η = useful time/ total cycle time
η = Tt⁄Ttotal time = Tt ⁄ (Tt+ 2 Tp) = 1 ⁄ (1+ 2 (Tp ⁄ Tt))= 1 ⁄ (1+ 2a) [ a = Tp ⁄ Tt ]
In networking throughput is the amount of bits a system is able to send in seconds.
Some times throughput is also called effective bandwidth or bandwidth utilization
- The efficiency will decrease with increase in distance between sender and receiver, so stop and wait flow control method is better with LAN and less efficient for WAN.
- As the size of data packet increases the efficiency of stop and wait flow control method becomes high, so its is better for larger packets of data.
Failures and solutions of stop and wait
The protocols of wait and stop flow control methods defined as, after sending a data packet to receiver, the sender has to wait until the acknowledgement is get back to the sender from the receiver as described above.
Case 1: Data missing
To avoid the deadlock usually will go with a "time out timer", so that if the acknowledgement did not receive with in specified time out time the device will consider it as data loss and continue with next packet. This method with addition of timer is known as S&W with ARQ (stop and wait with automatic request).
Case 2: Duplicate packet problem
Suppose sender had send a packet of data D1 and by some reason its acknowledgement A2 got delayed , by the way 'time out timer' triggered the resenting of same data packet (say D1') second time and you got its acknowledgement A2'. Acknowledging of A2' turned to sending of next packet of data D2 and before reaching its real acknowledgment A3 if delayed acknowledgment A2 reaches at the the sender it may misunderstand A2 as A3 and may go for sending of next packet.
In order to remove this issue, with each acknowledgment has to be named with sequential id numbers, so that it is differentiable to the sender.
So Along with Stop and wait algorithm if we use time out timer, sequential ID for data and acknowledgment all of communication problems can be resolved.
Comments
Post a Comment