0% found this document useful (0 votes)
39 views

Windows in TCP

The document discusses the silly window syndrome, which occurs when TCP sends very small segments inefficiently due to a slow sending or receiving application. It can be caused by a sender sending 1 byte at a time or a receiver consuming data slowly. Solutions include Nagle's algorithm to buffer sender data and delayed acknowledgments from the receiver to prevent frequent small window slides. Overall the document focuses on flow control issues that can arise from imbalanced sending and receiving rates.

Uploaded by

SALMAN ASIF S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Windows in TCP

The document discusses the silly window syndrome, which occurs when TCP sends very small segments inefficiently due to a slow sending or receiving application. It can be caused by a sender sending 1 byte at a time or a receiver consuming data slowly. Solutions include Nagle's algorithm to buffer sender data and delayed acknowledgments from the receiver to prevent frequent small window slides. Overall the document focuses on flow control issues that can arise from imbalanced sending and receiving rates.

Uploaded by

SALMAN ASIF S
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Windows in TCP

Send Window in TCP


Receive Window in TCP
Flow Control
• The flow control balances the rate a producer
creates data with the rate a consumer can use
the data.
• TCP separates flow control from error control
Flow Control Scenario
Silly Window Syndrome
• A serious problem can arise in the sliding
window operation when either the sending
application program creates data slowly or the
receiving application program consumes data
slowly, or both.
• Any of these situations results in the sending
of data in very small segments, which reduces
the efficiency of the operation.
Example:
• If TCP sends segments containing only 1 byte of
data, it means that a 41-byte datagram (20 bytes of
TCP header and 20 bytes of IP header) transfers
only 1 byte of user data.
• Here the overhead is 41/1, which indicates that we
are using the capacity of the network very
inefficiently.
• The inefficiency is even worse after accounting for
the data-link layer and physical-layer overhead.
• This problem is called the silly window syndrome.
Syndrome Created by the Sender
• The sending TCP may create a silly window
syndrome if it is serving an application program
that creates data slowly, for example, 1 byte at a
time.
• The application program writes 1 byte at a time
into the buffer of the sending TCP. If the sending
TCP does not have any specific instructions, it
may create segments containing 1 byte of data.
• The result is a lot of 41-byte segments that are
traveling through an internet.
• The solution is to prevent the sending TCP
from sending the data byte by byte.
• The sending TCP must be forced to wait and
collect data to send in a larger block.
• How long should the sending TCP wait? If it
waits too long, it may delay the process. If it
does not wait long enough, it may end up
sending small segments.
Nagle’s algorithm for silly window syndrome at sender:
1. The sending TCP sends the first piece of data it
receives from the sending application program even if it
is only 1 byte.
2. After sending the first segment, the sending TCP
accumulates data in the output buffer and waits until
either the receiving TCP sends an acknowledgment or
until enough data have accumulated to fill a maximum-
size segment. At this time, the sending TCP can send the
segment.
3. Step 2 is repeated for the rest of the transmission.
Segment 3 is sent immediately if an acknowledgment is
received for segment 2, or if enough data have
accumulated to fill a maximum-size segment.
Syndrome Created by the Receiver
Case 1: Receiving TCP entity is serving an
application program that consumes data
slowly, for example, 1 byte at a time.
Case 2 : If the input buffer of the receiving TCP
is 4 kilobytes. The sender sends the first 4
kilobytes of data. The receiver stores it in its
buffer.
• Two solutions have been proposed to prevent the silly window
syndrome created by an application program that consumes data
more slowly than they arrive.
• Clark’s solution is to send an acknowledgment as soon as the data
arrive, but to announce a window size of zero until either there is
enough space to accommodate a segment of maximum size or until
at least half of the receive buffer is empty.
• The second solution is to delay sending the acknowledgment.
• This means that when a segment arrives, it is not acknowledged
immediately.
• The receiver waits until there is a decent amount of space in its
incoming buffer before acknowledging the arrived segments.
• The delayed acknowledgment prevents the sending TCP from sliding
its window.
• After the sending TCP has sent the data in the window, it stops.
• This kills the syndrome.
• Delayed acknowledgment also has another
advantage: it reduces traffic.
• The receiver does not have to acknowledge
each segment.
• Disadvantage is that the delayed
acknowledgment may result in the sender
unnecessarily retransmitting the
unacknowledged segments.

You might also like