Switching is the actual mechanism by which a message is removed from the input buffer and placed in the output buffer. The switching technique applied has an over-whelming effect on message latency and hence the choice of switching method is crucial in designing any distributed memory computer. The design space of the switching technique is shown in the figure.
In the first-generation multicomputer, the packet switching mechanism was borrowed from the world of computer networks. The packet switching mechanism behaves in a store and forward manner similar to the mail service. A message is divided into packets which are sent independently via the communication network between the source and the destination nodes.
Circuit switching methods behave analogously to telephone systems where a path between the source and destination is initially built up and the circuit is held until the entire message is transmitted. The circuit switching mechanism is realized in three phases −
In the first phase, the communication circuit is built up by sending a special short message called the probe through the network. The probe plays a similar role to the packet header in packet switching schemes. When the communication circuit is established, the second phase can be started in which the actual message is sent via the communication circuit. During this phase, the channels constituting the circuit are reserved exclusively, and no other messages can be transmitted by them.
In the last phase, the circuit is destroyed, either by the tail of the transmitted message or by an acknowledgment message returned by the destination node. If the desired channel is used by another circuit in the circuit establishment phase, the partially built-up circuit may be destroyed.
Virtual cut-through attempts to integrate the advantage of packet switching and circuit switching. The message is divided into small units known as flow control digits or flits. As long as the required channels are free, the message is forwarded between nodes flit by flit in a pipeline fashion.
If a required channel is busy, flits are buffered at intermediate nodes. It is depending on the size of the available buffers, virtual cut-through can behave in different ways. If the buffers are large enough, the entire message is buffered at the blocked intermediate node, resulting in a behavior similar to packet switching. If the buffers are not large enough, the message will be buffered across several nodes, holding the links between them.
Wormhole routing is a special case of virtual cut-through, where the buffers at the intermediate nodes are the size of a flit. The advantage of wormhole routing over circuit switching and virtual cut-through appears in networks where contention is not negligible. In circuit switching, once a channel is assigned to a message, it cannot be used by other messages until the channels become free. In virtual cut-through, blocked messages must be stored in the buffer of intermediate nodes.