Background behind the Simulation Applet

Table of Contents

Priorities and queues

We are talking about packet switching networks. Packets are sequences of bits, usually organized in bytes. Sometimes packets have a fixed size, for example in ATM, where packets are called cells and always have 53 bytes. But Ethernet has a varying packet size, with a maximum of 1518 bytes. Packets always have two parts: Header and payload. The header has information like source, destination, size and type of packets. To interpret the payload there can be a field in the header that tells you how to interpret the payload.
Networks are systems that can transport information (bits) from A to B. And also to C or D. Packet switching networks transport information piece by piece, putting every piece in a packet.

The Internet (probably the best known packet switched network) consists of routers and switches. In very simple terms, we can view these as things that accept packets at one side, and spew them out at the other side, after some time. This time is known as delay, and can vary from switch to switch, from time to time. The exact delay depends on the size of the packet, the number of packets arriving at the switch per second and the switch itself.
Sometimes packets arrive at a switch faster then they can be serviced. In that case the packets are buffered in the switch' memory to be serviced later. Because there is limited memory in the switch/router, not all packets can always be buffered. Thus, sometimes a packet is dropped.
When we ignore the fact that a router or switch usually has multiple incoming and outgoing ports (cables), we get a simpler system with just one input, and one output. Packets arrive at irregular times at the input port, and they are send out the output as quickly as possible.
The system described above is known as a simple single server queuing system. Queuing theory allows us to analyze it when the arrival process is a Poisson process. However, measurements have shown that this is not always true. The Pareto distribution gives a better approximation of the reality. However, an analytical analysis based on this distribution is not possible. Secondly, when admitting priorities, the analytical approach becomes even more complex, especially when multiple priorities are used, different packet sizes etc.

Priorities can be used to differentiate in the service a packet receives. More specific: packets with a higher priority can receive better service. We can view priorities in two different ways:

These divisions are orthogonal and can be combined: A packet can a have a high absolute service priority and a low relative storage priority.
Absolute priority means that a packet receives service or storage before all others whatever happens. So, absolute service priority means that a packet will be serviced as soon as possible, independent of the number of packets that are also waiting, and independent of the time they are already waiting.
When the service priority is relative it will depend on (one or more) of these factors. For example, a packet will only be serviced immediately if it has been waiting for more than e.g. 100 milliseconds.

Service priority means that a packet can receive service before others receive service, thus suffering a lower delay.
Storage priority means that a packet will be stored before others. Since it is useless to leave buffer space unused, this usually means that packet with a lower storage priority can be dropped in favor of a packet with a higher storage priority. Thus, a high storage priority can give a lower loss probability.
It is possible for a packet to have a high storage priority with a low service priority (or vice-versa). An example could be background file transfer. Since the file transfer will take a lot of time anyway, delay isn’t very important. But as the file would become useless when bytes are missing loss would be much worse
To keep things complicated, the numerical codes used to indicate priority are usually assigned in a way that means lower is better. A priority code of 0 (zero) usually indicates the best possible priority.

Back to top


Simulating priorities

An simulation program can be used to see what happens when different traffic streams, each consisting of packets with their own characteristics is fed to a queue that can give packets from certain flows a priority.
Two priorities are possible:

It is obvious, that when a certain stream of packets has a priority over other packets that the Quality of Service (QoS) received by that stream is better. The QoS is defined by two parameters: The loss and the delay. Loss means that a packet is dropped. It disappears and will never arrive. Delay is the time between the original transmission and the final arrival. Of course, we do not know the exact network topology between two points, so we will only calculate the delay at one queue.

When a packet has storage priority, one can expect its loss rate to drop. And when a packet has service priority the delay will probably decrease. But there is more: When a packet has storage priority, but no service priority, a lot of packets can accumulate in the buffer. Large amounts of packets in a buffer mean that the buffer will quickly overflow causing packet loss.
On the other hand, a high service priority will cause the number of packets of that type waiting in the buffer to be low. When there are little or no packets of a certain type in the buffer, the probability of a packet getting lost will be low.
These effects can cause strange or unexpected behavior in a queuing system. The best way to find them is to simulate the behavior of the queue so its response and the QoS received by traffic passing the queue becomes clear.

The next part of these web pages explains the method used to simulate a queue, and some results. If you want to start simulating right away, click this link to go to the applet

Back to top


Quick jumps


Back to top



Copyright © 2000 Philips Business Communications, Hilversum, The Netherlands.
See legal statement for details