Elementary Data Link Protocols-A simplex stop-and-wait protocol
A simplex stop-and-wait protocolIn this protocol we assume that Data are transmitted in one direction only No errors occur (perfect channel)
The receiver can only process the received information at a finite rate These assumptions imply that the transmitter cannot send frames at a rate faster than the receiver can process them. The problem here is how to prevent the sender from flooding the receiver. A general solution to this problem is to have the receiver provide some sort of feedback to the sender. The process could be as follows: The receiver send an acknowledge frame back to the sender telling the sender that the last received frame has been processed and passed to the host; permission to send the next frame is granted. The sender, after having sent a frame, must wait for the acknowledge frame from the receiver before sending another frame. This protocol is known as stop-and-wait.
The protocol is as follows:
/* protocol */
Sender()
{
forever
{
from_host(buffer);
S.info = buffer;
sendf(S);
wait(event);
}
}
Receiver()
{
forever
{
wait(event);
getf(R);
to_host(R.info);
sendf(S);
}
}