Kabitaatechpresentation 13102819609946 Phpapp02 110710021641 Phpapp02
stopandwait-091118052946-phpapp02
-
Upload
atul-kumar -
Category
Documents
-
view
119 -
download
0
Transcript of stopandwait-091118052946-phpapp02
STOP AND WAIT ARQ
STOP
AND
WAIT
Team members
DNAA
• Nishita• Ananya• Archana• Dhanusha Awesum4sum
• Lisha• Anita• Prabha• Caroline
Krazzy4
• Royston• Aayush• Himanshu• Vinayak
Noiseless and
Noisy Channels
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
STOP AND WAIT
Automatic Repeat reQuest
• Is an error-control method for data transmission
• uses acknowledgements and timeouts to achieve reliable data transmission over an unreliable service.
STOP AND WAIT ARQ
FramesPacket Error Free Packet
Transmitter Receiver
Information Frame
Control Frame
Timer is set after each frame transmission
Information Frame
Acknowledgement Frame
header Information Packet CRC
Header CRC
Need for Sequence
number
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
Sequence Numbers(c) Premature Time-out
A
B
Frame 0
Frame 0
ACK
Frame1
ACK
Time
Time-out
Frame 2
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
}
ContdWaitforevent();if(event(arrivalnotification){
Receiveframe(ackno);If(ackno==Sn){Stoptimer();Purge(Sn-1);Cansend=true;}
}If(event(timeout)){
Starttimer();Resendframe(Sn-1);
}}
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);
}}
(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
Advantages and disadvantages
of Stop and Wait ARQ
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
• 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
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.
THANK YOU