Stop And Wait

9,169 views

Published on

Published in: Education, Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
9,169
On SlideShare
0
From Embeds
0
Number of Embeds
31
Actions
Shares
0
Downloads
172
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Stop And Wait

  1. 1. STOP AND WAIT ARQ<br />STOP<br />WAIT<br />AND<br />
  2. 2. Team members<br />DNAA<br />abc<br />Nishita<br />Ananya<br />Archana<br />Dhanusha<br /><ul><li> Royston
  3. 3. Aayush
  4. 4. Himanshu</li></ul>Awesum4sum<br /><ul><li>Vinayak</li></ul>Lisha<br />Anita<br />Prabha<br />Caroline<br />
  5. 5. Noiseless and Noisy Channels<br />
  6. 6. STOP AND WAIT<br />
  7. 7. Automatic Repeat reQuest<br /><ul><li> Is an error-control method for data transmission
  8. 8. uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.</li></li></ul><li>STOP AND WAIT ARQ<br />
  9. 9. Frames<br />Packet<br />Error Free Packet<br />Information Frame<br />Transmitter<br />Receiver <br />Control Frame<br />Timer is set after each frame transmission<br />
  10. 10. Information Frame<br />header<br />Information Packet<br />CRC<br />Header<br />CRC<br />Acknowledgement Frame<br />
  11. 11. Sender-site algorithm for stop and wait ARQ<br />Sn=0;<br />Cansend=true;<br />While(true)<br />{<br /> Waitforevent()<br /> If(event(requesttosend)AND cansend)<br /> {<br />Getdata();<br />Makeframe(Sn);<br />Storeframe(Sn)<br />Sendframe(Sn);<br />Starttimer()<br />Cansend=false<br /> }<br />
  12. 12. Contd<br />Waitforevent();<br /> if(event(arrivalnotification)<br /> {<br />Receiveframe(ackno);<br /> If(ackno==Sn)<br /> {<br />Stoptimer();<br /> Purge(Sn-1);<br />Cansend=true;<br /> }<br /> } <br /> If(event(timeout))<br /> {<br />Starttimer();<br />Resendframe(Sn-1);<br /> }<br />}<br />
  13. 13. Receiver-site algorithm for Stop and Wait ARQ<br />Rn = 0;<br />While (true)<br />{<br />WaitForEvent ( );<br /> If (Event (ArrivalNotification) )<br /> {<br />ReceiveFrame ( );<br /> If (corrupted (frame) );<br /> sleep ( );<br /> {<br />ExtractData ( );<br />DelieverData ( );<br />Rn = Rn + 1;<br /> }<br />SendFrame (Rn);<br /> }<br />}<br />
  14. 14. 0 1<br />0 1<br />0 1<br />0 1<br />0 1<br />0 1<br />0 1<br />0 1<br />Rnext<br />Slast<br />Timer<br />Slast<br />Receiver B<br />Transmitter A<br />Rnext<br />1-Bit Sequence Numbering Suffices <br />Global State:<br />(Slast, Rnext)<br />Error-free frame 0<br />arrives at receiver<br />(0,0)<br />(0,1)<br />ACK for<br />frame 0<br />arrives at<br />transmitter<br />ACK for<br />frame 1<br />arrives at<br />transmitter<br />Error-free frame 1<br />arrives at receiver<br />(1,0)<br />(1,1)<br />
  15. 15.
  16. 16. (a) Frame 1 lost<br />Time-out<br />Time<br /> A<br />Frame<br /> 1<br />Frame<br /> 1<br />Frame<br /> 2<br />Frame <br /> 0<br />ACK<br />ACK<br /> B<br />(b) ACK lost<br />Time-out<br />Time<br />A<br />Frame <br /> 0<br />Frame<br /> 1<br />Frame<br /> 1<br />Frame<br /> 2<br />ACK<br />ACK<br />ACK<br />B<br />Need for Sequence Numbers<br />
  17. 17. Sequence Numbers<br />Time-out<br />Time<br />A<br />Frame<br /> 0<br />Frame<br /> 2<br /> Frame <br /> 0<br />Frame<br />1<br />ACK<br />ACK<br />B<br />(c) Premature Time-out<br />
  18. 18. Advantages and disadvantages of Stop and Wait ARQ<br />
  19. 19. Advantages of Stop and Wait ARQ over simple Stop and Wait protocol<br />It can be used for noisy channels<br />It has both error and flow control mechanism<br />It has a timer implementation<br />
  20. 20. Disadvantages of Stop and Wait ARQ<br /><ul><li> Efficiency is very less.
  21. 21. Only 1 frame is sent at a time.
  22. 22. Timer should be set for each individual </li></ul> frame.<br /><ul><li> No pipelining.
  23. 23. Sender window size is 1 ( disadvantage </li></ul> over go back n ARQ).<br /><ul><li> Receiver window size is 1 ( disadvantage </li></ul> over selective repeat ARQ).<br />
  24. 24. Applications<br />IBM Binary Synchronous Communication Protocol (Bisync): Character-oriented data link control.<br />Xmodem: Modem file transfer protocol.<br />Trivial file transfer protocol (RFC 1350):<br /> simple protocol for file transfer over UDP.<br />
  25. 25. THANK YOU <br />

×