# Multiplexer

## Protocol Description

MUX (Multiplexer) illustrates how data can be multiplexed among multiple sources and sinks via a shared communications channel. Each source independently sends data indexed by its number to the corresponding sink with the same number. At the source end, a multiplexer combines data from the sources and sends it over a shared channel. At the sink end, a demultiplexer splits the incoming channel data and sends it to the corresponding sinks.

For this simulation, the communications channel is assumed to operate perfectly (no message corruption, loss or misordering). When the multiplexer sends a message, it therefore arrives directlyat the demultiplexer. It follows that acknowledgements, sequence number and timeouts are not applicable.

The multiplexer and demultiplexer exchange messages in a format that depends on the kind of multiplexing:

- For synchronous multiplexing, the multiplexer periodically sends all available data in a format such as DT(D8,D4,...); this means that source 0 is sending data D8, source 1 is sending data D4, etc. If a source has not supplied data before the multiplexer has sent a message, this is shown as '-' (e.g. DT(-,D4) for data from source 1 only).

- For asynchronous multiplexing, the multiplexer sends individual source data as it arrives in a format such as DT(2,D6); this means that source 2 is sending data D6.

Perfect multiplexing would always operate faster than sources supply data and sinks consume it. As an option, the simulation can allow multiplexing to be slower than this. The result is that new data can overwrite data that has been previously stored but not yet delivered.

## Protocol Parameters

By default, multiplexing uses 2 sources/sinks, is synchronous, and does not overwrite previous data. You can modify the way in which the protocol works by modifying these settings (e.g. 1 to 5 sources/sinks). Click Change Settings after making these alterations. This will restart the whole simulation.

Number of Sources/Sinks: |  | Asynchronous Multiplexing: |  | Data Overwriting: |

## Protocol Simulation

The protocol simulation shows a time-sequence diagram with sources on one side and sinks on the other, the multiplexer and demultiplexer that support them, and a communications channel that carries messages. Sources request data transmission with DATA(Source,Dn); the same messages arrive at sinks. Sources/sinks are numbered 0, 1, etc. Data messages are numbered D0, D1, etc.; no explicit data content is given. The source/sink number and data number are usually different (e.g. source 1 might sent data D7).

Up one level to Protocol Simulators