11.3. 11.3. Priority Queues

In the following let us consider an systems with priorities. This means that we have two classes of customers. Each type of requests arrive according to a Poisson process with parameter , and , respectively and the processes are supposed to be independent of each other. The service times for each class are assumed to be exponentially distributed with parameter .

The system is stable if

where .

Let us assume that class 1 has priority over class 2. This section is devoted to the investigation of preemptive and non-preemptive systems and some mean values are calculated.

Preemptive Priority

According to the discipline the service of a customer belonging to class is never carried out if there is customer belonging to class in the system. In other words it means that class preempts class that is if a class customer is under service when a class request arrives the service stops and the service of class request starts. The interrupted service is continued only if there is no class customer in the system.

Let denote the number of class customers in the system and let stand for the response time of class requests. Our aim is to calculate and for .

Since type always preempts type the service of class customers is independent of the number of class customers. Thus we have

Since for all customers the service time is exponentially distributed with the same parameter, the number of customers does not depends on the order of service. Hence for the total number of customers in an we get m/m/

and then inserting (11.3) we obtain

and using the Little's law we have

Example 11.2. Let us compare what is the difference if preemptive priority discipline is applied instead of FIFO.

Let , and . In FIFO case we get

and in priority case we obtain

Non-preemptive Priority

The only difference between the two disciplines is that in the case the arrival of a class customer does not interrupt the service of type request. That is why sometimes this discipline is call HOL ( Head Of the Line ). Of course after finishing the service of class starts.

By using the law of total expectations the mean response time for class can be obtained as

The last term shows the situation when an arriving class customer find the server busy servicing a class customer. Since the service time is exponentially distributed the residual service time has the same distribution as the original one. Furthermore, because of the Poisson arrivals the distribution at arrival moments is the same as at random moments, that is the probability that the server is busy with class customer is . By using the Little's law

after substitution we get

To get the means for class the same procedure can be performed as in the previous case. That is using (11.4) after substitution we obtain

and then applying the Little's law we have

Example 11.3. Now let us compare the difference between the two priority disciplines.

Let , and , then

Of course knowing the mean response time and mean number of customers in the system the mean waiting time and the mean number of waiting customers can be obtained in the usual way.

  Java applets for direct calculations can be found at 

  http://irh.inf.unideb.hu/user/jsztrik/education/03/EN/MMcPrio/MMcPrio.html