1
play

1 Why Why flow flow control? control? sender - PDF document

Lecture 7. Lecture 7. TCP mechanisms for: TCP mechanisms for: data transfer control / flow control error control congestion control Graphical examples (applet java) of several algorithms at:


  1. Lecture 7. Lecture 7. TCP mechanisms for: TCP mechanisms for: � data transfer control / flow control � error control � congestion control Graphical examples (applet java) of several algorithms at: http://www.ce.chalmers.se/~fcela/tcp-tour.html Giuseppe Bianchi Data transfer control over TCP Data transfer control over TCP a double- a double -face face issue issue: : � ������������������ � ����������� � ������������ � �������� �!"#���$$$ � ������������� �� ���� � ������������� �� ���� ������� ������� �������� ������� ���� �� �������� � ���������������� ��� � ������������������� % �������� ������ ���� ������������� �����%��� �������� � ������������� ���&�' ()������������� *�������� � ���� ������� + ,-��.��/�,-�#���������0 Giuseppe Bianchi TCP pipelining pipelining TCP � 1�������� )�������� 2������3� �������������4 W=6 � �������������������� �������������� 5 � � W ⋅ MSS � � = thr min C , � � RTT + MSS / C � 6������ �� &���������� ���57 Giuseppe Bianchi 1

  2. Why Why flow flow control? control? sender � ������� �������� ������ receiver � #��166�8�,9:�8�,-;<������ � =����������� �&�����8�<�9:�8�<)>,������ � ���� 5��&�� �� ����� ����?&�� ���� ;�@�166 � �������������������������� � A&�������������������&����@�������5����&�$ � A!�6��!��5! 9$�5�B7 Giuseppe Bianchi Window- -based based flow flow control control Window � �������� ��������������� ������ ���� ����� � E��� ����������� ������� ����(0� F����������&������ ��������� ���!6����� �����������G Receiver buffer From IP Application process read() Receiver window � 166�8�,9:�8�,-;<������ � ������� :&������������� 8�)-�9:�8�)-,;-������ � �.������������� ����&������C��������� � ���������������8�6�����������)-%D�8�;9:�8�;->D������ � ��������������������5��&����������������?&�� ���� ,�@�166 Giuseppe Bianchi Source port Destination port 32 bit Sequence number 32 bit acknowledgement number Header 6 bit U A P R S F R C S S Y I Window size length Reserved G K H T N N checksum Urgent pointer � ����������� ����������� �� ��������� ����������� �������� ����� � ������������ � )D�������������������� ���4�� � 1���&���&�����������������-�(����&���0��� DHHCH � 6�������&���� LastByteSent - LastByteAcked <= RcvWindow. � 58,-;<�������� � #������������������,-;<���������������4���$�$�������F��4����4/5%)G � ����������������������������,-;<��������&����������(����&������ ��������0 Giuseppe Bianchi 2

  3. What is is flow flow control control needed needed for for? ? What � Window flow control guarantees receiver buffer to be able to accept outstanding segments. � When receiver buffer full, just send back win=0 � in essence, flow control guarantees that transmission bit rate never exceed receiver rate � in average! � Note that instantaneous transmission rate is arbitrary… � as well as receiver rate is discretized (application reads) Giuseppe Bianchi Sliding window window Sliding W=3 Dynamic window based reduces to S=4 pure sliding window when receiver S=5 app is very fast in reading data… S=6 SEQ S=7 W=3 1 2 3 4 5 6 7 8 9 Window “sliding” forward Giuseppe Bianchi Dynamic Dynamic window window - - example example sender receiver Rec. Buffer Exchanged param: MSS=2K, 0 4K TCP CONN sender ISN=2047, WIN=4K EMPTY SETUP (carried by receiver SYN-ACK) Application does a 2K write 2K, seq=2048 0 4K 2K Ack=4096, win=2048 Application 0 4K does a 3K write 2K, seq=4096 FULL Ack=6144, win=0 Sender blocked Application does a 2K read Ack=6144, win=2048 0 4K Sender unblocks 2K may send last 1K 1K, seq=6144 Giuseppe Bianchi 3

  4. Performance: bounded Performance: bounded by by receiver buffer receiver buffer size size � Up to 1992, common operating systems had transmitter & receiver buffer defaulted at 4096 � e.g. SunOS 4.1.3 � way suboptimal over Ethernet LANs � raising buffer to 16384 = 40% throughput increase (Papadopulos & Parulkar, 1993) � e.g. Solaris 2.2 default � most socket APIs allow apps to set (increase) socket buffer sizes � But theoretical maximum remains W=65535 bytes… Giuseppe Bianchi Maximum achievable Maximum achievable throughput throughput (assuming ( assuming infinite infinite speed speed line…) line…) 1000 Throughput (Mbps) W = 65535 bytes 100 10 1 0 100 200 300 400 500 RTT (ms) Giuseppe Bianchi Window Scale Option Window Scale Option � Appears in SYN segment � operates only if both peers understand option � allows client & server to agree on a different W scale � specified in terms of bit shift (from 1 to 14) � maximum window: 65535 * 2 b � b=14 means max W = 1.073.725.440 bytes!! Giuseppe Bianchi 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend