stop and wait arq

22
STOP AND WAIT ARQ STOP AND WAIT

Upload: anitha-selvan

Post on 03-Nov-2014

42 views

Category:

Technology


6 download

Tags:

DESCRIPTION

 

TRANSCRIPT

Page 1: Stop And Wait ARQ

STOP AND WAIT ARQ

STOP

AND

WAIT

Page 2: Stop And Wait ARQ

Team members

DNAA

• Nishita• Ananya• Archana• Dhanusha Awesum4sum

• Lisha• Anita• Prabha• Caroline

Krazzy4

• Royston• Aayush• Himanshu• Vinayak

Page 3: Stop And Wait ARQ

Noiseless and

Noisy Channels

Page 4: Stop And Wait ARQ

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

STOP AND WAIT

Page 6: Stop And Wait ARQ

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

STOP AND WAIT ARQ

Page 8: Stop And Wait ARQ

FramesPacket Error Free Packet

Transmitter Receiver

Information Frame

Control Frame

Timer is set after each frame transmission

Page 9: Stop And Wait ARQ

Information Frame

Acknowledgement Frame

header Information Packet CRC

Header CRC

Page 10: Stop And Wait ARQ

Need for Sequence

number

Page 11: Stop And Wait ARQ
Page 12: Stop And Wait ARQ

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

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

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

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

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

(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

Advantages and disadvantages

of Stop and Wait ARQ

Page 19: 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

Page 20: Stop And Wait ARQ

• 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

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

THANK YOU