Selected Examples |
Many types of models require that multiple classes of
transactions be served by a single server.
For example, two different types of customers
arrive at an auto repair shop.
One type needs only minor repairs, and the other type needs
more major work.
If one class has priority on getting service, then
a priority queue is the appropriate modeling choice.
Figure 10.5 shows one such model having two classes.
Figure 10.5: A Priority Queue Example with Two Transaction Classes
The two classes of transactions arrive according to independent
Poisson processes as represented by the two Samplers.
Transactions travel to Modifiers
that set the priority to be either a 1 or a 2.
They then enter a Priority Queue with the priority
level determining their position in the queue; the higher
priority transactions are serviced before the lower priority
transactions.
When the transactions finish service, they enter a
Switch
that directs them to one of two Buckets as a function
of priority class.
The model in Figure 10.5 assumes that if a Class 1
transaction is in service when a Class 2 transaction arrives,
the Class 1 transaction completes service before the
Class 2 transaction starts service ahead of any other
Class 1 transactions in the queue.
Figure 10.6 shows how you would modify the model if you
wanted to preempt a Class 1 transaction that was in service
when a Class 2 transaction arrived.
Figure 10.6: A Priority Queue Example with Two Transaction Classes and Preemption
For this preemption, you would store the class of the transaction
currently in service in a number holder.
This storage is done by the trigger just below the number holder.
Then, when a Class 2 transaction arrives, it causes a check
of the class of the transaction in service.
If it is Class 1, then it is preempted.
Notice that any preempted Class 1 transactions are routed
back into the queue.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.