stop and wait arq
DESCRIPTION
TRANSCRIPT
![Page 1: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/1.jpg)
STOP AND WAIT ARQ
STOP
AND
WAIT
![Page 2: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/2.jpg)
Team members
DNAA
• Nishita• Ananya• Archana• Dhanusha Awesum4sum
• Lisha• Anita• Prabha• Caroline
Krazzy4
• Royston• Aayush• Himanshu• Vinayak
![Page 3: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/3.jpg)
Noiseless and
Noisy Channels
![Page 4: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/4.jpg)
PROTOCOLSPROTOCOLS
FOR NOISELESS CHANNELS FOR NOISY
CHANNELS
SIMPLEST
STOP AND WAIT
STOP AND WAIT ARQ
GO BACK N ARQ
SELECTIVE REPEAT ARQ
Noisy Channel – Error free channelsNoiseless Channel – Error creating channels
![Page 5: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/5.jpg)
STOP AND WAIT
![Page 6: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/6.jpg)
Automatic Repeat reQuest
• Is an error-control method for data transmission
• uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.
![Page 7: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/7.jpg)
STOP AND WAIT ARQ
![Page 8: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/8.jpg)
FramesPacket Error Free Packet
Transmitter Receiver
Information Frame
Control Frame
Timer is set after each frame transmission
![Page 9: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/9.jpg)
Information Frame
Acknowledgement Frame
header Information Packet CRC
Header CRC
![Page 10: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/10.jpg)
Need for Sequence
number
![Page 11: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/11.jpg)
![Page 12: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/12.jpg)
Need for Sequence Numbers(a) Frame 1 lost
A
B
Frame 0
Frame 1
ACK
Frame 1
ACK
TimeTime-out
Frame 2
(b) ACK lost
A
B
Frame 0
Frame 1
ACK
Frame 1
ACK
TimeTime-out
Frame 2
ACK
![Page 13: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/13.jpg)
Sequence Numbers(c) Premature Time-out
A
B
Frame 0
Frame 0
ACK
Frame1
ACK
Time
Time-out
Frame 2
![Page 14: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/14.jpg)
Sender-site algorithm for stop and wait ARQ
Sn=0;Cansend=true;While(true){
Waitforevent()If(event(requesttosend)AND cansend){
Getdata();Makeframe(Sn);Storeframe(Sn)Sendframe(Sn);Starttimer()Cansend=false
}
![Page 15: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/15.jpg)
ContdWaitforevent();if(event(arrivalnotification){
Receiveframe(ackno);If(ackno==Sn){Stoptimer();Purge(Sn-1);Cansend=true;}
}If(event(timeout)){
Starttimer();Resendframe(Sn-1);
}}
![Page 16: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/16.jpg)
Receiver-site algorithm for Stop and Wait ARQ
Rn = 0;While (true){
WaitForEvent ( );If (Event (ArrivalNotification) ){
ReceiveFrame ( );If (corrupted (frame) );sleep ( );{ExtractData ( );DelieverData ( );Rn = Rn + 1;}SendFrame (Rn);
}}
![Page 17: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/17.jpg)
(0,0) (0,1)
(1,0) (1,1)
Global State:(Slast, Rnext)
Error-free frame 0arrives at receiver
ACK forframe 0arrives attransmitter
ACK forframe 1arrives attransmitter Error-free frame 1
arrives at receiver
Transmitter A Receiver B
SlastRnext
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Timer
Rnext
Slast
1-Bit Sequence Numbering Suffices
![Page 18: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/18.jpg)
Advantages and disadvantages
of Stop and Wait ARQ
![Page 19: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/19.jpg)
Advantages of Stop and Wait ARQ over simple Stop and Wait protocol
1. It can be used for noisy channels2. It has both error and flow control
mechanism3. It has a timer implementation
![Page 20: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/20.jpg)
• Efficiency is very less.• Only 1 frame is sent at a time.• Timer should be set for each individual frame.• No pipelining. • Sender window size is 1 ( disadvantage over go back n ARQ).• Receiver window size is 1 ( disadvantage over selective repeat ARQ).
Disadvantages of Stop and Wait ARQ
![Page 21: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/21.jpg)
Applications
• IBM Binary Synchronous Communication Protocol (Bisync): Character-oriented data link control.
• Xmodem: Modem file transfer protocol.• Trivial file transfer protocol (RFC 1350):
simple protocol for file transfer over UDP.
![Page 22: Stop And Wait ARQ](https://reader033.vdocuments.us/reader033/viewer/2022061112/54573f4baf7959c6788b9480/html5/thumbnails/22.jpg)
THANK YOU