STOP AND WAIT ARQSTOPWAITAND
Team membersDNAAabcNishitaAnanyaArchanaDhanusha   Royston
Aayush
HimanshuAwesum4sumVinayakLishaAnitaPrabhaCaroline
Noiseless and Noisy 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
FramesPacketError Free PacketInformation FrameTransmitterReceiver Control FrameTimer is set after each frame transmission
Information FrameheaderInformation PacketCRCHeaderCRCAcknowledgement Frame
Sender-site algorithm for stop and wait ARQSn=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 ARQRn = 0;While (true){WaitForEvent ( );	If (Event (ArrivalNotification) )	{ReceiveFrame ( );		If (corrupted (frame) );		sleep  ( );		{ExtractData ( );DelieverData ( );Rn = Rn + 1;		}SendFrame (Rn);	}}
0    10    10    10    10    10    10    10    1RnextSlastTimerSlastReceiver BTransmitter ARnext1-Bit Sequence Numbering Suffices Global State:(Slast, Rnext)Error-free frame 0arrives at receiver(0,0)(0,1)ACK forframe 0arrives attransmitterACK forframe 1arrives attransmitterError-free frame 1arrives at receiver(1,0)(1,1)
(a)  Frame 1 lostTime-outTime AFrame   1Frame   1Frame  2Frame    0ACKACK B(b)  ACK lostTime-outTimeAFrame     0Frame    1Frame     1Frame   2ACKACKACKBNeed for Sequence Numbers
Sequence NumbersTime-outTimeAFrame   0Frame   2 Frame      0Frame1ACKACKB(c)  Premature Time-out
Advantages and disadvantages of Stop and Wait ARQ
Advantages of Stop and Wait ARQ over simple Stop and Wait protocolIt can be used for noisy channelsIt has both error and flow control mechanismIt has a timer implementation
Disadvantages of Stop and Wait ARQ  Efficiency is very less.

Stop And Wait