Question

In: Computer Science

Describe the concept of flow control and briefly describe the mechanism/s implemented by the TCP protocol...

Describe the concept of flow control and briefly describe the mechanism/s implemented by the TCP protocol for this purpose.

Solutions

Expert Solution

Describe the concept of flow control and briefly describe the mechanism/s implemented by the TCP protocol for this purpose.

Flow control is the process of managing the rate at which data is transmitted. It prevents a fast sender from overwhelming a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with data from transmitting node.

When we need to send data over a network, the sender application writes data to a socket, the transport layer will wrap this data in a segment and hand it to the network layer that will somehow route this packet to the receiving node.

On the other side of this communication, the network layer will deliver this piece of data to TCP, that will make it available to the receiver application as an exact copy of the data sent, meaning if will not deliver packets out of order, and will wait for a retransmission in case it notices a gap in the byte stream.

TCP stores the data it needs to send in the send buffer, and the data it receives in the receive buffer. When the application is ready, it will then read data from the receive buffer.

Flow Control is all about making sure we don’t send more packets when the receive buffer is already full, as the receiver wouldn’t be able to handle them and would need to drop these packets.

Every time TCP receives a packet, it needs to send an ack message to the sender, acknowledging it received that packet correctly, and with this ack message it sends the value of the current receive window, so the sender knows if it can keep sending data.

TCP controls Flow Control by Sliding Window Mechanism


    Sliding window is a general protocol used with bit-oriented protocols. In this protocol, the transmitter maintains a variable, S, which denotes the sequence number of the next frame to be transmitted. Similarly, the receiver maintains a variable, R, which denotes the sequence number of the next frame it expects to receive. Both variables are restricted to a limited range of values (e.g., 0 through 7) by using modulo arithmetic (e.g., modulo 8).


    A window denotes a continuous subrange within the permitted range of values for the sequence numbers. For example, the ranges 0-3 and 6-1 both represent windows of size 3. Both the transmitter and the receiver have their own window:


* The transmitter window denotes the frames that have been transmitted but remain unacknowledged. This window can vary in size, from empty to the entire range. The transmitter must have enough buffer space to store the maximum possible number of unacknowledged frames.


* The receiver window denotes frames that are expected to be received. The receiver window size is fixed. A receiver window size of 1 means that frames must be received in transmission order. Larger window sizes allow the receiver to receive as many frames out of order. The receiver must have enough buffer space to store the maximum possible number of frames that can be received out of order.
  
The sliding window protocol operates as follows. When the transmitter sends a frame, it increments S (and the upper bound of its window). When the receiver receives a frame whose sequence number falls within its window, it increments R and sends an ACK to the transmitter. If the frame's sequence number matches any position other than the lower bound of the window, it notes the fact that the corresponding frame has now been received. If the frame's sequence number matches the lower bound of the window, the window is rotated clockwise by one position (or more positions if succeeding frames within the window have already been received).


    When the transmitter receives an ACK for a transmitted frame, it increments the lower bound of its window. It should be now clear that flow control is straightforward in the sliding window protocol. If the receiver withholds ACK frames, the transmitter soon reaches its maximum window size and has to stop transmitting. Once it receives further ACK frames, it can reduce its window size and transmit more frames.


Related Solutions

Briefly explain the Flow Control mechanism in Transmission Control Protocol (TCP)
Briefly explain the Flow Control mechanism in Transmission Control Protocol (TCP)
Why Transmission Control Protocol (TCP) is called as Connection Oriented? Briefly explain
Why Transmission Control Protocol (TCP) is called as Connection Oriented? Briefly explain
Describe the services of the IP protocol, and potentially ICMP protocol, with respect to flow control...
Describe the services of the IP protocol, and potentially ICMP protocol, with respect to flow control (ensuring the sender does not overwhelm the receiver).
Describe the service TCP provides with respect to flow control and explain the mechanisms it uses...
Describe the service TCP provides with respect to flow control and explain the mechanisms it uses to overcome the deficiencies of IP.
•Describe security problems inherent to the TCP/IP protocol suite..
•Describe security problems inherent to the TCP/IP protocol suite..
1a) In your own words, what is the difference between Transport Control Protocol (TCP) and User...
1a) In your own words, what is the difference between Transport Control Protocol (TCP) and User Datagram Protocol (UDP)? Also give some examples of services that use TCP and UDP. b) PC1 is assigned the IP address 192.168.13.8 with a subnet mask of 255.255.255.224. PC1 sends a packet to PC2 which has an IP address of 192.168.13.65. Is PC1 (192.168.13.8) and PC2 (192.168.13.65) in the same subnet based on the subnet mask of PC1 (255.255.255.224)?
1) a) Describe the design principles of the TCP/IP protocol that explain the decentralised nature of...
1) a) Describe the design principles of the TCP/IP protocol that explain the decentralised nature of the Internet and Web. How does the TCP/IP protocol promote decentralisation? b) Explain how individual machines and end users are empowered by the TCP/IP and HTTP protocols. Give illustrations to support your answers.
Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t copy the...
Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t copy the diagram from lecture slides or the Internet. You have to use your own data for this diagram. The diagram should be very clear and properly labelled.
Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t copy the...
Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t copy the diagram from lecture slides or the Internet. You have to use your own data for this diagram. The diagram should be very clear and properly labelled.
Question 4 Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t...
Question 4 Draw a diagram using the congestion control mechanism of TCP Reno and Tahoe. Don’t copy the diagram from lecture slides or the Internet. You have to use your own data for this diagram. The diagram should be very clear and properly labelled. Question 5 What is the ideal window size for the working of selective repeat? Explain with an example.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT