Next: An M/M/1 Queue
Up: Queuing events
Previous: Queuing events
In systems where customers
arrive and depart, after being served we need at least three events
(or an entity for both the customer and server). These types are in
fact general for every queuing application. The difference then comes
from the arrival and service pattern, from the service policy, from
the resource amount and from the queuing priority of every event.
These can be modeled as follows :
- arrival and service pattern - In the arrival event a
next arrival is scheduled after the appropriate time. The service event
schedules a departure event after the service time.
- service policy - When an arrival occurs it is served according
to the service policy. The most common ones are the LIFO (last in first
out) and FIFO (first in first out) queues. The first one can be modeled
by adding an arrival to the front of the queue with the queue::prepend method,
the last one is modeled by adding the arrival event to the back with
the queue::append method. In both cases we then take the front of
the queue with the queue::removefront method. Additional service
policies can easily be modeled as variations of the ones above.
- resource amount - The number of arrivals that can be served
depends on the resource amount. When a resource is created it receives
its initial amount. This amount is then increased and decreased every time
a certain amount is released or acquired, with the resource::release
and resource::acquire methods. A resource can be released in the
departure event (after being served) and can be acquired in the
service event if the asked amount is available, which can be checked
with the resource::available method.
- queuing priority - A priority queue can be modeled by giving
a queuing priority to an event, when created. When appended or prepended
an event that has a higher priority goes in front of an event with a
lower priority.
Next: An M/M/1 Queue
Up: Queuing events
Previous: Queuing events
A Eliens
Tue Oct 31 09:27:21 MET 1995