1 / 19

CIS 725

CIS 725. Data Link Layer. Flow Control. Producer-consumer problem Sliding window protocol - Go Back N - Selective retransmission. Go Back N. na. x. x. x. x. ns. S:: ns = 1; na = 1 do ns < na + W / avail( nl_buff ) / sbuff [ns] = null 

Download Presentation

CIS 725

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. CIS 725 Data Link Layer

  2. Flow Control • Producer-consumer problem • Sliding window protocol - Go Back N - Selective retransmission

  3. Go Back N na x x x x ns S:: ns = 1; na = 1 do ns < na + W /\ avail(nl_buff) /\ sbuff[ns] = null  sbuff[ns] = nl_buff; R!(sbuff[ns],ns); ns++ [] sbuff[ns] != null  R ! (sbuff[ns],ns); ns++ [] R ? ack(s)  if s > na then na = s [] timeout  ns = na od

  4. R:: nr = 1 do S ? (D,x)  if nr = x then deliver(D); nr++ S ! Ack(nr) od

  5. Acks sent but not yet received nr na ns ns <= na + W outstanding data packets ns na 1 1 nr W = 3 d1 2 1 1 3 1 d2 2 d3 4 1 3 a2 a3 4 2 5 2 d4 d5

  6. Cumulative Acks ns na 1 1 nr W = 3 d1 2 1 1 d2 3 1 2 d3 4 1 3 a2 a3 4 1 5 1 d4 d5

  7. d,1 d,1 d,2 d,2 d,3 a,2 d,3 start timer start timer a,2 a,2 a,3 start timer d,4 timeout d,1 start timer d,5 d,2 - Alternative: Timeout per message

  8. Go Back N S:: ns = 1; na = 1 do ns < na + W /\ avail(nl_buff) /\ sbuff[ns] = null  sbuff[n] = nl_buff; R!(sbuff[ns],ns); ns++; if ns = na + W then start timer [] sbuff[ns] != null  R ! (sbuff[ns],ns); ns++ [] R ? ack(s)  if s > na then na = s; cancel timer [] timeout  ns = na od

  9. d,1 • A ------------------B • Bandwidth =108 bytes/sec • RTD = 2 msecs • 2msecs ---- 2* 105 bytes • 1 packet = 1000 bytes • W = 200 • W will also depend on • buffer space at the receiver d,2 a,2 Timeout interval = 2msecs d,W

  10. Selective Retransmission • Retransmit only those packets the lost packets

  11. Selective Retransmission S:: ns = 1; na = 1 do ns < na + W /\ avail(nl_buff) /\ sbuff[ns] = null  sbuff[n] = nl_buff; R!(sbuff[ns],ns); ns++ [] R ? nack(s, bitmap)  na = s; for (0 <= i < W) if bitmap[i] then R! (sbuff[s+i], s+i); [] timeout  R ! (sbuf[na], na) od

  12. R:: nr = 1 do S ? (D,x)  rbuff[x] = D; recd[x] = true; if x != nr then S !nack(nr, bitmap) [] recd[nr]  deliver(rbuff[nr]); nr++ od

  13. R:: nr = 1 do S ? (D,x)  rbuff[x] = D; recd[x] = true; if x != nr then S !nack(nr, bitmap) [] recd[nr]  deliver(rbuff[nr]); nr++ od

  14. Receiver timeout • R:: nr = 1 do S ? (D,x)  rbuff[x] = D; recd[x] = true; [] timeout  S !nack(nr, bitmap) [] recd[nr]  deliver(rbuff[nr]); nr++ od

  15. Receiver based Windows • S:: ns = 1; na = 1 do : : [] R ? Ack(s,x)  W = x; if s > na then na = s od

  16. R:: nr = 1 do S ? (D,x)  if nr = x then deliver(D); nr++; compute W; S ! ack(nr, W); od

More Related