Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

QUALITY OF SERVICE

USING PRIORITY QUEUING

Presented by:- Shubham Sharma


Roll Number:- MT19CPS007
Priority Queuing
• Consider the M /G/ 1 system with the difference that
arriving customers are divided into n different priority
classes.
• Class 1 has the highest priority, class 2 has the second
highest, and so on.
• The Arrival rate and the first two moments of service time
of each class k are denoted 𝜆k ,Xk = 1/𝞵k , and Xk2,
respectively.
• The arrival processes of all classes are assumed
independent, Poisson, and independent of the service
times
NONPREEMPTIVE PRIORITY

• NON PREEMPTIVE PRIORITY RULE : A customer


undergoing service is allowed to complete service
without interruption even if a customer of higher priority
arrives in the meantime.

• A separate queue is maintained for each priority class.


When the server becomes free, the first customer of the
highest nonempty priority queue enters service
• We will develop an equation for average delay for
each priority class, which is similar to the P-K
formula and admits a similar derivation.
Denotion as follows :
• NQK = Average number in queue for priority
k{ avg. no. of customers in queue waiting for their
turn of service}.
• Wk = Average queueing time for priority k { Avg.
time customer spends waiting in queue }.
• pk= 𝜆k / 𝞵k = System utilization for priority k { It
represents average server utilization }.
• R = Mean residual service time
• We assume that the overall system utilization is less than 1

p1+p2+p3+……..+pn < 1

Validation of Assumption :
• λ: the arrival rate (the expected number of customers arriving
in the system per unit time, e.g. per 10 seconds);
• μ: the reciprocal of the mean service time (the expected
number of consecutive service completions per the same unit
time, e.g. per 10 seconds);
• Example : Let , the no. of customers coming is 12 per unit time
and no. of service completions are 10 per unit time { λ > μ}.
• Then system will “blow up” as no. of customers coming in
will be greater than no. of customers going out of service
which causes infinite no. customers in the queue . This
condition is not practical , hence assumption λ < μ is
taken .
• When
  this assumption is not satisfied, there will be some
priority class k such that the average delay of customers
of priority k and lower will be infinite while the average
delay of customers of priority higher than k will be finite

• As result taken from derivation of P-K formula , we have


for the highest priority class

W1 = R + N Q 1
•  Eliminating NQ 1
from this equation using Little's
Theorem

NQ1 = 𝜆1 * W1

We Obtain

W1 = R +p1W1

W 1=
(equation 1)
• For the second priority class, we have a similar
expression for the queueing delay W2 except that we
have to count the additional queueing delay due to
customers of higher priority that arrive while a customer
•   W2= R + NQ1 + NQ2 + 𝜆1 * W2

• Using Little's Theorem : NQk = 𝜆k* Wk

W2 = R + p1W1 +p2W2 +p1W2


W2 =
• Using the expression W1= obtained earlier,
we finally have
W2 =
••  The derivation is similar for all priority classes k

> 1. The formula for the waiting time in queue


is
Wk = equation 2

• The average delay per customer of class k is


Tk = +Wk
equation 3

• The mean residual service time R , result taken


from as for the P-K formula
R 2
equation 4
••  The average waiting time in queue and the

average delay per customer for each class is


obtained by combining Equation 2,3 and 4.
Wk = equation 5

Tk = +Wk
equation 3
• The analysis given above does not extend easily
to the case of multiple servers .
• Reason : There is no simple formula for the mean
residual time R.
• If, however, the service times of all priority classes
are identically and exponentially distributed, there
is a convenient characterization of R).
• It is generally true that average delay tends to be
reduced when customers with short service times
are given higher priority.
• Example : consider the supermarket practice of
having special checkout counters for customers
with few items .
PREEMPTIVE RESUME PRIORITY

• One of the features of the non preemptive


priority rule is that the average delay of a
priority class depends on the arrival rate of
lower-priority classes.
• This is evident from equation 4, which gives the
average waiting times Wk and is due to the fact
that a high-priority customer must wait for a
lower priority customer already in service.
• This dependence is not present in the
preemptive mresume priority discipline .

• The service of a customer is interrupted when


a higher priority customer arrives and is
resumed from the point of interruption once all
customers of higher priority have been served.
EXAMPLE :

• Consider a transmission line serving several


Poisson packet streams of different priorities.
The packets of each stream are subdivided into
many small "subpackets" , which in the
absence of packets of higher priority, are
contiguously transmitted on the line.
• The transmission of the subpackets of a given
packet is halted when a packet of higher
priority arrives and is resumed when no
subpackets of higher priority packets are left in
the system.
• As we consider the calculation of Tk the
average time in the system of priority k
customers, we should keep in mind that the
presence of customers of priorities k + 1
through n does not affect this calculation.

• Therefore, we can treat each priority class as if


it were the lowest in the system. The system
time Tk consists of three terms:
•1.  The customer's average service time .
2. The average time required, upon arrival of a
priority k customer, to service customers of
priority 1to k already in the system (i.e., the
average unfinished work corresponding to
priorities 1 through k). It can be seen that this
time is equal to the average waiting time in the
corresponding, ordinary M/ G/ 1 system
(without priorities), where the customers of
priorities k + 1 through n are neglected, that is
=
•  
• Here , Rk is the mean residual time

Rk 2

• The reason is that at all times, the unfinished work (sum


of remaining service times of all customers in the
system) of an MIG1I-type system is independent of the
priority discipline of the system. This is true for any
system where the server is always busy while the system
is nonempty, and customers leave the system only after
receiving their required service.
•3.  The average waiting time for customers of priorities I
through k – 1 who arrive while the customer of class k is in
the system. This term is

Tk = Tk
for k > 1, and is zero for k = 1.

Collecting the three terms above, we obtain the equation

Tk = + + Tk
•  The final result is, for k = 1

T1 =
and for K >1 ,

Tk =

Rk 2
• As for the nonpreemptive system, there is no
easy extension of this formula to the case of
multiple servers unless the service times of all
priority classes are identically and
exponentially distributed
REFERENCES

1. Mathematical validation from book ‘Data Networks by


Dimitri Bertsekas and Robert Gallager’ .
2. Theory on Priority queuing from book ‘Data
Communications and Networking by Behrouz A.
Forouzan, Sophia Chung Fegan’ .
THANK YOU

You might also like