Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with...

67
Preemptive-resume priority queueing Wieger Hinderks, 10157417 July 12, 2014 Bachelor Thesis Supervisor: prof. dr. R. N´ nez-Queija Second grader: dr. T.M. Nieuwenhuizen Korteweg-de Vries Institute for Mathematics Faculty of Natural Sciences, Mathematics, and Informatics University of Amsterdam

Transcript of Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with...

Page 1: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Preemptive-resume priority queueing

Wieger Hinderks, 10157417

July 12, 2014

Bachelor Thesis

Supervisor: prof. dr. R. Nunez-QueijaSecond grader: dr. T.M. Nieuwenhuizen

Korteweg-de Vries Institute for Mathematics

Faculty of Natural Sciences, Mathematics, and Informatics

University of Amsterdam

Page 2: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Abstract

The main goal of this thesis is to establish a mathematical analysis of a priority queueingmodel with the preemptive-resume priority discipline. First, the basics in queueingtheory are recapitulated. Second the theory of queueing systems with interrupted serviceis studied and applied to model a basic priority queueing system: two priority levelsand both priorities have exponentially distributed service times. The mean number ofcustomers and mean sojourn time are computed for both priority levels. Then, thismodel is used to find the behaviour of customers dependent on the system parametersand when priority costs are introduced. A few different customer equilibrium situationsare analysed.

Eventually, the dual priority level model is extended to an arbitrary n ∈ N differentpriority levels, and even to general service distributions. For every single priority levelthe mean number of customers and mean sojourn time are computed in terms of thesystem parameters. Finally, the n-level priority queueing model with general servicetimes will be studied in heavy traffic. The Laplace-Stieltjes transform of the queueingtime will be considered and limiting behaviour of all but the lowest priority classes aretrivial. For the final class, however, the queueing time has an exponential distributionwhen multiplied by the factor 1− ρ, in heavy traffic.

Title: Preemptive-resume priority queueingAuthor: Wieger Hinderks, 10157417, [email protected]: prof. dr. R. Nunez-QueijaSecond grader: dr. T.M. NieuwenhuizenDate: July 12, 2014

Korteweg-de Vries Institute for MathematicsUniversity of AmsterdamScience Park 904, 1098 XH Amsterdamhttp://www.science.uva.nl/math

2

Page 3: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Contents

Introduction 5

1. Introduction to queueing theory 71.1. Basic concepts and Little’s Law . . . . . . . . . . . . . . . . . . . . . . . 81.2. M/G/1 queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.3. Dual service rate single server queue . . . . . . . . . . . . . . . . . . . . 12

2. Queueing processes with interrupted service 152.1. Preemptive-resume interruptions . . . . . . . . . . . . . . . . . . . . . . . 152.2. Dual service rate priority queue . . . . . . . . . . . . . . . . . . . . . . . 18

2.2.1. Equilibrium distribution of the high priority queue . . . . . . . . 192.2.2. Mean values of the low priority queue in equilibrium . . . . . . . 20

3. Customer equilibria in a priority queue 233.1. Introduction to game theory . . . . . . . . . . . . . . . . . . . . . . . . . 233.2. Wardrop equilibria in a priority queueing system . . . . . . . . . . . . . . 26

3.2.1. Customer equilibrium . . . . . . . . . . . . . . . . . . . . . . . . . 263.2.2. System optimum . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.3. Including service costs in a priority queueing system . . . . . . . . . . . . 293.3.1. Setting a price to attain customer equilibrium . . . . . . . . . . . 303.3.2. Customer equilibrium including service costs . . . . . . . . . . . . 30

3.4. Maximum profit in a priority queueing system . . . . . . . . . . . . . . . 30

4. Multiple priority levels 344.1. Mean completion time and busy period . . . . . . . . . . . . . . . . . . . 354.2. Statistical equilibrium condition . . . . . . . . . . . . . . . . . . . . . . . 374.3. Mean performance measures . . . . . . . . . . . . . . . . . . . . . . . . . 384.4. Order of service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414.5. General service times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.5.1. Mean value analysis with identical service times . . . . . . . . . . 434.5.2. Non-identical service times . . . . . . . . . . . . . . . . . . . . . . 44

5. Heavy traffic approximation 485.1. Mean queueing time in heavy traffic . . . . . . . . . . . . . . . . . . . . . 485.2. Laplace-Stieltjes transform of the queueing time . . . . . . . . . . . . . . 495.3. Distribution of the queueing time in heavy traffic . . . . . . . . . . . . . 50

3

Page 4: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Conclusion and review of the process 56

Bibliography 58

A. Popular summary 59

B. Final presentation 62

4

Page 5: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Introduction

When I started following the course Probability – Markov Chains, which was taught byprof. dr. Nunez-Queija at the University of Amsterdam, I was immediately interestedin the subject. As, during the course, we were getting closer to the start of choosing thesubject for our bachelor thesis, I started wondering whether I wanted to do my thesison Markov chains, or perhaps queueing theory. Both dr. Nunez-Queija’s enthusiasm forteaching and the interesting mathematics itself finally made me decide that I should askhim to be the supervisor of my bachelor thesis. The rest is – well, so they say – history.

Markov chains are not just mathematically very interesting, but also have many appli-cations in other sciences, such as physics, chemistry, biology or economics. The Amer-ican scientist Elliott Montroll, for example, had a varied career involving applicationsof Markov chains in several areas. Amongst other things, he studied the Ising model ofa ferromagnet in which he applied Markov chains and contributed to the mathematicalunderstanding of Markov chains, [4].

In this thesis we will analyse the so-called preemptive-resume priority queue. Apreemptive-resume priority queue is a queueing system consisting of two or more dif-ferent queues with different priority levels – meaning that customers arrive and join aqueue of a certain priority. However, there only is one service agent available, whichwill always serve the customers of the higher priority before those of lesser priority. Theadjective preemptive means that at the moment of arrival of a customer the service ofany customer with lower priority is interrupted. When those higher priority customershave left, the interrupted service may be resumed from where it left off at the beginningof the interruption – that is what the adjective resume means in the name of this prioritydiscipline.

The first chapter is (a recapitulation of) an introduction to queueing theory, in whichwe will pay special attention to the M/G/1 queue – a queueing system that will be ofutmost importance throughout the remainder of this thesis. We end the first chapter bydetailing an example of a M/G/1 queue by explicitly finding its probability generatingfunction, that is finding its distribution.

In the second chapter, we will focus on interrupted service, from which we can startthinking of letting service be interrupted by another queue and therefore creating apriority queueing model. After studying the theory of interrupted service, we will applyit to create a priority queueing model consisting of two priority levels which both haveexponential service time distributions.

Chapter three is the odd one out, as we will leave queueing theory for a while andfocus on how customers should divide themselves over the two priority levels of the modeldiscussed in the previous chapter in order to attain certain equilibrium situations. Weneed some game theory in this chapter and the necessary ideas will be discussed.

5

Page 6: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

The fourth chapter is on queueing theory again and we will extend the two-levelpriority queueing model to a priority queueing system with arbitrarily many prioritylevels. We will examine what conditions will guarantee stability. We will also extendthe model to not just allow exponentially but even generally distributed service times.

In the final chapter we will discuss the heavy traffic approximation for an n-levelpreemptive-resume priority queueing system with generally distributed service times.In heavy traffic the workload on the system is near its critical value. It is common toinvestigate the effects on the distribution of the queueing time when we assume that theworkload tends to its maximum. We are inspired to look at the priority queueing modelin heavy traffic by John Kingman’s paper of 1962, [3], that stated that the distribution ofthe queueing time for any general queue always converges to an exponential distributionwhen scaled by the queue length.

The goal of this thesis is to become familiar with common techniques used in queueingtheory and to examine the preemptive-resume priority queueing model as precise aspossible in the given time frame.

6

Page 7: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

1. Introduction to queueing theory

Queueing theory is the mathematical theory that investigates queueing processes as astochastic system. In short, it is the study of queues, or waiting lines. Queueing theoryaims to find useful information of a queueing system. Examples of such information arethe mean sojourn time or the mean number of customers in the system.

A general way of studying a queueing process is by looking for a mathematical systemthat we actually do know very well, such as a Markov process. Sometimes it is neededto view the queue in a particular way, for example by only looking at the process attimes when a customer leaves the system.

Finding the useful information is not always easy, because a queue is implicitly definedby five (usually assumed independent) properties. These properties only give secondaryinformation on the queueing process as they describe the behaviour of customers andthe service agents in the system, but not the distribution of the number of customer inthe system as a whole. We define a queue using the following input, [2],

1. the arrival pattern of customers,

2. the service pattern of server agents,

3. the queue discipline,

4. the system capacity,

5. the number of service channels,

With the arrival pattern of customers we mean the way customers arrive to the system.Throughout this thesis, we assume customers arrive according to a Poisson process withgiven parameter, say λ. Poisson arrivals simulate randomness quite well, but a poissonstream is not always the logic choice for the arrival process – for example, a processingunit in a computer needs to do more work when someone is playing a game than whennobody is using the computer.

By the service pattern we mean how service is handled. Service can be offered tosingle customers or to customers in batches. The service time can be determined orhave a probability distribution. In this thesis we use exponentially distributed servicetimes but also general service times, that is, we only assume that the service time hassome known cumulative distribution function.

The queue discipline is the order in which customers are selected, for example firstcome first serve (FCFS). The system capacity is the number of customers that are ableto wait in the queue, one can imagine that the waiting room is not infinitely large andthat there actually is a physical boundary on the number of customers that can enterthe system. The number of service channels is, as the name suggests, the number ofserver agents that are able to help customers.

7

Page 8: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

A notation has been introduced by David Kendall to avoid needing to describe all fiveproperties in words every time [2]. A queueing process is described by a series of lettersdivided by slashes: A/B/X/Y/Z. The symbols A and B indicate the interarrival time andthe service time distribution respectively. The letters X and Y stand for the number ofservice channels and the system capacity respectively, and the queue discipline is givenby the letter Z. An example of a standard queueing system is the M/M/1/∞/FCFSqueue, which is treated in many of the introductory books on queueing theory.

1.1. Basic concepts and Little’s Law

We denote the number of customers in the system, that is in the queue and in service,at a time t by X(t). When we speak of the actual queue, we usually mean X(t). Whenthe limiting distribution πn = limt→∞P(X(t) = n |X(0) = i) exists for all i and isindependent of i, we say that the queue reaches a statistical equilibrium distribution.This is also called the steady state distribution or the limiting distribution. Because inequilibrium the probabilities of the system having n customers are independent of time,we can also denote the queue in equilibrium by X.

Definition 1.1. The mean expected number of customers L in a system that is instatistical equilibrium, is defined as

L := E[X] =∞∑i=0

nπn.

As we want to handle general models, we assume that the system has c ≥ 1 serveragents available.

Definition 1.2. We define the mean number of waiting customers, or in other wordsthose who are actually waiting in the queue, as

Lq := E[(X − c)1X>c] =∞∑

i=c+1

(n− c)πn.

Equilibrium distributions are a natural way of thinking of the system. When theprocess has been running for quite some time, we can approximate reality by the limitingdistribution and upon our arrival we actually expect – by the so-called PASTA property– L people to be in the system and we expect Lq people to be standing in line in frontof us.

From the start of the process, we can count and therefore number the customers thatarrive, that means we can speak of customer i with i ∈ N arbitrary. Upon arrival at aqueue customer i has to wait some time. The total waiting time of customer i is calledthe sojourn time and denoted by S(i). This sojourn time can be split up in two terms:the service time of customer i – denoted by T (i) – which is assumed to have some knownprobability distribution, and the queueing time of customer i – denoted by T

(i)q – which

8

Page 9: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

is the time the customer actually stands in line. This means that S(i) = T(i)q + T (i).

It is common to assume that these random variables are independent and identicallydistributed for all customers, and therefore we can just denote S = Tq + T , leaving outthe superscript.

Definition 1.3. We define the expected queueing time as Wq := E[Tq], and the expectedsojourn time as

W := E[S] = Wq + E[T ].

To define the arrival process, we can use the time between the arrivals of customer iand i+ 1, which we will denote with T

(i)I . When we assume that this random variable is

independent and identically distributed for all customers, we can just write TI as before.The effective arrival rate is the rate at which customers enter the system. When weassume that the system capacity is infinte and customers can not balk, this rate equalsthe arrival rate.

If customers arrive according to a Poisson process of rate λ, then the effective arrivalrate equals λ as well. We can easily see this when we remember that the distributionof the arrival proces A(t) – the Poisson process – conditional on A(0) has a Poissondistribution, that is (A(t) |A(0) = 0) ∼ Poisson(λt). Then we find for the interarrivaltime TI that

P(TI > t) = P(A(t)− A(0) = 0) =(λt)0

0!e−λt = e−λt,

thus the interarrival time TI is exponentially distributed with mean λ−1, and thereforethe (effective) arrival rate equals λ.

Using the effective arrival rate we can state the following theorem, which is know asLittle’s Law, or Rule or Formula.

Theorem 1.4 (Little’s Law). In a system that is in equilibrium, the mean number ofcustomers in the system equals the effective arrival rate λ multiplied by the expectedsojourn time

L = λW,

and for the mean number of customers waiting in the queue and the mean queuing timethis result also holds, Lq = λWq.

Although one intuitively expects the number of customers to be the number of cus-tomers that arrive per unit time multiplied by the waiting time, it is not an obvious ruleas it is independent of the arrival pattern, the service pattern, and the queue discipline.

The last random variable we want to introduce is the busy period duration Tb whichis the time that the server is continuously busy. The expected busy period duration iscalled the busy period and we denote it by B := E[Tb].

1.2. M/G/1 queue

In the literature ([2], [5]) the M/G/1 queue has been studied frequently. Results fromthese studies are discussed here in order to equip ourselves with the necessary tools we

9

Page 10: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

need for studying a variety of queueing systems. In figure 1.1, a diagram of a so-calledM/G/1 queue is shown.

In an M/G/1 queue the customers arrive according to a Poisson process of rate λ. Asthe service time has a general distribution, the easiest method of analysing this type ofqueue is by looking at the succesive times t1, t2, t3, . . . of customers leaving. So at t3the third customer leaves the system; that is the third customer completes service at t3.We can then describe the discrete process Xn := X(tn) and we can see this is a Markovchain when we recognise that

Xn+1 = (Xn − 1Xn>0) + Yn+1,

where Yn denotes the number of arrivals during the nth service. At tn+1, the firstterm (in brackets) is the number of customers you inherit from time tn and Yn+1 is thenumber of customers that arrived during the service. Because of the Markov propertyof the arrival process – which is Poisson – we have that Y1, Y2, . . . are independent andidentically distributed, and therefore (Xn)n≥0 is a Markov chain.

As said before, the service time T has a general probability distribution with cumu-lative distribution function FT (t). The Laplace-Stieltjes transform is given by

T (s) := E[e−sT ] =

∫ ∞0

e−st dFT (t), (1.1)

where the Lebesgue-Stieltjes integral simplifies – when the density fT (t) exists – byreplacing dFT (t) = fT (t) dt. We remark that E[T ] = lims→0+ −T ′(s) and we will adoptthe convenient notation of expressing the limit written at the right hand side of theequation above as −T ′(0+).

Figure 1.1.: Diagram of an M/G/1 queue with arrival rate λ and service time T .

Definition 1.5 (Traffic intensity). We define the traffic intesity as

ρ := λE[T ].

As the name suggests the traffic intensity is a measure for the workload of the system.For the queue to have a steady state solution we need the traffic intensity to be smallerthan unity: ρ < 1.

Looking at Xn in equilibrium we can also denote Xn by X with probabilty distribu-tion πn. We then define the probability generating function as

φ(z) := E[zX ] =∞∑i=0

πizi.

10

Page 11: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

There exists a relation between the probability generating function and the Laplace-Stieltjes transform – the Pollaczek-Khintchine Formula – which we state in the followingtheorem.

Theorem 1.6 (Pollaczek-Khintchine Formula). The following relation holds

φ(z) =(1− ρ)(1− z)T (λ(1− z))

T (λ(1− z))− z, (1.2)

where φ is the probability generating function of an M/G/1 queue in equilibrium.

For the proof of this result we refer to the literature, [5]. We remark that from thisrelation the transition probabilities πn can be found, when Taylor expansion aroundz = 0 is possible. Besides, we find π0 = φ(0) = 1− ρ and that L = φ′(1−).

Now, analysing the queue using the tools we defined above, several results can befound. For the proofs of these results we also refer to the literature, [5], as includingthese does not contribute to the goal of this thesis, which is analysing the properties ofspecific queues.

Theorem 1.7. The mean number of customers in a steady state system equals

L = E[X] = φ′(1−) = ρ+λ2 T ′′(0+)

2(1− ρ), (1.3)

and given that a customer enters the system in equilibrium, the mean queueing time is

Wq = E[Tq] =(1− ρ)λT ′′(0+)

2(1 + λT ′(0+))2. (1.4)

We remark that from the mean number of customers L and the mean queueing timeWq

we can also find the expected sojourn time W and the mean number of waiting cus-tomers Lq by using Little’s Law or the equality W = Wq + E[T ].

Also shown in literature, [2], [5], the busy period of an M/G/1 queue is found to equal

B = E[Tb] =E[T ]

1− ρ, (1.5)

which is a result derived from the recursive relation for the Laplace-Stieltjes transformof the busy period duration

B(s) = E[e−sTb ] = T(s+ λ(1− B(s))

), (1.6)

which is given here without proof as it can be found in the literature. From these tworesults it is easy to derive the mean value of (Tb)

2, and we find that

B(2) := E[(Tb)2] =

E[T 2]

(1− ρ)3. (1.7)

We will need these results on the busy period when we are studying priority queueingin chapter 2.

11

Page 12: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

1.3. Dual service rate single server queue

In this section we are interested in a specific M/G/1 queueing process. The arrival pro-cess is a Poisson process of rate λ. The service time has a hyperexponential distributionwith rates µ1 and µ2. A fraction q1 ∈ [0, 1] of the customers receives service at rate µ1

and the other fraction q2 := 1− q1 receives service at rate µ2. Conditioning on the typeof the customer in service, one can easily find the distribution of the service time T as

FT (t) = P(T ≤ t) = q1(1− e−µ1t

)+ q2

(1− e−µ2t

),

and from this we can easily find the mean service time

E[T ] =q1µ1

+q2µ2

.

We then find the traffic intensity to equal

ρ = q1λ

µ1

+ q2λ

µ2

=: q1ρ1 + q2ρ2,

where the most right equation defines ρ1 and ρ2. Of course, we assume ρ < 1 in orderfor an equilibrium to exist.

We compute the Laplace-Stieltjes transform T (s) and its first two derivatives in orderto be able to compute L and Wq using equation (1.3) and (1.4), so using equation (1.1)we find

T (s) =

∫ ∞0

e−st(q1µ1e

−µ1t + q2µ2e−µ2t

)dt =

q1µ1

µ1 + s+

q2µ2

µ2 + s. (1.8)

Then, taking the second derivative gives

T ′(s) = − q1µ1

(µ1 + s)2− q2µ2

(µ2 + s)2and T ′′(s) =

2q1µ1

(µ1 + s)3+

2q2µ2

(µ2 + s)3.

Now it is easy to find the mean number of customers in the system, and using the secondderivative of the Laplace-Stieltjes transform T ′′(0+) = 2(q1/µ

21 + q2/µ

22) we find

L = ρ+ q1ρ21

1− ρ+ q2

ρ221− ρ

.

When we take q1 = 1, or equivalently q2 = 0, our queue simplifies to a M/M/1 queue.Our result for L should also simplify to the mean number of customers in an M/M/1queue. Note that taking q1 = 1 corresponds to taking ρ = ρ1 and ρ2 = 0, so we compute

L = ρ1 +ρ21

1− ρ1=

ρ11− ρ1

,

which corresponds to the result found in the literature [2].

12

Page 13: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

We are interested in the queueing time as well, and we use the derivates found for theLaplace-Stieltjes transform, T ′(0+) = −(q1/µ1 + q2/µ2), combined with equation (1.4)to obtain

Wq =

1µ1q1ρ1 + 1

µ2q2ρ2

1− ρ=q1ρ

21 + q2ρ

22

λ(1− ρ).

Again plugging in q1 = 0 to verify our result with the M/M/1 queue we find

Wq =ρ1

µ1 − λ,

which also corresponds with the value found in the literature, [2].

Probability generating function

We use our results from chapter 1.2, in particular equation (1.2) to find the generatingfunction φ(z) in terms of the Laplace-Stieltjes transform – which we computed in theprevious section. From this we shall expand φ around z = 0 in order to find theequilibrium distribution πn. First, we will we need a compact form of T (λ(1 − z)) inorder to manipulate the formulas easily, thus using equation (1.8) we find

T (λ(1− z)) =q1

1 + ρ1(1− z)+

q21 + ρ2(1− z)

=1 + ρ− ρz

(1 + ρ1(1− z)) (1 + ρ2(1− z)),

where ρ := q2ρ1 + q1ρ2.Plugging this result into equation (1.2) gives

φ(z) = (1−ρ)(1− z)T (λ(1− z))

T (λ(1− z))− z= (1−ρ)

(1− z)(1 + ρ− ρz)

1 + ρ− ρz − z [1 + ρ1(1− z)] [1 + ρ2(1− z)].

As T (0) = 1 we recognize that T (λ(1− z))− z has a zero in z = 1. So continuing withthe denominator only, it factorizes

1+ρ−ρz−z [1 + ρ1(1− z)] [1 + ρ2(1− z)] = (1−z)[1 + ρ− (ρ1 + ρ1ρ2 + ρ2)z + ρ1ρ2z

2],

and we conclude that

φ(z) = (1− ρ)1 + ρ− ρz

1 + ρ− (ρ1 + ρ1ρ2 + ρ2)z + ρ1ρ2z2.

Note that, as was expected, φ(0) = π0 and φ(1) = 1.We proceed by remarking that the denominator is a quadratic polynomial which can

be written as the product ρ1ρ2(z − z+)(z − z−), where z+ and z− are the zeros of thepolynomial. Computing these zeros with the quadratic formula is easy

z± = 12

[1 + 1

ρ1+ 1

ρ2±√(

1 + 1ρ1

+ 1ρ2

)2− 4 1+ρ

ρ1ρ2

].

13

Page 14: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

We now conclude that

φ(z) =1− ρρ1ρ2

1 + ρ− ρz(z − z+)(z − z−)

,

which can be expanded as

φ(z) =1− ρρ1ρ2

[α+

z+ − z+

α−z− − z

],

where α± is defined as

α± =ρz± − (1 + ρ)

z± − z∓.

Finally, this leads to the Taylor expansion around 0 by using the geometric series

φ(z) =∞∑i=0

1− ρρ1ρ2

[α+ z

−(i+1)+ + α− z

−(i+1)−

]zi,

or equivalently, this yields

πn =1− ρρ1ρ2

[α+ z

−(n+1)+ + α− z

−(n+1)−

].

Checking this relation for n = 0 indeed yields π0 = 1− ρ.We have applied our abstract understanding of M/G/1 queues to a system where

customers are assigned to a service rate upon being served. In order to make thisqueueing system more interesting, we want to create two different waiting lines – bothwith their own service rate – such that customers are assigned to a service rate uponjoining the system instead upon going into service. One for the service rate µ1 andanother for µ2. If, in addition, the service of rate µ1 has priority by stating that serviceof type one customers interrupts service of type two, we get a whole different queueingsystem: a system with interrupted service. This will be the objective of the next chapter.

14

Page 15: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

2. Queueing processes withinterrupted service

It is not unimaginable for customers in a queueing system to experience interruptedservice. One can think of a machine breaking down, or customers of higher priorityentering the system. We will now take a look at results in the literature to extend ourknowledge of continuous service queues to interrupted service. We will speak of regularcustomers as customers, and we will address the interruptions of the service of thesecustomers as interruptions. Obviously, interruptions can be (high priority) customersthat intervene with the service of the regular customers, but for generality we speak ofinterruptions.

We can divide interrupted service queues into three categories: postponable, preemptive-resume, and preemptive-repeat interruptions, of which we will only deal with the preemptive-resume interruptions mathematically. As the name suggests, postponable interruptionsare postponed to the end of service whenever a customer is in service – so this kindof interruption does not intervene with the current service. Preemptive interruptions,however, are interruptions that do intervene with the current service. After a preemptive-resume interruption the service of the customer continues where it was left at the time ofinterruption. On the other hand, service has to start over again after a preemptive-repeatinterruption.

2.1. Preemptive-resume interruptions

We assume that customers arrive and interruptions occur according to a Poisson streamof rate λ and ν respectively. We are interested in the queueing process of the customersand write as before X(t) for the number of regular customers in the system at time t.We now take T to be the service time when no interruptions occur, thus T is the actualservice time. The service time and the time needed to complete a service are not alwaysequal as an interruption can create additional delay.

Definition 2.1. We define the completion time C as the time needed to complete aservice with possible intermediate interruptions, thus

C = T +N∑n=0

Tb,n,

where N is the number of interruptions during a customer’s service and Tb,n is theduratioin of the nth interruption (with Tb,0 = 0).

15

Page 16: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

As service of customers only depends on whether or not it is interrupted, it onlydepends on the total continuous duration of the interruptions. Later we will assumethat interruptions are caused by arrival of customers of higher priority and the randomvariable Tb,n corresponds to the busy period duration of the nth higher priority customer.As for every interruption we assume the different Tb,n to be identically and indepentlydistributed, we can denote the duration of an interruption with Tb,i throughout the restof this chapter (where the i stands for interruption), while using Tb,c to denote the busyperiod duration of the customers (where now the c stands for customer). One can easilysee this notation is convenient later in this thesis, when we will speak of both the busyperiod of the interruptions (which are higher priority customers then) and the busyperiod of the regular customers.

We define the Laplace-Stieltjes transform of the completion time C as C(s) := E[e−sC ].We state a relation with the Laplace-Stieltjes transform of the service time T , or T , whichis well known in the literature [1]. The result is given here without proof.

Theorem 2.2. The Laplace-Stieltjes transforms of C and T are related by

C(s) = T (s+ ν − νBi(s)),

where Bi(s) is the Laplace-Stieltjes transform of the duration Tb,i of the interruptions.

From this relation the mean completion time can be determined by computing−C ′(0+).It is found that

E[C] = E[T ] (1 + νE[Tb,i]) , (2.1)

and by taking derivatives once more that

E[C2] = E[T 2] (1 + νE[Tb,i])2 + νE[T ]E[T 2

b,i]. (2.2)

The following derivation gives more insight into the validity of the formula above. Ob-serve that the expected completion time is the expected service time added to the productνE[T ]E[Tb,i]. As ν is the average number of occuring interruptions per unit time, we seethat during one service of a customer we expect νE[T ] interruptions. Each of these in-terruptions keeps the server occupied for an expected duration equal to the mean value:E[Tb,i], so the product νE[T ]E[Tb,i] is the expected time that the service of a customeris interrupted. As we assumed that the server can resume the service of customers afterinterruption, we conclude that the mean time it takes for a customer to complete service– the mean completion time – is the mean service time plus the mean time the service isinterrupted: E[T ] + νE[T ]E[Tb,i]. In retrospect, we could also have derived the formulafor the mean completion time from a mean value analysis, as we just did.

Analogously to the M/G/1 queue we can define the traffic intensity of a queue withinterruptions to be

ρ := λE[C] = λE[T ] (1 + νE[Tb,i]) , (2.3)

which seems quite natural as it is only an increase of the uninterrupted traffic intensity bya factor 1 + νE[Tb,i]. Remark that whenever we set the number of arriving interruptions

16

Page 17: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

to zero – meaning ν = 0 – that the mean completion time coincides with the meanservice time and therefore this ‘new’ definition of the traffic intensity coincides with the‘old’ one given in section 1.2. They are actually the same when we regard this queuewith interruptions as an M/G/1 queue with the completion time C as the service time.

As λ is the mean number of customers arriving per unit time, we see that λ−1 isthe mean interarrival time. That means the traffic intensity is de ratio of the meancompletion time over the mean interarrival time. Of course, a queue with interruptedservice can only have a statistical equilibrium whenever the former is strictly smallerthan the latter, which is equivalent to the statement ρ < 1. Whenever this conditionholds, the queue X(t) has an equilibrium distribution, which we denote with X. We willexplicitly show for a priority queueing system that this condition is indeed enough, forwhich we refer to section 2.2.2.

There are two things we omitted in the previous discussion on the relation betweenthe traffic intensity and the existence of the limiting distribution, which are server occu-pation by an interruption upon arrival of a customer and the probability of an on-goinginterruption. One could easily imagine a machine breaking down, while being idle, or anemployee getting ill with no customers in the store – those are examples of an interrup-tion happening in an idle period, and those could influence the existence of a limitingdistribution, but the traffic intensity is independent of those, it seems.

However, we should realise that all interruptions that occur while there are customerspresent in the system are adding to the completion time C and therefore influence thetraffic intensity. The limiting distribution only exists when in general the server canprocess customers more quickly than the rate at which customers arrive. Therefore, thespecific situation that there are interruptions present upon arrival of a customer doesnot contribute to the existence of the limiting distribution as the time the customer hasto wait before going into service is finite when we assume that Var(Tb,i) < ∞, whichwe will assume from now on. After that finite waiting time interruptions are taken intoaccount by the completion time.

The next remark we make, is that we implicitely assume that P(Tb,i < ∞) = 1 inorder for this argumentation to hold, as a positive probability on an infinte busy periodof the interruptions keeps the server infinetely busy and customers can not be servedanymore.

In the literature results for the busy period of the queue in equilibrium are found byexpressing the Laplace-Stieltjes transform of the busy period of the whole system Tbin the other random variables. The relation is given here without proof, as includingthe proof does not contribute to the main goal of this thesis and can be found in theliterature [1].

Theorem 2.3. In a system with interrupted service that is in equilibrium, the followingrelation between the busy period of the server (thus the busy period by both customersand interruptions) and the busy period of merely the interruptions holds

B := E[Tb] =ρ+ νE[Tb,i]

(λ+ ν)(1− ρ),

where ρ is the traffic intensity as defined in equation (2.3).

17

Page 18: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

We now state results for the probability generating function,

φ(z) = E[zX ],

of a queue with interrupted service that is in equilibrium. Without proof, we state aresult from the literature [1].

Theorem 2.4. In a system that is in equilibrium with interrupted service, we find thatthe following relation holds

φ(z) = φ(0)(z)1

1 + νE[Tb,i]

(1 +

ν

λ

1− Bi(λ(1− z))

1− z

),

where Bi(w) is the Laplace-Stieltjes transform of the busy period duration Tb,i of theinterruptions, and where we have defined

φ(0)(z) :=(1− ρ)(1− z)C(λ(1− z))

C(λ(1− z))− z.

Remark that φ(0)(z) equals the probability generating function of an M/G/1 queuewith service time C.

From this relation the mean number of customers in the system can be found to equal

L = ρ+ρ2

2(1− ρ)

E[C2]

(E[C])2+

νλE[T 2b,i]

2(1 + νE[Tb,i]), (2.4)

which can be used to find W , Wq, and Lq as discussed in section 1.1.

2.2. Dual service rate priority queue

We modify the queueing system of chapter 1.3 into a system which has more possibilitieswith respect to adding game theoretical elements. The system is very similar to the firstqueueing process, but now the system has two separate queues – which means that thecustomers have to choose their type before entering the system.

The first queue X1(t) is a regular M/M/1 queue with arrival rate λ1 := q1λ and meanservice time µ1. In the second queue X2(t) customers arrive according to a Poissonprocess with rate λ2 := q2λ and the service time has an exponential distribution withmean µ2 whenever there are no customers in X1(t) during the service. However, when acustomer of type one enters the system, the service of a type 2 customer is interrupted,making X2(t) a queueing process with interrupted service depending on the busy periodof X1(t). Service of customers of type 2 is interrupted immediately and will resume fromthe point where it left off – as the exponential distribution is memoryless – making theinterruptions of X1(t) of the type preemptive-resume.

In short, there is only one server which gives priority to customers of type 1 and onlyserves customers of type 2 when there are no customers of type 1 left in the system.

18

Page 19: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Figure 2.1.: Diagram of a priority queue. Customers of type i are served at rate µi.

The server interrupts service of a customer of type 2, when a customer of type 1 enters.Figure 2.1 shows a diagram of this priority queueing system.

Now we can use the theory we already discussed to analyse this queue. First we willlook at X1, which is rather easy, and then we extend this examination to X2. We areparticularly interested in the statistical equilibrium of both queues.

2.2.1. Equilibrium distribution of the high priority queue

We denote the traffic intensity of type 1 customers by ρ1 := λ1/µ1 and we immediatelysee that X1(t) has an equilibrium distribution whenever ρ1 < 1 as is proven in theliterature [2], [5]. So we assume ρ1 < 1 and continue. For the time independent systemin equilibrium X1, the probability distribution πn is known in terms of ρ1 and from themmany properties of X1 can be found. From the literature it can be found that

P(X1 = n) = πn = (1− ρ1)ρn1 ,

whenever ρ1 < 1, or equivalently µ1 > λ1 = q1λ. From the transition probabilities wefind the pobability generating function as

φ1(z) = E[zX1 ] = (1− ρ1)∞∑i=0

(ρ1z)i =1− ρ11− ρ1z

(for 0 < z < 1).

With this result we can find many properties of the M/M/1 queue X1 in statisicalequilibrium, such as the expected sojourn time or the mean number of customers in thesystem.

Figure 2.2.: Diagram of X1, which is a regular M/M/1 queue as X1 does not see cus-tomers of type 2.

We will need the busy period of X1 in order to be able to investigate X2 in moredetail, so using relations (1.5) and (1.7) found in chapter 1.2. The busy period of an

19

Page 20: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

M/M/1 queue is given by

B1 = E[Tb,1] =1

µ1 − λ1, (2.5)

and the second moment by

B(2)1 = E[T 2

b,1] =2µ1

(µ1 − λ1)3.

Finally, we will find the Laplace-Stieltjes transform of the busy period duration Tb,1using the recursive relation of equation (1.6) and the the fact that for a M/M/1 queuewe have T1(w) = µ1

w+µ1; so

B1(w) =1

2λ1

(w + λ1 + µ1 −

√(w + λ1 + µ1)2 − 4λ1µ1

),

and with these results we can now focus on the equilibirium distribution of X2, the lowpriority queue.

2.2.2. Mean values of the low priority queue in equilibrium

Instead of speaking of the service time T2, it makes more sense to talk about the com-pletion time C, like we said before. The mean completion time is found by using equa-tion (2.1) and the busy period of X1 as computed in the previous section

E[C] =1

µ2

(1 +

λ1µ1 − λ1

)=

1

µ2

1

1− ρ1. (2.6)

As discussed in previous chapters, we have an increased traffic intensity ρ2 as it scaleswith the completion time instead of the service time, which is smaller. We define ρ′2 := λ2

µ2

as the uninterrupted traffic intensity of X2(t), and with equation (2.3) we compute theadjusted traffic intensity

ρ2 = λ2E[C] =ρ′2

1− ρ1.

For a limiting distribution to exist we need that ρ2 < 1 as discussed earlier in section 2.1.However, we would explicitly show here that this was indeed enough. In section 1.3 wediscussed a system where two M/M/1 queues were joined with probabilities q1 andq2 and given service in order of joining. That system is essentially the same as thepriority system we are discussing now, only without the priority property. In section 1.3we found that in order for equilibrium to exist, we needed the first of the followingequivalent conditions

ρ1 + ρ′2 < 1 ⇔ ρ′2 < 1− ρ1(ρ1<1)⇔ ρ′2

1− ρ1< 1,

where the last is exactly ρ2 < 1 and the second equivalence is due to the fact thatρ1 < 1. This equivalence even holds for all priority queueing systems where both queuesare M/G/1, see section 4.2 and the discussion in section 4.5.

20

Page 21: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Throughout the remainder of this chapter we will assume ρ2 < 1, thus that thereexists a statistical equilibrium distribution. We will denote X2(t) in equilibrium withX2 as usual and we use theorem 2.3 to find the busy period of the low priority queue inequilibrium

B2 =ρ2 + λ1B1

λ(1− ρ2)=

ρ1 + ρ′2λ(1− ρ1)(1− ρ2)

,

where we have used that λ1 + λ2 = λ(q1 + q2) = λ.We would like to compute the mean number of customers L2 in the system, but as

equation (2.4) is quite complicated we split the work. First, we compute

E[C2] =2

µ22

1

(1− ρ1)2+

2

µ1µ2

ρ1(1− ρ1)3

,

so with equation (2.6) we find that

E[C2]

(E[C])2= 2 + 2

µ2

µ1

ρ11− ρ1

.

Now we focus on the third term of the mean number of customers in the system andfind that

λ1λ2E[T 2b,1]

2(1 + λ1B1)=λ2µ1

ρ1(1− ρ1)2

.

Putting this all together we conclude that the mean number of customers equals

L2 =ρ2

1− ρ2+µ2

µ1

ρ1ρ22

(1− ρ1)(1− ρ2)+λ2µ1

ρ1(1− ρ1)2

=ρ2

1− ρ2

(1 +

µ2

µ1

ρ11− ρ1

), (2.7)

where we used that ρ2 = λ2/(µ2(1− ρ1)).Now we will compute W2, W2,q, and L2,q as we will use these results in the next

chapter, where we add a game theoretical element to this queue. Using Little’s Law –theorem 1.4 – we find that the expected sojourn time is

W2 =L2

λ2=

1

µ2(1− ρ1)(1− ρ2)

(1 +

µ2

µ1

ρ11− ρ1

). (2.8)

We define

ρ := ρ1 + ρ′2 = λ

(q1µ1

+q2µ2

),

which is actually the same as the traffic intensity of the dual rate server system westudied in chapter 1.3. We also remark that we frequently use the following relations

ρ21− ρ2

=ρ′2

1− ρ,

21

Page 22: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

and(1− ρ1)(1− ρ2) = 1− ρ

in manipulating the formulas. Using the definition of ρ we can write

W2 =1

µ2(1− ρ)

(1 +

µ2

µ1

ρ11− ρ1

).

Using the relation W2 = W2,q + E[C], we can deduce that the mean queueing time is

W2,q = W2 − E[C] =1

µ2(1− ρ1)

(ρ2

1− ρ2+µ2

µ1

ρ11− ρ1

),

or equivalently

W2,q =1

1− ρ1

(ρ2

µ2(1− ρ2)+

ρ1µ1(1− ρ1)

).

Finally, we use Little’s Law again to obtain the mean number of customers that areactually waiting in the queue

L2,q = λ2W2,q = ρ2

(ρ2

1− ρ2+µ2

µ1

ρ11− ρ1

),

which gives us the last of the four quantities we wanted to know in order to be able tobring in a game theoretical element.

Now that we have derived several results for the dual rate priority queueing system,we want to add some game elements to the system. Say, we ask a fee for the high priorityqueue and every customer is allowed to choose whether to pay this fee or not. Whatfraction of the customers would then go into high priority service? Or for what pricewould customers be indifferent whether they join the high or low priority service queue?

22

Page 23: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

3. Customer equilibria in a priorityqueue

We are interested in the behaviour of customers, thus given specific parameters λ, µ1,and µ2 joining which queue is beneficial. What should the fractions q1 and q2 be in orderto let customers be indifferent between which queue to join? Before looking into a fewequilibrium situations, we will study some game theory.

3.1. Introduction to game theory

Game theory is the study of interaction between decision makers [6]. The theory doesnot only apply to games in the usual meaning – for example board games or games ofsport – but does also apply to complex economic, sociologic or biologic systems in whichthere are several decision makers interacting with one another. The goal of game theoryis understanding how these interactions influence each other, for example whether thereare equilibria where everyone profits maximally. All these kind of systems of interactingdecision makers are called games and the decision makers in the games are called playersaccordingly.

Every player has a variety of available actions to perform, and which action he orshe chooses influences not only his or her position in the game, but has impact on thepositions of other players as well – otherwise the game would not be very interestingas it is the interaction which creates unexpected situations. Of course it is possible forplayers to like some actions more than others: the preferences of players are specifiedat the start of the game and this can be done in two ways. The first is to specifiy forevery player and all pairs of actions which one is preferred – doing so requires taking intoaccount that this has to be consistent by which we mean that preference is transitive:if action a is preferred to b and b is preferred to c, then a is preferred to c as well. Thesecond way is to use a payoff function, which is a function, say v, that assigns a numberto every action a. We then say that a is preferred to b if and only if v(a) > v(b). Lookingat these two ways of speaking of preference we see that they are actually the same andthat preference is only ordinal.

Definition 3.1. A finite player strategic game with ordinal preferences consists of

• a set of players P = {1, . . . , n},

• for each player i ∈ P a set of available actions Ai,

• and for each player an (ordinal) preference relation on the set of actions.

23

Page 24: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

The preference relation on Ai can be represented by the ordering on R with a payofffunction, which for each player i ∈ P is a linear, real-valued function Fi : Ai → R.

Game theory assumes that all actions taken by players are the best choices, or atleast as good as any other available action, according to their preferences. This is calledthe theory of rational choice [6]. It is a general principle in game theory and it isnecessary to make the theory consistent, as we can not do any quantitative analyseswhen players sometimes choose certain actions while there are other possible actionswith higher payoff.

Strategies and game theoretical equilibria

In every situation a player, say i ∈ P , can choose to perform a single action a ∈ Ai,that is, the player adopts the pure strategy si = a ∈ Ai. On the other hand, the playercan also choose between N different actions ak with probabilities pk, then the playeradopts the mixed strategy si =

∑Nk=1 pkak (where

∑Nk=1 pk = 1). We denote the set of

all possible strategies for player i with Si.Given a game with n players, a strategy profile s = (s1, s2, . . . , sn) is a tuple of strate-

gies si ∈ Si with i ∈ P , such that each player i chooses strategy si.As we assume that the actions of all players influence one player, we should consider

this in the definition of the payoff function. For i ∈ P denote si = (s1, . . . , si−1, si+1, . . . , sn)for a strategy profile without the strategy of player i. We define the payoff function ofplayer i against strategy si as a linear, real-valued function F (·, si) : Ai → R. This isthe payoff function of player i when the other players use the strategy profile si.

It is now natural to speak of the best response s′i ∈ Si for player i against the strategyprofile si if s′i ∈ arg maxsi∈Si

Fi(si, si). It feels quite intuitive to say that the players

choose an equilibrium strategy profile whenever it is not profitable for any single playerto deviate from this strategy profile. In regard of the theory of rational choice, nobodywill change his or her strategy then.

Definition 3.2 (Nash equilibrium). Given a game with n players, we say a strategyprofile se = (s′1, . . . , s

′n) is a Nash equilibrium if it is the best response against itself or,

in other words, for all i ∈ P we have

s′i ∈ arg maxsi∈Si

F (si, sie).

Of course, we have only been dealing with finite player games, whereas we want toapply game theory to a queueing process with an unknown number (possibly infinitelymany) of players at any given time. That is why we also need to define notions ofequilibria in case we deal with an unknown number of players, when the Nash equilibriumcan not be determined.

To do so, we assume all players have the same set of available strategies S. This is alegitimate assumption in queueing theory, all customers or players are usually given thesame choices, for example whether to join a queue or to balk. We also assume that everyplayer has the same preferences, because in statistal equilibrium we can not distinguish

24

Page 25: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

between customers. We write F (s, s0) for the payoff function of an arbitrary player whenthis player chooses strategy s ∈ S and everybody else chooses strategy s0 ∈ S. This newperspective on payoff functions gives rise to a natural notion of equilibrium.

Definition 3.3 (Symmetric equilibrium). Given a game, we say a strategy se ∈ S is insymmetric equilibrium if

se ∈ arg maxs∈S

F (s, se).

The last equilibrium concept we want to discuss, is a concept that has its roots intransportation networks [8]. In 1952 John Wardrop stated two principles which definean intuitive equilibrium concept and are applicable to transportation networks. Theseprinciples concern route choice in transportation networks and can be applied to queue-ing theory when we see joining one of multiple queues as a route in a transportationnetwork. His first principle concerns a user equilbrium and his second a system optimumequilibrium.

Definition 3.4 (User equilibrium). Wardrop’s first principle states [8]: The journeytimes on all the routes actually used are equal, and less than or equal to those whichwould be experienced by a single vehicle on any unused route.

Applied to a queueing system in which a customer can join one of several queues,this means that the sojourn times of all non-empty queues are equal and less than orequal to the queues that nobody joins. This principle is called a user equilibrium as allcustomers individually try to minimise their own sojourn time (or travelling time in thecontext of transportation networks). In our case nobody has an incentive to change thequeue they are standing in.

Definition 3.5 (System optimum). Wardrop’s second principle states [8]: In equilibriumall users cooperate to minimise the total journey time (or equivalently the average journeytime).

In a queueing system this means that all customers cooperate to minimise the averageof the expected sojourn times. Whenever a customer deviates from this system optimum,the expected sojourn time increases.

Whenever a customer is joining a queue and has to make a decision, it actually makesa difference whether the customer can see how many customers are in front of him or her.This divides queueing systems into two types: observable and unobservable queues. Asthe name suggests, when one joins an observable queue, one can see how many customersare in front of him waiting in line. Likewise in an unobservable queue, one can not.

As we will only regard queueing systems that are in statistical equilibrium, we willnot distinguish between different customers at different times and only let customersmake decisions based on the mean values in the limiting distribution. Therefore, we willnot discuss any observable queues as we should make decisions of an arriving customerdependent on the number of customers that are in front of him or her upon arrival, whichrequires us to keep the time dependency in. However, within the class of unobservablequeues we can distinguish between queues where arriving customers know the expected

25

Page 26: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

sojourn time and other mean values, and queues where customers do not know theseaverages.

3.2. Wardrop equilibria in a priority queueing

system

For this particular application we will take the priority queueing system discussed insection 2.2, but we will assume that µ1 < λ < µ2, thus that the mean service time ofhigh priority customers is greater than the mean interarrival time of customers. Thatmeans that if everyone would join X1 the system would explode. Because we want toexamine this queueing model in statistical equilibrium, we need that ρ1 < 1 and thatρ2 < 1. From the assumption ρ1 < 1 we can find the condition q1 <

µ1λ

on this system.Also solving ρ2 < 1 for q1 when we assume that µ1 < µ2, we find a condition on q1

q1 < min

{µ1

λ,µ1

λ

λ− µ2

µ1 − µ2

}, (3.1)

which gives an upper bound on q1 when this minimum is smaller than one. Of course, weshould not forget that we want q1 ∈ [0, 1]. Whenever condition (3.1) holds, the systemhas a statistical equilibrium distribution, and we will assume it holds throughout theremainder of this section.

We will try to find the customer equilibrium and the system optimum using Wardrop’sfirst and second principle, and compare the results. We will assume that customers knowthe expected sojourn time of both queues dependent of the fraction q1, thus that thecustomers know W1(q1) and W2(q1). If we would not assume this, we can not applyWardrop’s principles as we minimise the expected sojourn time as a function of q1 intwo different ways.

Throughout the remainder of this section we also assume that none of the three systemparameters λ, µ1, and µ2 are equal as we will divide by the differences of two of thosemany times, and it will be annoying and not very satisfactory to handle these casesseperatly every time.

3.2.1. Customer equilibrium

According to Wardrop’s first principle all customers will try to minimise the expectedsojourn time, individually. Whenever the expected sojourn time of X1 is smaller thanthat of X2 – so W1 = E[S1] < E[S2] = W2 – more customers will join X1 instead of X2,which increases q1, the fraction of customers that join X1. Likewise, when W2 > W1

more customers will join X2, decreasing q1. So, when W1 = W2 customers do not mindwhich queue they join. So, a fraction qe1 that is a solution of

W1(qe1) = W2(q

e1) (3.2)

defines a customer equilibrium. Remark that when the queue is in this equilibriumstate, an arbitrary arriving customer should join X1 with probability q1 and X2 with

26

Page 27: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

probability q2 = 1− q1 in order to maintain the equilibrium state – but that is exactlywhat we mean by q1 and q2.

From our discussion on M/M/1 queues in section 2.2.1 it is easiliy found that

W1(q1) =1

µ1 − q1λ. (3.3)

We already found W2 in section 2.2.2, so rewriting formula (2.8) we find

W2(q1) =1

µ2(1− ρ1)(1− ρ2)

(1 +

µ2

µ1

ρ11− ρ1

)=

1

µ2 − µ2µ1λ1 − λ2

+λ1

(µ1 − λ1 − µ1µ2λ2)(µ1 − λ1)

=1

µ1 − λ

(µ2

µ1 − q1λ+

µ1(λ− µ1)− µ2(λ− µ2)

µ1(λ− µ2)− q1λ(µ1 − µ2)

). (3.4)

Now solving the equilibrium equation (3.2) for q1, we get

µ1 − µ2 − λµ1 − q1λ

=µ1(λ− µ1)− µ2(λ− µ2)

µ1(λ− µ2)− q1λ(µ1 − µ2),

and it can easily be deduced that

qe1 =1

2

µ1

λ

λ+ µ1 − µ2

µ1 − µ2

. (3.5)

The next step is to find out when qe1 ∈ [0, 1] and when qe1 satisfies condition (3.1), orin other words find the conditions on λ, µ1, and µ2 that guarantee the existence of a(non-trivial) customer equilibrium. Because the difference in and the sum of servicespeed will play a central role in the following analysis, we define dµ := µ1 − µ2 andsµ := µ1 + µ2.

First we check condition (3.1),

qe1 =1

2

µ1

λ

λ+ µ1 − µ2

µ1 − µ2

< min

{µ1

λ,µ1

λ

λ− µ2

µ1 − µ2

},

which is satisfied whensµ < λ and dµ > λ if dµ > 0,

orsµ > λ if dµ < 0.

Next we check whether qe1 ∈ [0, 1]. We see that qe1 ≥ 0 is immediately satisfied when dµis positive, and that we get dµ < −λ when dµ is negative. The upper bound conditionsdepend on whether both 2λ−µ1 and dµ are positive or negative. If either one is negativeand the other positive, then the condition is dµ ≤ µ1λ

2λ−µ1 , and if both are positive or

negative, then we have dµ ≥ µ1λ2λ−µ1 . We have summarised these conditions in table 3.1

on page 28.

27

Page 28: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

if dµ > 0 dµ < 0

2λ− µ1 > 0

sµ < λ sµ > λ

dµ > λ dµ ≤ µ1λ2λ−µ1

dµ ≥ µ1λ2λ−µ1

2λ− µ1 < 0

sµ < λ sµ > λ

dµ > λ dµ ≥ µ1λ2λ−µ1

dµ ≤ µ1λ2λ−µ1

Table 3.1.: Whenever these conditions depending on the signs of dµ and 2λ − µ1 hold,the customer equilibrium value qe1 as given by equation (3.5) can be attained.

3.2.2. System optimum

Wardrop’s second principle stated that in system equilibrium, or the system optimum,the average of the expected sojourn times is minimal. That is, in a transport networkthat is in Wardrop equilibrium the sum of the flux of all routes multiplied by the timethat route takes is minimal. In our queueing system we have two routes, namely joiningX1 or X2, each fluxes q1 and q2 = 1−q1 respectively. So the average we want to minimiseis

Wt(q1) := q1W1(q1) + q2W2(q1), (3.6)

where W1 and W2 are given by equation (3.3) and (3.4) respectively. To minimiseWt(q1) we find the zeros of its derivative, as they correspond with the extrema of Wt(q1).Differentiating with respect to q1 yields

dWt

dq1(q1) = W1(q1) + q1

dW1

dq1−W2(q1) + (1− q1)

dW2

dq1.

The derivative of W1 is easy to find,

dW1

dq1=

λ

(µ1 − q1λ)2,

and the derivative of W2 is just as easy, although it looks more complex,

dW2

dq1=

1

µ1 − λ

(µ2λ

(µ1 − q1λ)2+λ(µ1 − µ2)(µ1(λ− µ1)− µ2(λ− µ2))

(µ1(λ− µ2)− q1λ(µ1 − µ2))2

).

Plugging all these things in and simplifying the equation, we get

dWt

dq1(q1) = (µ1 − µ2)

(λ− µ1 − µ2

λ− µ1

µ2(λ− µ1)− 1

(µ2(λ− µ1)− q1)2+

1

(µ1 − λq1)2

).

We want to solve dWt/dq1 = 0 in order to find the extrema of Wt. So we want to findqe1, the solution to

(λ− µ1 − µ2)(µ2(λ− µ1)− 1)(µ1 − λq1)2 + (λ− µ1)(µ2(λ− µ1)− q1)2 = 0,

28

Page 29: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

or equivalently

0 = (λ− µ1)3µ2

2 + µ21(µ1 + µ2 − λ)(1 + µ2(µ1 − λ))

+ q1(2λµ1(λ− µ1 − µ2)(1 + µ2(µ1 − λ))− 2(λ− µ1)

2µ2

)+ q21

(λ− µ1 − λ2(λ− µ1 − µ2)(1 + µ2(µ1 − λ))

).

It is clear that the zeros of this quadratic polynomial in q1 are easy to determine wheneverthe system parameters λ, µ1, and µ2 are known. We will not use the quadratic formulato explicitely compute these zeros in terms of the system paramters, as it will not giveus more insight in the behaviour of the zeros, and thus the extrema of Wt(q1).

Obviously, the values found using this method might be maxima as well and might noteven lie in the interval [0, 1]. Because we could not find a nice, explicit expression for theabsolute minima we can not find conditions on the system parameters that guaranteeexistence of an absolute minimum in the interval [0, 1] – as we did with the customerequilibrium in section 3.2.1. Also, as we restrict Wt(q1) to the interval [0, 1], there mightbe a minimum on the boundary qe1 = 0 or qe1 = 1.

3.3. Including service costs in a priority queueing

system

Like before, we study the priority queueing model discussed in section 2.2. In sec-tion 3.2.1 we discussed an equilibrium situation for this model in which there was noincentive to choose X1 over X2 and vice versa. We found an equilibrium value qe1 andset conditions on the system paramters for this value to make sense. We can, however,add system parameters such that we always have a customer equilibrium. We can doso by setting costs to joining X1 and X2. Service of type 1 costs p1 in units of money(whatever they may be) and likewise service of type 2 costs p2 units of money.

The customer equilibrium discussed before was based on the notion that every cus-tomer minimises their own travel time. We can expand this notion, incorporating thatevery customer tries to minimise their travel costs, where we see both money and timeas travel costs. Because we need to compare time and money, we have to assume thereis a (bijective) relation between the valuation of time and money – and we will furtherassume that this relation is the same for every customer.

For now, we assume that one unit of money is worth just as much as one unit oftime – then the proverbial equality “money = time” holds, thus their relation is linear.Later, we can always incorporate a different relation between time and money by simplereplacement of pi by f(pi), where f is our bijective relation between money and time.

The system is in equilibirum whenever a customer arrives and it does not make adifference in expected costs (of time and money) whether he or she joins X1 or X2. So,in equilibrium

W1(q1) + p1 = W2(q1) + p2, (3.7)

29

Page 30: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

where pi is the price one has to pay to receive service of type i. We immediately see thatthe only thing that is dependent on the fraction q1, is the difference in prices p1−p2 andnot the actual values for p1 and p2, so we can set p2 = 0 for simplicity and allow p1 < 0.

As we said in the introduction of this section, we can now find the price p1(q1) thatcreates customer equilibrium for that particular value of q1. However, another approachis to find the equilibrium fraction qe1 given a price p1, thus reversing the roles, and findinga relation q1(p1), which might not be well-defined. Just as in section 3.2 we assume thatnone of the system parameters are equal.

3.3.1. Setting a price to attain customer equilibrium

We use the equilibrium condition stated in equation (3.7) and the fact we could setp2 = 0. Then plugging in the formulas for W1(q1) and W2(q1) we derived in section 3.2,we obtain an expression for the equilibrium price of service of type 1

p1(q1) = W2(q1)−W1(q1) =1

µ1 − λ

(λ− µ1 + µ2

µ1 − q1λ+

µ1(λ− µ1)− µ2(λ− µ2)

µ1(λ− µ2)− q1λ(µ1 − µ2)

).

We do not exclude negative p1, as we can imagine it means that customers receive moneyfor joining X1.

3.3.2. Customer equilibrium including service costs

Again we use the equilibrium condition given by equation (3.7) and assume p1 is givenand p2 = 0. We try to invert equation (3.7) to find an expression for qe1, the fraction ofcustomers that gives customer equilibrium. So, we want to solve

p1 = W2(q1)−W1(q1) =1

µ1 − λ

(λ− µ1 + µ2

µ1 − q1λ+

µ1(λ− µ1)− µ2(λ− µ2)

µ1(λ− µ2)− q1λ(µ1 − µ2)

)for q1. Or equivalently,

0 = µ1(λ− µ1)(λ+ µ1 − µ2 + µ1(λ− µ2)p1)

+ [(µ1 − µ2)(µ1 − µ2 + λ(µ1 + µ2 − λ− 1)) + µ1(µ1 − λ)(µ1 − µ2 + λ(λ− µ2))p1] q1

+ λ(λ− µ1)(µ1 − µ2)p1q21.

We see that the zeros of this quadratic polynomial in q1 are easiliy computed once thesystem paramters λ, µ1, and µ2 are known. We will not explicitely use the quadraticformula to find the roots of this polynomial as the result will not be very enlightening.

Remark that when p1 = 0 this equation simplifies to the same linear equation wefound in section 3.2.1, so removing the service costs is consistent with our earlier result.

3.4. Maximum profit in a priority queueing system

In this section we continue our study of the priority queueing system we discussed inthe previous sections. Just as in section 3.3 we charge a fee p1 for entering the priority

30

Page 31: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

queue X1. For simplicity we assume that λ < µ1 and λ < µ2, so we do not have to worryabout checking the stability condition (3.1). Suppose we are the owner of this queueingsystem and we can set the price p1. We want to maximise our profit (per unit time),that is λ1p1. We assume customers will find customer equilibrium eventually, and wewant to maximise our long term profit. As we found an explicit expression for p1(q1) it iseasiest to maximise over q1 ∈ [0, 1], otherwise we should check for non realistic answers.So we maximise our profit per unit time,

maxq1∈[0,1]

λq1p1(q1) = maxq1∈[0,1]

q1λ

µ1 − λ

(λ− µ1 + µ2

µ1 − q1λ+

µ1(λ− µ1)− µ2(λ− µ2)

µ1(λ− µ2)− q1λ(µ1 − µ2)

),

where we substituted p1(q1) with our result from section 3.3.However, we are not able to maximise this expression in general. The system parame-

ters determine the behaviour of this graph so we will compute qmax1 and the corresponding

price pmax1 := p1(q

max1 ) for a few specific examples. We have plotted the results for

• (λ, µ1, µ2) = (0.90, 4.78, 0.92) in figure 3.1 on page 31,

• (λ, µ1, µ2) = (1.27, 1.48, 2.22) in figure 3.2 on page 32,

• and (λ, µ1, µ2) = (1.53, 1.98, 1.58) in figure 3.3 on page 32,

which we thought would represent the different shapes of the curves well after animatedparameter plots.

0.2 0.4 0.6 0.8 1.0q1

0.85

0.90

0.95

Λ1 p1

Figure 3.1.: Graph of the profit per unit time as a function of q1 for λ = 0.90, µ1 = 4.78,and µ2 = 0.92. There is a non-trivial maximum at qmax

1 ≈ 0.382 withcorresponding profit λqmax

1 pmax1 ≈ 0.986.

We see that it is possible for non-trivial equilibria to exist, that is qmax1 < 1, see

figure 3.1. However, usually we will find that qmax1 = 1 as then all customers join X1

31

Page 32: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

0.2 0.4 0.6 0.8 1.0q1

10

20

30

40

Λ1 p1

Figure 3.2.: Graph of the profit per unit time as a function of q1 for λ = 1.27, µ1 = 1.48,and µ2 = 2.22. There is a trivial maximum at qmax

1 = 1 with correspondingprofit λqmax

1 pmax1 ≈ 42.56.

0.2 0.4 0.6 0.8 1.0q1

2

4

6

8

10

12

14

Λ1 p1

Figure 3.3.: Graph of the profit per unit time as a function of q1 for λ = 1.53, µ1 = 1.98,and µ2 = 1.58. There is a trivial maximum at qmax

1 = 1 with correspondingprofit λqmax

1 pmax1 ≈ 14.07.

32

Page 33: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

generating the most money. Our preferred strategy does really depend on the systemparameters.

In this chapter we have applied several notions of game theoretical equilibria to thepriority queueing system we discussed in section 2.2. Of course, this system has itslimitations in terms of game theoretical possibilities: there are only two queues andtherefore only two expected sojourn times and two service costs (we could even simplifyto just one) to consider. We ask ourselves whether we can extend the theory we discussedin chapter 2 to descibe a multiple level priority queueing system: an n-level queueingsystem X1, X2, . . . , Xn where X1 interrupts service of X2, . . . , Xn, and X2 interruptsservice of X3, . . . , Xn, and so on. Thus, customers in Xn will only be served when thefirst n − 1 queues are empty. We will try to apply the theory discussed in chapter 2to find the statistical equilibrium distribution of this n-level priority queue. A gametheoretical analysis of this n-level queue is beyond the reach of this thesis.

33

Page 34: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

4. Multiple priority levels

In this chapter we will discuss a queueing process we would like to call the n-level priorityqueue. Customers arrive according to a Poisson process with parameter λ. There isonly one service agent, but there are n ∈ N different queues: X1(t), X2(t), . . . , Xn(t).We denote the service time of queue i with Ti and Ti has an exponential distributionwith mean µ−1i . Customers arrive according to a Poisson process with rate λ. Everyarriving customer joins queue i with probability qi ∈ [0, 1], thus customers arrive at Xi(t)according to a Poisson process with parameter λi := qiλ. Of course, we need

∑ni=1 qi = 1

in order for this arrival process to be well-defined.Customers of queue i are only served by the one operator when queues 1 to i− 1 are

empty, and service of a customer of queue i is interrupted when a customer of higherpriority arrives. When the queues of higher priority are emptied again, service can beresumed. That means that interruptions of service are preemptive-resume. In figure 4.1a diagram of this queueing process is shown.

Figure 4.1.: Diagram of an n-level priority queue. Customers of type i have a servicetime that is exponentially distributed with rate µi.

Definition 4.1. We define the uninterrupted traffic intensity of queue i by

ρi :=λiµi

= qiλ

µifor i ∈ {1, 2, . . . , n}.

Observe that this definition is not consistent with the definition in chapter 2, but it ismore suitable for what is to come. These parameter will be important in our discussionconcerning the different priority levels.

34

Page 35: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

The first result fom chapter 2 we want to recapitulate, is the mean completion time,which was a corollary from theorem 2.2 and given by equation 2.1

E[Ci] =1

µi

(1 +Bi−1

i−1∑k=1

λk

), (4.1)

where Bi−1 denotes the mean busy period of the server when only queue 1 to i− 1 aretaken into account and Ci is the completion time of Xi(t). Recall from chapter 2 thatXi(t) has an equilibrium distribution when

1 > λiE[Ci] = ρi

(1 +Bi−1

i−1∑k=1

λk

). (4.2)

Because we do not explicitly compute examples, we can not check whether this conditionis satisfied, so we will just assume that for every i ∈ {1, . . . , n} this condition is satisfiedand thus that we can speak of the equilibrium distribution of Xi(t), which we will denotewith Xi.

Another important result from chapter 2 we want to highlight is theorem 2.3, wherea relation between the busy period of the system is given dependent on the busy periodof the interruptions. From theorem 2.3 we get

Bi =λiE[Ci] +Bi−1

∑i−1k=1 λk(∑i

k=1 λk

)(1− λiE[Ci])

, (4.3)

where again Bi denotes the mean busy period of the server when only X1, . . . , Xi aretaken into account.

4.1. Mean completion time and busy period

It is obvious that X1 is again an M/M/1 queue with mean interarrival time λ1 and meanservice time µ−11 as there are no queues to interrupt it. We want to refer to section 2.2.1for a more precise discussion of this queue.

We wish to state two results from section 2.2.1 that we will need in the remainder ofour discussion, namely the mean busy period B1 and the mean completion time E[C1].The latter is clear in this case: as there are no interruptions, the completion time C1 isequal to the service time T1, thus

E[C1] = E[T1] =1

µ1

.

We remark that the expression we found here coincides with equation 4.1 when we takethe empty sum to equal zero. We have already found the busy period in equation 2.5 toequal

B1 =1

µ1 − λ1=

1

λ1

ρ11− ρ1

,

35

Page 36: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

where ρ1 = λ1/µ1 as always. Also remark that this expression coincides with equation 4.3when we take the empty sum to equal zero.

We will now inductively find the busy period Bi and the mean completion time E[Ci]for a general priority level i ∈ {1, . . . , n}. We assume that all queues are in statisticalequilibrium. In the following theorem we find explicit formulas for calculating the meancompletion time and the mean busy period.

Theorem 4.2. Let i ∈ {1, . . . , n}. If X1, . . . , Xn all have a limiting distribution, thenthe mean completion time of Xi and the mean busy period of the server when takingX1, . . . , Xi into account are given by

E[Ci] =1

µi

1

1−∑i−1

k=1 ρk

and

Bi =1(∑i

k=1 λk

) ∑ik=1 ρk

1−∑i

k=1 ρk,

where ρk is the uninterrupted traffic intensity of Xk.

Proof. We will prove this theorem inductively. First we consider the base case of i = 1,then we consider general 1 < i ≤ n whenever we know these results holds for i− 1.

The case i = 1: it is clear from what we showed earlier in this section that for i = 1these relations hold if we take the empty sum to equal zero.

Now, consider 1 < i ≤ n. We assume that for i− 1 the following relation holds

Bi−1 =1∑i−1

k=1 λk

∑i−1k=1 ρk(

1−∑i−1

k=1 ρk

) .Combining this with equation 4.1 we get that the mean completion time equals

E[Ci] =1

µi

(1 +Bi−1

i−1∑k=1

λk

)=

1

µi

(1 +

∑i−1k=1 ρk

1−∑i−1

k=1 ρk

)=

1

µi

1

1−∑i−1

k=1 ρk,

which completes the first part of the proof.We now want to use equation 4.3 to compute the mean busy period Bi,

Bi =λiE[Ci] +Bi−1

∑i−1k=1 λk(∑i

k=1 λk

)(1− λiE[Ci])

=

ρi1−

∑i−1k=1 ρk

+∑i−1

k=1 ρk

1−∑i−1

k=1 ρk(∑ik=1 λk

)(1− ρi

1−∑i−1

k=1 ρk)

=1(∑i

k=1 λk

) ρi +∑i−1

k=1 ρk(1−

∑i−1k=1 ρk

)− ρi

=1(∑i

k=1 λk

) ∑ik=1 ρk

1−∑i

k=1 ρk,

which completes the proof for 1 < i ≤ n. By this inductive argument, we conclude thatthe theorem holds for all i ∈ {1, . . . , n}.

36

Page 37: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Of course the previous theorem is only valid for an n-level priority queue whenX1, . . . , Xn have a joint statistical equilibrium distribution. It is necessery to checkwhen they actually have a statistical equilibrium distribution.

4.2. Statistical equilibrium condition

Let us consider an arbitrary queue i ∈ {1, . . . , n}. The interruptions come from thequeues X1(t), . . . , Xi−1(t). We remark that for the service of Xi(t) it does not matter inwhich order the queues 1 to i− 1 are served, only that they empty out again. We define

Yi−1(t) :=i−1∑k=0

Xk(t),

which is the queueing process of all interruptions of service of Xi(t). We see that Yi−1(t)is actually an M/G/1 queue of arrival rate λYi−1 :=

∑i−1k=1 λk = λ

∑i−1k=1 qk and with

service time distribution

FYi−1

T (t) =i−1∑k=1

qk∑i−1m=1 qm

(1− e−µkt),

as with probability qk/∑i−1

m=1 qm a customer will be served at exponential service rateof µk. But a system like this we did already study in section 1.3, so we can use ourresults from there and our results for an M/G/1 queue in general (stated in section 1.2)to find the equilibrium condition for this queueing system.

We define qk := qk/∑i−1

m=1 qm. From section 1.2 we know that Yi−1(t) has an equilib-rium distribution when

1 > λYi−1 E[T Yi−1 ] =

(λi−1∑k=1

qk

)(i−1∑k=1

qkµk

)= λ

i−1∑k=1

qkµk

=i−1∑k=1

ρk. (4.4)

It is obvious when look at the whole priority queue this way, say Yn(t) =∑n

k=1Xk(t),that the equilibrium condition becomes

1 >n∑k=1

ρk, (4.5)

which implies that equation (4.4) is satisfied for all i ∈ {1, . . . , n} as ρk ≥ 0 for all k.Now suppose thatX1, . . . , Xi−1 have an equilibrium distribution and that equation (4.4)

is satisfied. From equation (4.2) and theorem 4.2, we then find that we have an equilib-rium distribution for Xi(t) when

1 > ρi

(1 +Bi−1

i−1∑k=1

λk

)= ρi

(1 +

∑i−1k=1 ρk

1−∑i−1

k=1 ρk

)=

ρi

1−∑i−1

k=1 ρk.

37

Page 38: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

However, this is equivalent to equation (4.4) for Yi(t)

ρi

1−∑i−1

k=1 ρk< 1

(∗)⇔ ρi < 1−i−1∑k=1

ρk ⇔i∑

k=1

ρk < 1,

where the equivalence (∗) is due to∑i−1

k=1 ρk < 1.We conclude from this discussion that there exists an equilibrium distribution when-

ever the condition stated in equation (4.5) is satisfied. We will now use our new view onthe interruptions of Xi to compute all the components needed for equation (2.4), whichcan be used to find the expected number of customers in Xi.

4.3. Mean performance measures

Throughout this chapter we assume that the n queues have a joint equilibrium distribu-tion, thus that the condition found in the previous section is met.

We restate equation (2.4),

Li = λiE[Ci] +λ2iE[C2

i ]

2(1− λiE[Ci])+

λiB(2)i−1∑i−1

k=1 λk

2(1 +Bi−1∑i−1

k=1 λk), (4.6)

where we define B(2)i−1 := E[T 2

b,Yi−1], the expectation of the square of the busy period

duration of Yi−1 = X1 + · · · + Xi−1. In the previous sections we already found E[Ci]

and Bi−1, so we are left to find E[C2i ] and B

(2)i−1. We will find the former by using the

relation given by equation (2.2), and the latter by interpreting the interruptions as anM/G/1 queue as described in the previous section.

Equation (2.2) states

E[C2i ] = E[T 2

i ]

(1 +Bi−1

i−1∑k=1

λk

)2

+ E[Ti]B(2)i−1

i−1∑k=1

λk, (4.7)

where E[Ti] = µ−1i and E[T 2i ] = 2µ−2i . So, for this equation we also need B

(2)i−1.

To obtain an expression for B(2)i−1 we will use equation (1.7),

B(2)i−1 =

E[(T Yi−1)2]

(1− λYi−1 E[T Yi−1 ])3=

2∑i−1

k=1qkµ2k(

1− λ(∑i−1

k=1 qk

)(∑i−1k=1

qkµk

))3 , (4.8)

where qk := qk∑i−1m=1 qm

, that is the rescaled fraction qk. For convenient notation, we define

ρSj =∑j

k=1 ρk, so we get

B(2)i−1 =

2∑i−1

k=1qkµ2k(

1− ρSi−1)3 .

38

Page 39: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Plugging this into the last term of equation (4.6) and using theorem 4.2, we find

λiB(2)i−1∑i−1

k=1 λk

2(1 +Bi−1∑i−1

k=1 λk)=

λi∑i−1

k=1qkµ2k

∑i−1k=1 λk(

1 +Bi−1∑i−1

k=1 λk

) (1− ρSi−1

)3 ,and this simplifies to

λiB(2)i−1∑i−1

k=1 λk

2(1 +Bi−1∑i−1

k=1 λk)=

λi∑i−1

k=1qkµ2kλ(

1 +∑i−1

k=1 ρk

1−∑i−1

k=1 ρk

) (1− ρSi−1

)3 =λi∑i−1

k=1ρkµk(

1− ρSi−1)2 ,

which is the third term of equation (4.6).

Now, we want to use our expression for B(2)i−1 to find E[C2

i ],

E[C2i ] =

2

µ2i

(1 +

∑i−1k=1 ρk

1−∑i−1

k=1 ρk

)2

+2

µi

∑i−1k=1

qkµ2k(

1− ρSi−1)3 i−1∑

k=1

λk

=2

µ2i

1

(1− ρSi−1)2+

2

µi

∑i−1k=1

ρkµk(

1− ρSi−1)3 .

We already knew that

λiE[Ci] =ρi

1−∑i−1

k=1 ρk=

ρi1− ρSi−1

,

so we can use this and our result for E[C2i ] to find the second term in equation (4.6)

λ2iE[C2i ]

2(1− λiE[Ci])=

1

1− ρi1−ρSi−1

(λ2iµ2i

1

(1− ρSi−1)2+λ2iµi

∑i−1k=1

ρkµk(

1− ρSi−1)3)

=1− ρSi−11− ρSi

(ρ2i

(1− ρSi−1)2+λi ρi

∑i−1k=1

ρkµk(

1− ρSi−1)3).

Finally, we put all these together to find

Li =ρi

1− ρSi−1+

1− ρSi−11− ρSi

(ρ2i

(1− ρSi−1)2+λi ρi

∑i−1k=1

ρkµk(

1− ρSi−1)3)

+λi∑i−1

k=1ρkµk(

1− ρSi−1)2

=1

1− ρSi

(ρi +

λi∑i−1

k=1ρkµk

1− ρSi−1

),

which is quite a simple expression. We recapitulate this important equation in thefollowing theorem, as it is the most important result of this section.

39

Page 40: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Theorem 4.3. For an n-level priority queue in equilibrium with exponential service ofmean µk for priority level Xk, the mean number of customers in Xi is given by

Li = E[Xi] =1

1− ρSi

(ρi +

λi∑i−1

k=1ρkµk

1− ρSi−1

), i ∈ {1, . . . , n}. (4.9)

Example 4.4 (i = 1). We now want to check whether this expression corresponds toour earlier results, so we will compute L1, which should correspond to the expectednumber of customers in an M/M/1 queue. For i = 1 we have that the sum

∑i−1k=1

ρkµk

= 0,so

L1 =ρ1

1− ρ1,

which is indeed the correct outcome for an M/M/1 queue.

Example 4.5 (i = 2). Just as with i = 1 we now check for i = 2, and find that

L2 =1

1− ρ1 − ρ2

(ρ2 +

λ2ρ1µ1

1− ρ1

).

In section 2.2.2 we found in equation (2.7) that

L2 =ρ2

1− ρ1 − ρ2

(1 +

µ2

µ1

ρ11− ρ1

),

which is obviously equal to our result using equation (4.9).

So far we have found the expected number of customers Li in queue Xi. From thereit is easy to find the expected sojourn time Wi, the expected queueing time Wq,i, andthe expected number of queueing customers Lq,i as discussed in section 1.1.

Corollary 4.6. By Little’s Law, or theorem 1.4, we find that the expected sojourn timeequals

Wi =Liλi

=1

1− ρSi

(1

µi+

∑i−1k=1

ρkµk

1− ρSi−1

), i ∈ {1, . . . , n}.

Corollary 4.7. Using E[Ci] = 1µi

11−ρSi−1

, we find that the expected queueing time is

Wq,i = Wi − E[Ci] =1

1− ρSi−1

∑ik=1

ρkµk

1− ρSi, i ∈ {1, . . . , n}.

Corollary 4.8. Again by Little’s Law, we find that the mean number of customers inthe queue equals

Lq,i = λiWq,i =λi

1− ρSi−1

∑ik=1

ρkµk

1− ρSi, i ∈ {1, . . . , n}.

40

Page 41: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

It is nice that we could extend the theory of interrupted service of chapter 2 to find themean values of arbitrary priority levels in an n-level priority queueing model. However,in hindsight there might have been an easier way than the use of the Laplace-Stieltjestransform of the completion time to build the theory on. We will now try to get thesame results by using a mean value approach and the fact that a certain priority leveldoes not see any customers of lower priority, but before that we will examine what theoptimal order of service is.

4.4. Order of service

We are interested in the optimal order of service. Before we can really say anythingabout this, we should define what we mean by optimal. We will take optimal to beminimising the mean busy period of the server.

Recall from theorem 4.2 that the mean busy period of the whole system is given by

B =

∑nk=1

qkµk

1− λ∑n

k=1qkµk

.

When q1, . . . , qn are given, it is fairly obvious that assigning the fastest service speed tothe priority that receives the largest fraction of customers, and the second fastest servicespeed to the priority that receives the second largest fraction of customers, and so on.When we denote a fraction with q

(m)k where the subscript k stands for the priority level

and where the superscript m means that q(m)k > q

(t)s for all t < m. When we have the

ordered sequence µ(1), . . . , µ(n), we state that we should assign priorities such that thesub- and superscript of all q’s and all µ’s match. That means when we have q

(m)k we

assign µ(m) with priority level k.We will now show that this statement is true by switching two priority levels, say i

and j with i < j, thus Xi is of higher priority than Xj. We denote the regular order ofqueues with Xk, k ∈ {1, . . . , n}, and we assume that it is in the order as described above.We denote the series of queues where we switched priorities of i and j with Xk. Thatmeans that the service time E[Ti] = µ−1j and E[Tj] = µ−1i . We have given an overviewin table 4.1.

We remark that in order to minimise B we only need to look at the sum∑n

k=1 qk/µkas the denominator in the equation for B is larger when this sum is smaller. So we are

Priority level: 1 · · · i · · · k · · · j · · · n

Regular queues: X1 Xi Xk Xj Xn

Switched queues: X1 Xi ∼ Xj Xk ∼ Xk Xj ∼ Xi Xn

Table 4.1.: The series of queues we get after switching, is denoted with Xk as seen inthis table. The notation Xi ∼ Xj means that E[Ti] = E[Tj], but customersstill arrive at Xi with rate λi.

41

Page 42: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

done when we have shown that

n∑k=1

qkµk

<n∑k=1

qkµk

=n∑k=1k 6=i,j

qkµk

+qiµj

+qjµi,

which is equivalent to showing that

qiµi

+qjµj

<qiµj

+qjµi

⇔ qi

(1

µi− 1

µj

)< qj

(1

µi− 1

µj

).

It is easy to see that this inequality indeed holds when

qi < qj and

(1

µi− 1

µj> 0⇔ µi < µj

)or

qi > qj and

(1

µi− 1

µj< 0⇔ µi > µj

),

which are both how we set up the optimal order. This proves that the assigning prioritiesin order of magnitude as described above minimises the busy period.

4.5. General service times

Just like we did throughout the rest of this chapter we are considering an n-level priorityqueueing system, that is we are considering X1 to Xn, where X1 has the highest priorityand Xn the lowest. However, one difference with the previous sections is that we nowassume that the service time of every priority is generally distributed – so not expo-nentially. To emphasize, we assume that every priority has a service time distributionFTi(t). We denote βi and β

(2)i for the first and second moment of the service time Ti. In

figure 4.2 on page 42 a diagram of this queueing process is shown.

Figure 4.2.: Diagram of an n-level priority queue with general service time distributions.Customers of type i have a service time Ti that has distribution FTi .

42

Page 43: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

We will now try to use a mean value analysis to find the mean number of customersfor an n-level priority queue with general, but identical service times. We will end thissection by finding the mean number of customers for a priority queue with non-identicalgeneral service times.

Furthermore, we assume that the equilibrium condition of section 4.2 is satisfied as inthe derivation of this condition we did not use the fact that service time was exponentiallydistributed we can use it for general service time as well. Whenever this condition ismet, we also have ρi < 1 for all 1 ≤ i ≤ n and we will use this property without furtherremark in what is to come.

4.5.1. Mean value analysis with identical service times

For this mean value analysis we assume all general service times have the same distribu-tion. We need this assumption because the order in which we serve customers will makea difference in case they are not equal.

Let Yi be the M/G/1 queue as defined in section 4.2, thus

Yi =i∑

k=1

Xk.

When we consider Yi for certain i ∈ {1, . . . , n}, it does not matter for the number ofcustomers in which order the customers are served as they all have the same service timedistribution and we assumed service may be resumed after interruption, so we have thatYi is an M/G/1 queue with arrival rate λYi =

∑ik=1 λk and service time distribution

FT (this is due to F YiT (t) =

∑ik=1 qkFT (t) = FT (t), where qk is the rescaled fraction of

customers that joins the queue Xk).We are interested in the number of customers in queue Xi for certain i. In order not

having to worry about the number of customers that is in service we want to computethe mean number of queueing customers Lq,i from LYiq . Because customers of priority ido not see customers of lower priority (that is of Xk with k > i), we see that

Lq,i = LYiq − (# customers queueing in X1 to Xi−1) , (4.10)

but how can we compute the number of customers that is queueing in X1 to Xi−1?Something we can compute is the expected time that a customer has to wait given thathe or she does not join Xi, which is the same as only looking to Yi−1, so

E[T Yiq | arriving customer does not join Xi] = W Yi−1q .

With Little’s Law we then see that the mean number of customers in X1 to Xi−1 mustequal W

Yi−1q

∑ik=1 λk because customers arrive at rate

∑ik=1 λk in the process Yi. We

conclude that

Lq,i = LYiq −W Yi−1q

i∑k=1

λk =(W Yiq −W Yi−1

q

) i∑k=1

λk,

43

Page 44: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

where we used Little’s Law again. We are done when we compute the difference of themean queueing times W Yi

q −WYi−1q .

One question that could be raised: why does the difference W Yiq −W

Yi−1q not equal

the queueing time Wq,i of Xi? That is because the difference is computed in the meanqueueing system Yi where customers arrive with rate

∑ik=1 λk and those arriving cus-

tomers are not designated to a priority level. They are just served by the server withservice time distribution FT . While by Wq,i we usually mean the expected waiting timewhen we know a customer joins Xi, this is not visible in the summed system of Yi.

Continuing our derivation of Lq,i, we can easily compute W Yiq using equation (1.4),

W Yiq =

β(2)

2

∑ik=1 λk

1− ρSi, i ∈ {1, . . . , n}.

Using this result we conclude that

Lq,i =β(2)

2

(∑ik=1 λk

1− ρSi−∑i−1

k=1 λk1− ρSi−1

)i∑

k=1

λk

=β(2)

ρSi (1− ρSi−1)− ρSi−1(1− ρSi )

(1− ρSi )(1− ρSi−1)

i∑k=1

λk

=β(2)

2

λi1− ρSi−1

∑ik=1 λk

1− ρSi. (4.11)

This is by far the easiest way to find the Lq,i for general service time without usingthe results we have found before. However, for this approach to be easy, it was necessaryto assume that all priorities have the same service time distribution, because otherwiseequation (4.10) does not hold, as the order of service influences the waiting time andhence the number of customers that will be waiting.

4.5.2. Non-identical service times

When the service times are not identically distributed, we will use our earlier theory tofind the following result.

Theorem 4.9. If X1, . . . , Xn denote an n-level priority queue with general service times;for all i the service time of Xi, Ti, has distribution FTi(t). Then the mean number ofcustomers in Xi is given by

Li = E[Xi] =1

1− ρSi−1

(ρi +

2−1λi1− ρSi

i∑k=1

λkβ(2)k

), (4.12)

where β(2)k := E[T 2

k ] denotes second moment of the service time of Xk.

44

Page 45: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Proof. We will use the same techniques as in section 4.2 and section 4.3. We start byrestating equation (4.6),

Li = λiE[Ci] +λ2iE[C2

i ]

2(1− λiE[Ci])+

λiB(2)i−1∑i−1

k=1 λk

2(1 +Bi−1∑i−1

k=1 λk),

but now we do need to find all four mean values E[Ci], E[C2i ], Bi−1, and B

(2)i−1. For

convenience we denote βk := E[Tk] and β(2)k := E[T 2

k ] throughout the remainder of thischapter.

From our previous work it is now easy to find the four unknown mean values. We useequation (1.5) to find

Bi−1 =E[T Yi−1 ]

1− ρSi−1=

∑i−1k=1 qkβk

1− ρSi−1,

where yet again qk := qk/∑i−1

m=1 qm is the rescaled fraction of customers that joins Xk.From there we use equation (2.1) to find the mean completion time

E[Ci] = βi

(1 +Bi−1

i−1∑k=1

λk

)=

βi1− ρSi−1

,

and from here we can pick up the line of thought of section 4.3.Using equation (4.8) yields

B(2)i−1 =

∑i−1k=1 qkβ

(2)k

(1− ρSi−1)3,

and using equation (4.7) we find

E[C2i ] =

β(2)i

(1− ρSi−1)2+

βi(1− ρSi−1)3

i−1∑k=1

λkβ(2)k ,

which completes our search for the four mean values and we can now plug them into theequation for Li.

Using that λiE[Ci] = ρi/(1− ρSi−1), we find that

Li =ρi

1− ρSi−1+

1

2(

1− ρi1−ρSi−1

) ( λ2iβ(2)i

(1− ρSi−1)2+

λ2iβi(1− ρSi−1)3

i−1∑k=1

λkβ(2)k

)

+1

(1− ρSi−1)3λi∑i−1

k=1 λkβ(2)k

2(

1 +∑i−1

k=1 λkβk1−ρSi−1

) ,which can be easily reduced using the fact that we denote

i−1∑k=1

λkβk = ρSi−1.

45

Page 46: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

So, we find that

Li =ρi

1− ρSi−1+

1

2 (1− ρSi )

(λ2iβ

(2)i

1− ρSi−1+

λ2iβi(1− ρSi−1)2

i−1∑k=1

λkβ(2)k

)+λi2

∑i−1k=1 λkβ

(2)k

(1− ρSi−1)2,

and continuing our derivation, we find that

Li =ρi

1− ρSi−1+

λi

2 (1− ρSi )(1− ρSi−1

) (λiβ(2)i +

ρi∑i−1

k=1 λkβ(2)k

1− ρSi−1

)+λi2

∑i−1k=1 λkβ

(2)k

(1− ρSi−1)2

=ρi

1− ρSi−1+

λi

2 (1− ρSi )(1− ρSi−1

) i∑k=1

λkβ(2)k

=1

1− ρSi−1

(ρi +

λi2 (1− ρSi )

i∑k=1

λkβ(2)k

),

which completes the proof.

It is very nice that we have derived this result for general service times, however wewould like to check that it corresponds to our earlier results for exponential service.

Example 4.10 (Exponential service). We assume that all queues have exponential

service with mean βk = µ−1k such that β(2)k = 2µ−2k . Plugging this into equation (4.12)

gives

Li =1

1− ρSi−1

(ρi +

λi1− ρSi

i∑k=1

ρkµk

)

=1

1− ρSi−1

(ρi +

ρ2i1− ρSi

+λi

1− ρSi

i−1∑k=1

ρkµk

)

=1

1− ρSi−1

(ρi

1− ρSi−11− ρSi

+λi

1− ρSi

i−1∑k=1

ρkµk

),

from which it is easily seen that it corresponds to equation (4.9).

From our result for mean number of customers Li the other mean values we have beenstudying are easily determined; we state them in the following corollaries.

Corollary 4.11. By Little’s Law we then find that mean sojourn time equals

Wi =1

1− ρSi−1

(βi +

2−1

1− ρSi

i∑k=1

λkβ(2)k

), i ∈ {1, . . . , n}.

Corollary 4.12. We deduce that the mean queueing time is given by

Wq,i =2−1

1− ρSi−1

∑ik=1 λkβ

(2)k

1− ρSi, i ∈ {1, . . . , n}. (4.13)

46

Page 47: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Corollary 4.13. Finally, we find that the mean number of customers in the actual queueequals

Lq,i =2−1λi

1− ρSi−1

∑ik=1 λkβ

(2)k

1− ρSi, i ∈ {1, . . . , n}.

We would also like to verify our result corresponds to the result we got using the meanvalue analysis given that the service times were identically distributed.

Example 4.14 (Identically distributed service times). When all service times are iden-

tically distributed – thus β(2)k = β(2) for all k – it is obvious that

Lq,i =2−1λi

1− ρSi−1

∑ik=1 λkβ

(2)k

1− ρSi=β(2)

2

λi1− ρSi−1

∑ik=1 λk

1− ρSi,

from which the right hand side is the same as equation (4.11), the result we derivedusing the mean value analysis in section 4.5.1.

With these corollaries we have computed the mean values for an n-level priority queuewith general service times. We have used the theory of chapter 1 as wel as chapter 2to derive these results. Checking with the literature ([7]) indicates that we have derivedthe right results. We will now try to use these results to find the so-called heavy trafficapproximation for a priority queueing model.

47

Page 48: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

5. Heavy traffic approximation

When the load on a queueing system increases – which might happen due to an increasingcustomer arrival rate or a decreasing service speed – there will be more customers waitingfor service in the queue. We generally need the traffic intensity ρ to be strictly smallerthan unity for a steady state to exist. One might wonder what happens when we let thetraffic intensity ρ be near unity, but strictly smaller. In that case, it is clear that themean queueing time Wq is very large. When a queueing system has a traffic intensitythat is barely smaller than unity, we say that the system is in heavy traffic, [3], [2].

In this chapter we want to study the behaviour of the n-level preemptive-priorityqueueing system with general service times in heavy traffic. Inspired by the work ofKingman1, [3], we will investigate the behaviour of the mean values (1 − ρSn)Wq,i fori ∈ {1, . . . , n} as ρSn → 1 from below for the preemptive-resume priority queueing modelwe have studied in the previous chapters. Eventually we will try to find the distributionof (1− ρSn)Tq,i as ρSn goes to unity.

We use the traffic intensity ρSn as this is the load on the system as a whole, the npriority levels together. We take the limit ρSn ↑ 1 by decreasing the mean arrival time ofcustomers, thus increasing λ. From

ρSn =n∑k=1

ρk = λn∑k=1

qkβk,

we see that we get the desired result by taking the limit λ ↑ (∑n

k=1 qkβk)−1

. Throughoutthe rest of this chapter, this is what we mean when we denote ρSn → 1.

Remark 5.1. It is easy to see from taking this limit that for i < n we have

ρSi →∑i

k=1 qkβk∑nk=1 qkβk

= 1−∑n

k=i+1 qkβk∑nk=1 qkβk

as ρSn → 1,

which is strictly smaller than unity. We will use this in what is to come.

5.1. Mean queueing time in heavy traffic

We can easily use our results of section 4.5.2, in particular equation (4.13), to find theexpected value of (1− ρSn)Tq,i. We see that

E[(1− ρSn)Tq,i

]= (1− ρSn)E[Tq,i] = (1− ρSn)Wq,i, i ∈ {1, . . . , n},

1The British mathematician John Kingman found in 1962 that for any G/G/1 queue the stochasticvariable (1− ρ)Tq converges in distribution to an exponential distribution as ρ→ 1.

48

Page 49: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

as ρSn is fixed.Intuitively, we would say that only the last priority – that is Xn – will have difficulty

with digesting the increase in work. As we increase the load on the whole system, everypriority level will experience an increase in mean queueing time but the last prioritylevel will see all other increasingly busy queues interrupting its own service and hencehave a drastic increase in the mean queueing time.

From remark 5.1 and equation (4.13), we immediately conclude that for 1 ≤ i < n,

Wq,i →1

2

∑nk=1 qkβk∑nk=i qkβk

∑ik=1 qkβ

(2)k∑n

k=i+1 qkβk,

as ρSn → 1, and hence converges for all i < n. Therefore, the first part of our intuitionseems true: although all but the last priorities will become busier, they will be able tohandle the increase in work load. From this we conclude that E

[(1− ρSn)Tq,i

]converges

to zero, and therefore that (1−ρSn)Tq,i can not converge in distribution to an exponentialdistribution (which was the case for any G/G/1 queue, see [3]) as such a distributioncan not have mean zero. Because limρSn→1(1− ρSn)Tq,i is a non-negative random variablewith mean zero, we even conclude that limρSn→1(1− ρSn)Tq,i = 0.

For the last queue we can not just look at Wq,n as the expression given by equa-tion (4.13) does not converge as ρSn → 1. So we need to look at the expected value of(1−ρSn)Tq,n and then using the fact that 1−ρSn is constant for the expectation operator Ewe find

E[(1− ρSn)Tq,n

]→ 1

2

∑nk=1 qkβ

(2)k

qnβn,

as ρSn → 1. So, we see that our intuition was right again, as from this we can concludethat Wq,n →∞ and thus that the last priority can not handle the increase in workload.

However, in this section we merely computed the mean values of the queueing timesfor different priorities. We can not say anything about the distribution of the queueingtimes in heavy traffic, which is even more interesting. That is why we will try to findthe distribution of (1− ρSn)Tq,i as ρSn → 1 in the next sections.

5.2. Laplace-Stieltjes transform of the queueing time

Although the derivation of the Laplace-Stieltjes transform of the queueing time for anarbitrary priority class i is very interesting, it does not offer more insight in the particularsubject we want to conclude this thesis with, namely heavy traffic. However, we do needthis Laplace-Stieltjes transform in order to proceed with the heavy traffic approximation.Therefore, we will state – without proof – the result, and use it in the next section. Forthe proof many texts can be consulted, but we used Takagi, [7].

Theorem 5.2. The Laplace-Stieltjes transform of the queueing time Tq,i for priority iis given by

Tq,i(s) =(1− ρSi )

(s+ λSi−1 − λSi−1Bi−1(s)

)s− λi + λiCi(s)

,

49

Page 50: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

where the Laplace-Stieltjes transform of the completion time Ci is given by theorem 2.2,

Ci(s) = Ti

(s+ λSi−1 − λSi−1Bi−1(s)

), (5.1)

and the Laplace-Stieltjes transform of the busy period of the server taking X1 to Xi intoaccount satisfies

Bi−1(s) = T Yi−1

(s+ λSi−1 − λSi−1Bi−1(s)

)=

i−1∑k=1

qkTk

(s+ λSi−1 − λSi−1Bi−1(s)

), (5.2)

where qk = qk/∑i−1

m=1 qm is the rescaled version of qk again.

5.3. Distribution of the queueing time in heavy

traffic

For convenience, we define

T ρq,i(s) := Tq,i[(1− ρSn)s] =(1− ρSi )

((1− ρSn)s+ λSi−1 − λSi−1Bi−1[(1− ρSn)s]

)(1− ρSn)s− λi + λiCi[(1− ρSn)s]

, (5.3)

which is the Laplace-Stieltjes transform of the random variable (1 − ρSn)Tq,i. Also for

convenience, we define L0 := (∑n

k=1 qkβk)−1

, so for heavy traffic we take the limit λ ↑ L0

– as discussed before. Finally, we will denote sρ := (1 − ρSn)s, and we note that sρ ↓ 0for all s > 0 when we take the limit to heavy traffic.

We can directly take the limit ρSn → 1 of equation (5.3) by using L’Hopital’s ruleand the fact that Bi−1(0+) = 1 and Ci(0+) = 1. For L’Hopital’s rule to hold, we needthat the numerator and the denominator are differentiable on an open interval aroundλ = L0. In order to check whether this holds, we will need the derivatives (to λ) ofLaplace-Stieltjes transforms of the completion time and the busy period. These canbe found using equation (5.1) and equation (5.2). We will find that we need to applyL’Hopital’s rule twice and therefore we also need that the numerator and denominatorare twice differentiable and that the limit of the fraction of the second derivatives exists.We will see that they are at least twice differentiable when we assume that all servicetimes do at least have a second moment. We will see this by just taking the derivativeof the Laplace-Stieltjes transforms of the busy period and the completion time.

For convenience, we adopt the common notation,

∂λ :=∂

∂λand ∂2λ :=

∂2

∂λ2.

We also define σi−1 := sρ +λSi−1−λSi−1Bi−1(sρ). Then, using equation (5.2) we find that

∂λBi−1(sρ) =

(T Yi−1

)′(σi−1) ·

(−(qβ)Sns+ qSi−1 − qSi−1Bi−1(s

ρ)− λSi−1∂λBi−1(sρ)),

50

Page 51: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

from which we can find that

limλ↑L0

∂λBi−1(sρ) =

(qβ)Sns

λSi−1

ρSi−11− ρSi−1

,

where we should keep in mind that λ = L0 in the right hand side of the equation. Thefact that we could just take the total derivative of T Yi−1 is because the distribution ofthe service time is independent of λ for all priority classes, while the one of the busyperiod – and hence the one of the completion time – is not, obviously.

We can do the same to find ∂2λB−1(sρ), and we find that

∂2λB−1(sρ) =

(T Yi−1

)′′(σi−1) ·

(−(qβ)Sns+ qSi−1 − qSi−1Bi−1(s

ρ)− λSi−1∂λBi−1(sρ))2

+(T Yi−1

)′(σi−1) ·

(−2qSi−1∂λBi−1(s

ρ)− λSi−1∂2λBi−1(sρ)),

from which we find that

limλ↑L0

∂2λBi−1(sρ) = [(qβ)Sns]

2

∑i−1k=1 qkβ

(2)k

(1− ρSi−1)3+

(qβ)Sns

λSi−1

2(qβ)Si−1ρSi−1

(1− ρSi−1)2,

where yet again we should keep in mind that λ = L0.We will do the same for Ci(s

ρ) using equation (5.1), and we find that

∂λCi(s) = T ′i (σi−1) ·(−(qβ)Sns+ qSi−1 − qSi−1Bi−1(s

ρ)− λSi−1∂λBi−1(sρ)),

from which we can conclude – using our previous results for Bi−1 – that

limλ↑L0

∂λCi(s) = (qβ)Snsβi

1− ρSi−1.

Taking the derivative again, we get

∂2λCi(s) = T ′′i (σi−1) ·(−(qβ)Sns+ qSi−1 − qSi−1Bi−1(s

ρ)− λSi−1∂λBi−1(sρ))2

+ T ′i (σi−1) ·(−2qSi−1∂λBi−1(s

ρ)− λSi−1∂2λBi−1(sρ)),

from we which we find that

limλ↑L0

∂2λCi(s) = [(qβ)Sns]2 β

(2)i

(1− ρSi−1)2+ 2βiq

Si−1

(qβ)Sns

λSi−1

ρSi−11− ρSi−1

+ βiλSi−1

([(qβ)Sns]

2

∑i−1k=1 qkβ

(2)k

(1− ρSi−1)3+

(qβ)Sns

λSi−1

2(qβ)Si−1ρSi−1

(1− ρSi−1)2

).

In particular for i = n, then ρn = 1− ρSn−1 and we find that

limλ↑L0

∂2λCn(s) = [(qβ)Sns]2 βn

∑nk=1 λkβ

(2)k

ρ3n+ 2(qβ)Sns

βnρSn−1q

Sn−1

ρ2nλSn−1

.

51

Page 52: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

We will now use these results to find the distribution of (1− ρSn)Tq,i for all i.For i < n we can directly take the limit ρSn → 1 of equation (5.3) by using L’Hopital’s

rule and everything we have derived so far. Then for s > 0 we find

limλ↑L0

T ρq,i(s) = limλ↑L0

(1− ρSi )(−(qβ)Sns+ qSi−1 − qSi−1Bi−1(s

ρ)− λSi−1∂λBi−1(sρ))

−(qβ)Sns− qi + qiCi(sρ) + λi∂λCi(sρ)

− limλ↑L0

(qβ)Si

((1− ρSn)s+ λSi−1 − λSi−1Bi−1(s

ρ))

−(qβ)Sns− qi + qiCi(sρ) + λi∂λCi(sρ)

L= (1− ρSi )

−(qβ)Sns− λSi−1 · limλ↑L0 ∂λBi−1(sρ)

−(qβ)Sns+ λi · limλ↑L0 ∂λCi(sρ)

(s>0)= (1− ρSi )

1 +ρSi−1

1−ρSi−1

1− ρi1−ρSi−1

= 1,

where we note that after taking the limit at the equality marked with L we should keepin mind that λ = L0.

This result coincides with our intuition and our earlier result in section 5.1, as thismeans that for all s the limit

limρSn→1

T ρq,i(s) = limρSn→1

E[e−s(1−ρSn)Tq,i ] = 1, i ∈ {1, . . . , n− 1},

and thus that (1− ρSn)Tq,i = 0 almost surely with respect to the Lebesgue measure. Weconclude that the priority levels 1 to n − 1 can handle the increase in traffic intensitywell.

We also see that we can not use this for i = n as the fraction of the derivatives to λare again both zero, so we should apply L’Hopital’s rule another time. For conveniencein notiation we will denote Cn(sρ) just by Cn and likewise for Bn−1(s

ρ). Doing so thengives

limλ↑L0

T ρq,n(s) = limλ↑L0

1

2qn∂λCn + λn∂2λCn

{(1− ρSn)

(−2qSn−1∂λBn−1 − λSn−1∂2λBn−1

)− 2(qβ)Sn

(−(qβ)Sns+ qSi−1 − qSi−1Bi−1 − λSi−1∂λBi−1

)}L= 2(qβ)Sn

(qβ)Sns+ λSi−1 · limλ↑L0 ∂λBi−1

limλ↑L0

(2qn∂λCn + λn∂2λCn

) ,where we took the limit at the equation marked with L again and from that pointλ = L0. We immediately see from our earlier results that the numerator simplifies to

(qβ)Sns+ λSi−1 · limλ↑L0

∂λBi−1 =(qβ)Sns

1− ρSn−1=

(qβ)Sns

ρn.

52

Page 53: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

The denominator, however, is a somewhat bigger expression

limλ↑L0

(2qn∂λCn + λn∂

2λCn

)= 2(qβ)Sns

qnβnρn

+ [(qβ)Sns]2

∑nk=1 λkβ

(2)k

ρ2n+ 2(qβ)Sns

ρSn−1qSn−1

ρnλSn−1,

which simplifies to

limλ↑L0

(2qn∂λCn + λn∂

2λCn

)= [(qβ)Sns]

2

∑nk=1 λkβ

(2)k

ρ2n+ 2(qβ)Sns

(ρnq

Sn−1

ρnλSn−1+ρSn−1q

Sn−1

ρnλSn−1

)= [(qβ)Sns]

2

∑nk=1 λkβ

(2)k

ρ2n+ 2(qβ)Sns

qSn−1ρnλSn−1

.

Plugging the previous results into the limit of the queueing time, we see that for s > 0we get

limλ↑L0

T ρq,n(s) = 2(qβ)Sn

(qβ)Snsρn

2(qβ)SnsqSn−1

ρnλSn−1+ [(qβ)Sns]

2∑n

k=1 λkβ(2)k

ρ2n

(s>0)=

2(qβ)Sn

2qSn−1

λSn−1+ (qβ)Sns

∑nk=1 λkβ

(2)k

ρn

=1

1 + s∑n

k=1 qkβ(2)k

2qnβn

,

and we recognise the Laplace-Stieltjes transform of the exponential distribution as weexpected. We conclude, as ρSn → 1 the random variable (1− ρSn)Tq,n has an exponentialdistribution with mean

limλ↑L0

E[(1− ρSn)Tq,n] =

∑nk=1 qkβ

(2)k

2qnβn,

just like we found in section 5.1. This result seems in correspondence with the resultof John Kingman. However, we can explicitly check it actually does correspond. In thederivation we did not choose fixed n, so we can also look at the piority queue with onlyone priority class, thus n = 1, and this is just an M/G/1 queue for which Kingmanfound an explicit expression. When we consider n > 1, we know that Xn is also just anM/G/1 queue with the completion time as service time.

Correspondence to the result of Kingman

We will now compare our result with the result that John Kingman derived in 1962, [3].His result is also stated in other texts, such as [2].

Theorem 5.3 (Kingman, 1962). John Kingman found that for any G/G/1 queue thedistribution of Tq is approximated by an exponential distribution with mean

E[Tq] ≈1

2

Var[TI ] + Var[T ]

E[TI ]− E[T ],

53

Page 54: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

where TI is the interarrival time and T is the service time. This is equivalent to sayingthat the distribution of (1− ρ)Tq goes to an exponential distribution with mean

limλ↑L0

E[(1− ρ)Tq] =1

2

Var[TI ] + Var[T ]

E[TI ].

By simplifying to Poisson arrivals, we can immediately compare this result with ourswhen we use n = 1, that is, simplifying our system to just an M/G/1 queue.

Example 5.4 (n = 1). When we use n = 1 in the result of the previous section, we seethat the expected value simplifies to

limλ↑L0

E[(1− ρ)Tq] =1

2

β(2)

β,

where we left out the subscripts as they are unnecessary in the case n = 1.In our case, we consider our priority queueing model with n = 1, which an M/G/1

queue, so we know that the interarrival time TI is exponentially distributed with mean λ−1.We know that the variance equals λ−2. We remark that the limit we take now is λ ↑ β−1.Plugging this in yields

limλ↑L0

E[(1− ρ)Tq] =1

2

(1

λ+ λVar[T ]

)=

1

2

(β +

β(2) − β2

β

)=

1

2

β(2)

β,

which is exactly what we got when we used the result we derived in the previous section.

Now, for n > 1 we can see Xn as an M/G/1 queue with the completion time as servicetime.

Example 5.5 (n > 1). We need the completion time in this case. From section 4.5.2we know that

E[Cn] =βn

1− ρSn−1=βnρn

=1

λn

and

E[C2n] =

β(2)n

(1− ρSn−1)2+

βn(1− ρSn−1)3

n−1∑k=1

λkβ(2)k =

βn∑n

k=1 λkβ(2)k

ρ3n,

where we used that 1− ρSn−1 = ρn, which is allowed as we have already taken the limit.Because we multiply by 1 − ρSn but the traffic intensity ρ of Xn as it is used in the

theorem actually equals

1− ρ = 1− λnE[Cn] =1− ρSn

1− ρSn−1=

1− ρSnρn

,

we immediately see that Kingman’s result becomes

limλ↑L0

E[(1− ρSn)Tq,n] =ρn2

(1

λn+ λn Var[Cn]

)=ρn2

(1

λn+ λnE[C2

n]− λn(E[Cn])2).

54

Page 55: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Plugging the expactation values of the completion time in, we get

limλ↑L0

E[(1− ρSn)Tq,n] =ρn2

(1

λn+

∑nk=1 λkβ

(2)k

ρ2n− 1

λn

)=

1

2

∑nk=1 qkβ

(2)k

qnβn,

which coincides with the result of the previous section.

We now have found that our result corresponds to the literature for all n.

The heavy traffic approximation

The heavy traffic results we found so far were results for the limit λ ↑ L0, or equivalentlyρSn → 1. Why our results are important is because we can now approximate the queueingtime when ρSn is very close to, but strictly smaller than unity. In that case, we see thatfor t ≥ 0 we find the following approximation

FTq,n(t) = P (Tq,n ≤ t) = P((1− ρSn)Tq,n ≤ (1− ρSn)t

)≈ 1− exp

(−2

qnβn(1− ρSn)∑nk=1 qkβ

(2)k

t

),

and this final result is what we call the heavy traffic approximation.

55

Page 56: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Conclusion and review of theprocess

Conclusion

In this thesis, we have first examined queueing processes in general, in particular theM/G/1 queue. We extended our understanding of the M/G/1 queue to queueing pro-cesses with interrupted service, from where we could investigate a priority queueingmodel with preemptive-resume priority discipline and which had two priority classes:high and low. We assumed that the service times were exponentially distributed and wefound formulas for the mean number of customers and the mean queueing time in termsof the system parameters. Furthermore, we discussed the stability conditions that needto hold in order for a statistical equilibrium to exist.

We also examined customer equilibrium situations, where we asked ourselves whatfraction of the customers should join the high and what fraction should join the lowpriority queue in order for the expected waiting times to be equal. We computed thefractions for several different customer equilibria and we added the concept of paying afee for having priority and investigated how this influenced the customer equilibria.

Then, we extended the previous model to an n-level priority queue with preemptive-resume priority discipline and general service times. We have derived formulas for themean number of customers and mean queueing time in terms of the system paramters,and the stability conditions that need to hold to guarantee the existence of a statisticalequilibrium. We found that if the sum of the traffic intensities of all uninterruptedqueues is strictly smaller than unity, that is

n∑k=1

ρk < 1,

then the priority queue has a statistical equilibrium.The final result of this thesis is the heavy traffic approximation, where we took the

limit∑n

k=1 ρk → 1. We found that the queueing time for all but the lowest prioritylevels converges. For the lowest priority level we found that we can approximate thequeueing time with an exponential distribution, just like Kingman [3]. We found that

FTq,n(t) ≈ 1− e−α(1−ρ)t,

where Tq,n is the queueing time of the lowest priority class and α is a constant that canbe expressed in the system parameters.

56

Page 57: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Review of the process

At the start of this project the goal of this thesis was not completely clear. It is hard,though, how does one set a goal for himself when one does not know what his optionsare? What directions can I go to? I did not know. The process of studying a subjectby yourself, however, is one of slow progress and growth, and slowly a direction beganto dawn. When I came to him for the first time, my supervisor, prof. dr. R. Nunez-Queija, told me that I could investigate queues with processor sharing, something whichis quite similar to priority queueing actually – instead of prioritising certain types ofcustomers the server serves all customer classes at once but with different capacities.Because I did not know queueing theory that well, I simplified the model given to meby dr. Nunez-Queija to what would become section 1.3 of this thesis.

The next logical step was to add priority to the model, which I did in the next chapter.However, I was also interested in game theory and I wanted to incorporate somethingwith the influence of customer choices as well. Finding something that really fitted themodel I had made so far, was quite difficult and the final results are stated in chapter 3.Writing this chapter I found that my interest was more drawn to queueing theory, so wedecided we should stay on that course – leaving chapter 3 the odd one out.

After trying to make the priority queueing system of chapter 2 more general by adapt-ing it to arbitrary n different priority levels and general service times, my supervisorsuggested I could investigate the heavy traffic limit in this model. The heavy trafficlimit was one I really appreciated, its simple beauty astounding me. The fact that wecan approximate the queueing time in any G/G/1 model by an exponential distributionis in my opinion fascinating, and to derive the result myself in a way I did not find inany of the literature I have read so far, was really nice.

Of course, there is always more that can be studied. Continuing on this thesis, onecould also try to find other bounds or approximations for other limiting cases than heavytraffic. It might also be interesting to model the system with computers, or try to findthe optimal number of priority levels in the system (where optimal is of course free forinterpretation).

I want to end this thesis by thanking dr. R. Nunez-Queija for his great supervision,his input when I did not know in which direction we should go, and the almost weeklymeetings in which we discussed many results amongst other things that concerned us.

57

Page 58: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

Bibliography

[1] Gaver, D. 1962, A Waiting Line with Interrupted Service, Including Priorities. Jour-nal of the Royal Statistical Society, Series B (Methodological), vol. 24, no. 1, pp.73-90.

[2] Gross, D., & Harris, C.M. 1998, Fundamentals of Queueing Theory (3rd edition).(John Wiley & Sons, Inc., New York).

[3] Kingman, J. 1961, On Queues in Heavy Traffic. Journal of the Royal StatisticalSociety. Series B (Methodological), vol. 24, no. 2, pp. 383-392.

[4] Montroll, E.W., Potts, R.B., & Ward, J.C. 1963, Correlations and Spontaneous Mag-netization of the Two-Dimensional Ising Model. Journal of Mathematical Physics,vol. 4, no. 2, pp. 308-322.

[5] Norris, J. 1997, Markov Chains. (Cambridge University Press, New York).

[6] Osborne, M. 1995, An Introduction to Game Theory. (Oxford University Press, NewYork).

[7] Takagi, H. 1991, Queueing Analysis – Volume 1: Vacation and Priority Systems,Part 1. (North-Holland, Amsterdam).

[8] Wardrop, J. 1952, Some Theoretical Aspects of Road Traffic Research. Proceedingsof the Institute of Civil Engineers, part II, volume 1, pp. 325-378.

58

Page 59: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

A. Popular summary

People deal with queueing everyday. Whether you stand in line at the supermarket topay your groceries or, less apparently, you are waiting for your favourite internet pageto load on your computer, you are actually waiting for your turn. The mathematicalstudy of queues is called queueing theory and is a relatively young field of study – theDanish mathematician Agner Krarup Erlang was the first to write a paper on the subjectin 1909.1

But what is a queue actually? A queue itself is not something we can define, or wecan compute without more information. A queue is an accumulation of customers ormessages (or just work) at a certain point of service. What creates a queue is nothingmore than that a customer or message arrives before the previous one has been servedcompletely. So, what defines a queue mathematically is the process according to whichcustomers arrive and the time it takes to serve each customer, also called the service time.The arrival process is characterised by the time between the arrival of two customers,the so-called interarrival time.

Usually, we assume that both the interarrival time and the service times are stochasticof nature. That means they are certain values with certain probabilities. Let n be anynatural number. We denote the time between the arriving of an arbitrary customer nand his succesor n + 1 with An, thus An is the stochastic or random variable that wecall the interarrival time. We denote the service time of customer n with Tn. Finally,we denote the probability that customer n has a service time that does not exceed anarbitrary number t > 0 with P(Tn ≤ t). Likewise, we can write P(An ≤ a). It iscommon to assume that all customers have interarrival times and service times that areidentically distributed. That means we do not have to distinguish between customersand we can just write the generic symbols (that is, without subscript) A and T . Everytime a customer arrives we draw a number from the probability distributions of A andT , and these times are the time it takes for the next customer to come and the time ittakes for the newly arrived customer to be served. This is how a queueing process worksmathematically.

Now we know that the interarrival time A and service time T attain certain valueswith certain probabilities, but what value do we expect when we draw a number fromtheir probability distributions? The expected interarrival time (also the mean interarrivaltime) is denoted by E[A] and can be computed using an integral. Likewise, we denote theexpected service time by E[T ]. We ask ourselves, when do we expect that the queueingprocess is stable? That means, when do we expect that the number of customers can

1Agner Erlang worked for the Copenhagen Telephone Exchange and he modelled the incoming tele-phone calls at a telephone exchange that had to wait before being served.

59

Page 60: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

become zero for an instant in finite time? It can be proven – but it is also very intuitive– that the queueing process is stable when the expected service time is strictly smallerthan the expected interarrival time, that is we expect that on average less customersarrive per unit time than can be served. Mathematically we can denote the previoussentence by E[T ] < E[A], or

E[T ]

E[A]< 1.

Because the ratio in the equation above is important during the analysis of a queueingsystem, we give it its own name and symbol: we define the traffic intensity or workloadby ρ := E[T ]/E[A] (the := means the right hand side defines the left hand side). Thestability condition then becomes ρ < 1.

In this thesis a particular type of queueing process is studied: a priority queue thatuses the preemptive-resume discipline. The idea of a priority queue is simple, there aren priority classes – that is, n different waiting lines all assigned with a different level ofimportance, or priority. Each class, for example class number i, has its own interarrivaltime denoted by the generic symbol Ai and own service time denoted by Ti (note thatthe subscript now corresponds to the class and not to the number of the customer).Although there are n different queues or waiting lines, there is only one service agentthat serves high priority customers first. A diagram of this queueing process is shownin figure A.1. The way the server gives priority to certain customers is stated in thediscipline: preemptive-resume. Preemptive means that the server stops serving a certaincustomer whenever a customer of higher priority arrives. That way a customer of acertain class will only be served when there are no customers of higher priority present.Resume means that the service that has been interrupted may be resumed from whereit left off after the higher priority customers have been served. This priority queueingprocess has been described in this thesis. We have found formulas for the mean numberof customers and the mean queueing time (the time a customer actually stands in line)expressed in the system parameters.

Figure A.1.: Diagram of an n-level priority queue. Customers of class i are served beforecustomers of classes i+ 1, . . . , n− 1, n.

60

Page 61: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

The final part of this thesis is on the heavy traffic approximation of this priorityqueueing model. When a queue is in heavy traffic, the traffic intensity ρ is just belowunity. There are almost as many customers arriving as there can be served per unittime, and the queue will be very long – that is why it is called heavy traffic. We takethe limit of ρ→ 1 and compute what happens with the queueing system. Intuitively weexpect that only the lowest priority class experiences trouble from this critical increasein traffic as the lowest priority class can only be served when all other classes are empty.From the literature we also expect that the queueing time of the lowest priority classconverges in distribution function to an exponential distribution. Both coincide with theresults we found using the so called Laplace-Stieltjes transform of the queueing time.

61

Page 62: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

B. Final presentation

Here is included the final presentation I gave on my thesis. My fellow mathematicsstudents and my supervisor were in the audience.

62

Page 63: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

63

Page 64: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

64

Page 65: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

65

Page 66: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

66

Page 67: Preemptive-resume priority queueing - UvA · preemptive-resume priority queueing system with generally distributed service times. In heavy tra c the workload on the system is near

67