1 / 18

Reliable Transmission

Reliable Transmission. Overview. Recover from Corrupt Frames Error Correction Codes (ECC); also called Forward Error Correction (FEC) Acknowledgements and Timeouts; also called Automatic Repeat reQuest (ARQ). ARQ. Send the data When acknowledged (ACK), send the next piece of data

alva
Télécharger la présentation

Reliable Transmission

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Reliable Transmission

  2. Overview • Recover from Corrupt Frames • Error Correction Codes (ECC); also called Forward Error Correction (FEC) • Acknowledgements and Timeouts; also called Automatic Repeat reQuest (ARQ)

  3. ARQ • Send the data • When acknowledged (ACK), send the next piece of data • Time out and resend if no acknowledgement • Resend on negative acknowledgement (NACK)

  4. Proverbs 2:5-7 • Trust in the Lord with all thine heart; and lean not unto thine own understanding. • In all thy ways acknowledge him, and he shall direct thy paths. • Be not wise in thine own eyes: fear the Lord, and depart from evil

  5. D&C 59:21 • And in nothing doth man offend God, or against none is his wrath kindled, save those who confess not his hand in all things, and obey not his commandments.

  6. Alan Wilkins • Told of temple experience doing work for his grandmother • He felt the spirit strongly and felt presence of his grandmother • He then wondered if his grandmother was proud of him for his position compared to his other relatives. • The spirit left him and though he fought to rid himself of those thoughts it wouldn’t come back.

  7. Stop and Wait

  8. Receiver Sender Stop and Wait Frame 0 Ack0 Frame 1 Time Ack 1 Frame 0 Ack 0

  9. Stop-and-Wait • Problem: Keeping the pipe full. • Example: 1.5Mbps link x 45ms RTT = 67.5Kb (8KB) delay*bandwidth product. • 45ms to receive Ack for a 1KB frame • BW=8192b/45ms=182Kbps= 1/8 of available bandwidth • Assuming frame size of 1KB, stop-and-wait uses about one-eighth of the link's capacity. • The sender must be able to transmit up to 8 frames before having to wait for an ACK to use the available bandwidth.

  10. What about a window size=2KB • Example: 1.5Mbps link x 45ms RTT = 67.5Kb (8KB) delay*bandwidth product. • 45ms to receive acks for 2 1KB frames • BW=16384b/45ms=364Kbps= 1/4 of available bandwidth • Assuming frame size of 1KB, a 2KB window size uses about one-fourth of the link's capacity. • Full bandwidth with 8KB window = Delay*bandwidth.

  11. Sliding Window • Idea: Allow sender to transmit multiple frames before receiving an ACK, thereby keeping the pipe full. • There is an upper limit on the number of outstanding (un-ACKed) frames allowed.

  12. Sliding Window Sender Receiver . . Time

  13. Sender: • Assign sequence number to each frame (SeqNum) • Maintain three state variables: • send window size (SWS) • last acknowledgment received (LAR) • last frame sent (LFS) • Maintain invariant: LFS - LAR + 1 <= SWS • When ACK arrives, advance LAR, thereby opening window • Buffer up to SWS frames <=SWS LAR LFS

  14. Receiver • Maintain three state variables: • receive window size (RWS) • Largest Acceptable Frame (LAF) • Last Frame Received (LFR) • Maintain invariant: LAF - LFR <= RWS <=RWS LFR LAF

  15. Cumulative Acks • Assume NFE=5, RWS=4, LFA=9 • Frames can arrive out of order • Assume frames 6 and 7 arrive • They cant be acked because 5 hasn’t arrived • When frame 5 arrives, all three frames will be acknowledged • Could NAK 5 to indicate it needs to be resent • Could selectively ack 6 and 7

  16. Sequence Number Space • SeqNum field is finite; sequence numbers wrap around • Sequence number space must be larger than number of outstanding frames • SWS <= MaxSeqNum-1 is not sufficient • suppose 3-bit SeqNum field (0..7) • SWS=RWS=7 • sender transmit frames 0..6

  17. Sequence Number • arrive successfully, but ACKs lost • sender retransmits 0..6 • receiver expecting 7,0..5, but receives second incarnation of old 0..5 • SWS < (MaxSeqNum+1)/2 is correct rule • Intuitively, SeqNum “slides” between two halves of sequence number space

  18. 0 1 2 3 0 0 1 1 2 2 3 3 Illustration WS=4, Max Sequence=3 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 Receiver Sender

More Related