Sliding Window Protocol Simulator
(3-Column)

Simulator Logo

Protocol Description

SWP (Sliding Window Protocol) a connection-less protocol. It allows data to be sent in one direction between a pair of protocol entities, subject to a maximum number of unacknowledged messages. If SWP is operated with a window size of 1, it is equivalent to the Alternating Bit Protocol. The simulation below does not include the users; see the five-column version for this.

The protocol has a maximum number of messages that can be sent without acknowledgement. If this window becomes full, the protocol is blocked until an acknowledgement is received for the earliest outstanding message. At this point the transmitter is clear to send more messages.

Protocol Parameters

The following settings are adequate for a simple simulation. For a more advanced exploration, choose different options and click Change Settings. This may cause the simulation to restart.

Optionally set the level of control that the simulator user needs over the medium:

Automatic:
Messages are delivered immediately without loss. This is suitable for initial experimentation, but limits what can be explored. For example, message are never lost and never have to be timed out and resent.
Delivery:
Alternatively, message delivery may be controlled - though messages will still never be lost. Choose this option to allow messages to be delivered in different orders and to be resent.
Delivery/Loss:
Finally, delivery and loss of messages may be completely controlled. This is the most comprehensive option, but also the most complex one to manage.

Optionally set the maximum sequence number used by the protocol: this is one less than the modulus. Sequence numbers wrap round to zero when they pass the maximum. Optionally set the maximum window size permitted: this must not exceed the maximum sequence number. Changing either of these parameters will restart the simulation.

Medium Control: Automatic Delivery Delivery/Loss
Maximum Sequence Number (1 to 31):
Window Size (1 to Maximum Sequence Number):

Protocol Simulation

The protocol simulation shows a time-sequence diagram with transmitting and receiving protocol entities, and a communications medium that carries messages. The transmitter simply sends messages numbered DT(0), DT(1), etc. Once sequence numbers reach a maximum number (like 7), they wrap back round to 0. The content of messages is not explicitly identified. An acknowledgement AK(n) means that the DT message numbered n is the next one expected (i.e. all messages up to but not including this number have been received). Since sequence numbers wrap round, an acknowledgement with sequence number 1 refers to messages 0, 1, 7, 6, etc. Note that if a DT message is received again due to re-transmission, it is acknowledged but discarded.


Up Arrow Up one level to Protocol Simulators

Web Ken Turner Home   Email    Search Search Web Pages

Last Update: 11th February 2011
URL: https://www.cs.stir.ac.uk/~kjt/software/comms/jasper/SWP3.html