STOP AND WAIT ARQ<br />STOP<br />WAIT<br />AND<br />
Team members<br />DNAA<br />Krazzy4<br />Nishita<br />Ananya<br />Archana<br />Dhanusha<br /><ul><li>   Royston
Aayush
Himanshu</li></ul>Awesum4sum<br /><ul><li>Vinayak</li></ul>Lisha<br />Anita<br />Prabha<br />Caroline<br />
Noiseless and Noisy Channels<br />
Noisy Channel         – Error free channels<br />Noiseless Channel   – Error creating channels<br />PROTOCOLS<br />FOR NOI...
STOP AND WAIT<br />
Automatic Repeat reQuest<br /><ul><li> Is an error-control method for data transmission
 uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.</li></li></ul><li>ST...
Frames<br />Packet<br />Error Free Packet<br />Information Frame<br />Transmitter<br />Receiver <br />Control Frame<br />T...
Information Frame<br />header<br />Information Packet<br />CRC<br />Header<br />CRC<br />Acknowledgement Frame<br />
Need for<br /> Sequence number<br />
(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...
Sequence Numbers<br />Time-out<br />Time<br />A<br />Frame<br />   0<br />Frame<br />   2<br /> Frame <br />     0<br />Fr...
Sender-site algorithm for stop and wait ARQ<br />Sn=0;<br />Cansend=true;<br />While(true)<br />{<br />	Waitforevent()<br ...
Contd<br />Waitforevent();<br />	if(event(arrivalnotification)<br />	{<br />Receiveframe(ackno);<br />		If(ackno==Sn)<br /...
Receiver-site algorithm for Stop and Wait ARQ<br />Rn = 0;<br />While (true)<br />{<br />WaitForEvent ( );<br />	If (Event...
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 />Time...
Advantages and disadvantages of Stop and Wait ARQ<br />
Advantages of Stop and Wait ARQ over simple Stop and Wait protocol<br />It can be used for noisy channels<br />It has both...
Disadvantages of Stop and Wait ARQ<br /><ul><li>  Efficiency is very less.
Upcoming SlideShare
Loading in …5
×

Stop And Wait ARQ

32,565 views

Published on

Published in: Technology, Business
  • Be the first to comment

Stop And Wait ARQ

  1. 1. STOP AND WAIT ARQ<br />STOP<br />WAIT<br />AND<br />
  2. 2. Team members<br />DNAA<br />Krazzy4<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. Noisy Channel – Error free channels<br />Noiseless Channel – Error creating channels<br />PROTOCOLS<br />FOR NOISY CHANNELS<br />FOR NOISELESS CHANNELS<br />SIMPLEST<br />STOP AND WAIT ARQ<br />STOP AND WAIT<br />GO BACK N ARQ<br />SELECTIVE REPEAT ARQ<br />
  7. 7. STOP AND WAIT<br />
  8. 8. Automatic Repeat reQuest<br /><ul><li> Is an error-control method for data transmission
  9. 9. uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.</li></li></ul><li>STOP AND WAIT ARQ<br />
  10. 10. 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 />
  11. 11. Information Frame<br />header<br />Information Packet<br />CRC<br />Header<br />CRC<br />Acknowledgement Frame<br />
  12. 12. Need for<br /> Sequence number<br />
  13. 13.
  14. 14. (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 />
  15. 15. 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 />
  16. 16. 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 />
  17. 17. 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 />
  18. 18. 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 />
  19. 19. 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 />
  20. 20. Advantages and disadvantages of Stop and Wait ARQ<br />
  21. 21. 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 />
  22. 22. Disadvantages of Stop and Wait ARQ<br /><ul><li> Efficiency is very less.
  23. 23. Only 1 frame is sent at a time.
  24. 24. Timer should be set for each individual </li></ul> frame.<br /><ul><li> No pipelining.
  25. 25. 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 />
  26. 26. 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 />
  27. 27. THANK YOU <br />

×