Stop & Wait by CC3

Tuesday, September 22, 2009

STOP AND WAIT

Design and Implementation

Assumption: Error free communication channel

The sender in this protocol simply retrieves a packet from the network layer, copies it into a frame, and then transmits it. After transmission, the sender busy waits until an acknowledgement is received from the receiver, then the loop starts over again.

The receiver simply busy waits until a frame is received. Once a frame is received it passes the data packet to the network layer and sends an acknowledgement for the frame it just received. It then loops back to busy waiting and the process continues until the End of File is reached.

In this protocol, there can only be one outstanding frame at a time so no sequence numbers are required and the acknowledgement the receiver sends back to the sender is nothing more than an empty frame, as there is no other possibility then acknowledging the only frame sent. Another frame will not be sent until this acknowledgement is received.

Performance

The Stop and Wait protocol was very easy to implement and runs very quickly and efficiently. It solves the problem of congestion, as only one frame is outstanding at any time, frames cannot be lost due to congestion and the receiver will not be swamped by the sender.

Point of failure

The problem with it is that it assumes an error free communication channel and in the real world, such a channel does not exist. It is easy to see that if a frame or an acknowledgement gets lost or damaged, a deadlock situation will occur where neither the sender or receiver can advance, and they will be thrown into infinite loops.

Arpith Uttarkar

0 comments:

Post a Comment