This action might not be possible to undo. Are you sure you want to continue?

**Queuing Models – Part2
**

:Instructor Eng. Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department

Outline

• Introduction. • Study of different queues types:

– M/M/1 queue. – M/M/s queue. – M/M/1/c queue.

The Hashemite University

2

Introduction

• In this lecture we will calculate the different performance measures for some queues types. • Note that all these parameters are calculated under the steady state conditions.

The Hashemite University

3

A Study of M/M/1 Queues I

• Customers arrive according to a Poisson process with rate λ.

λ j = λ,

j≥0

• There is only one server. • Service time is exponential with rate µ.

μ 0 = 0, μ j = μ,

λ

λ

j ≥1

λ λ

0

µ

1

µ

2

...

j-1

µ

j

µ

j+1

4

The Hashemite University

A Study of M/M/1 Queues II

• We let ρ = λ/µ which is called the traffic intensity or server utilization, so

λ0 λ1 λ j −1 j cj = =ρ µ1µ2 µ j

• From Balance equations:

π1 = ρπ 0 , π 2 = ρ π 0 , ,

2

π j = ρ π0

j

The Hashemite University 5

**A Study of M/M/1 Queues III
**

• As the stationary probabilities must sum to 1, therefore:

1 =π0 +π1 +π2 + +π j + 1 =π0 (1 + ρ + ρ + + ρ +)

2 j

• But for ρ <1,

2

1+ ρ + ρ + + ρ + = 1/1− ρ

j

• Therefore:

π 0 = (1 − ρ ) π j = ρ (1 − ρ ),

j The Hashemite University

j ≥1

6

Why to assume ρ <1?

• Since we want to study the queueing system under stable conditions, i.e. stable system. • Stability requires that the arrival rate λ must be less than the service rate μ, i.e. the system can afford the required jobs. • Stability means that steady state solution exist.

The Hashemite University

7

L of M/M/1 Queues

• L is the expected number of entities in the system.

L = ∑j =0 j × P ( j entities in system)

∞ ∞

= ∑j =0 jπ j = ∑j =0 jρ j (1 − ρ)

∞

= (1 − ρ) ρ∑j =1 jρ

∞

j −1

d ∞ = (1 − ρ) ρ ρj ∑j =1 dρ

8

d ρ ρ λ = (1 − ρ) ρ ( )= = dρ 1The Hashemite 1 − ρ µ − λ −ρ University

Lq of M/M/1 Queues

• Lq is the expected number of entities in the queue.

**Lq = ∑j =1 ( j −1) × P ( j entities in system)
**

∞ ∞ ∞

= ∑j =1 ( j −1)π j = ∑j =1 jπ j − ∑j =1 π j

∞

= L −(1 −π0 ) = L − ρ

**λ Lq = = 1 − ρ µ( µ − λ) University The Hashemite
**

2 2

ρ

9

Little’s Formula I

• W is the expected waiting time in the system this includes the time in the line and the time in service. • Wq is the expected waiting time in the queue. • W and Wq can be found using the Little’s formula. (explain it!!)

L = λW Lq = λWq

L 1 W= = λ µ −λ

10

The Hashemite University

Little’s Formula II

• Let’s understand this formula using a simple example rather than proving it mathematically:

– Assume that every customer pays 1 dollar per unit time it stays in the system. – Also, assume that the customer will pay the total amount of dollars when leaving the system. – You want to calculate the total amount of dollars paid by all customers per unit time (which is equal to the number of customers currently in the system). – Remember each customer will stay in the system for W time units. – At equilibrium: flow in = flow out, also W reaches somehow a constant value (mean value). – So, λW = L (dollars = number of customers). – The same is applied for Wq.

The Hashemite University 11

**M/M/1 queuing model Summary
**

λ ρ= µ π 0 = P( N = 0) = (1 − ρ ) π n = P ( N = n)

= ρ (1 − ρ )

n

1 W= µ −λ

λ L = λW = µ −λ 1 λ Wq = W − = µ µ( µ − λ ) λ2 Lq = λWq = µ( µ − λ )

The Hashemite University

12

A Study of M/M/s Queues I

• There are s servers. • Customers arrive according to a Poisson process with rate λ, λ = λ, j ≥0 j • Service time for each entity is exponential with rate µ. • Let ρ = λ/sµ

µ0 = 0 µj = jµ, j ≤ s µ = sµ, j > s

The j Hashemite University

13

A Study of M/M/s Queues II

λ

λ

λ

λ

λ j-1

λ

λ

0

µ

1

2µ

2

.. .. s s-1 s+1 . . ( s − 1) µ sµ sµ

j

sµ

j+1

sµ

• Thus

( sρ ) πj = π0, j!

j j

j≤s

( sρ ) πj = π 0 , j = s, s + 1, s + 2,... j −s s! s

The Hashemite University

14

A Study of M/M/s Queues III

π0 =

1 ( sρ ) ( sρ ) ∑ j=0 j! + s!(1 − ρ )

s −1 j s

The Hashemite University

15

A Study of M/M/s Queues IV

• All servers are busy with probability

( sρ ) s P( j ≥ s) = ∑ π j = π0 s!(1 − ρ ) j=s

∞

• This probability is used to find L,Lq, W, Wq • The following table gives values of this probabilities for various values of ρ and s

The Hashemite University

16

The Hashemite University

17

M/M/s Queues Parameters

ρP ( j ≥ s ) Lq = 1−ρ

P( j ≥ s) Wq = = λ sµ − λ Lq

λ L = Lq + µ

P( j ≥ s) 1 W = = + = + λ λ µ sµ − λ µ L Lq 1

The Hashemite University 18

**M/M/s queuing system Needed for steady state
**

• Steady state occurs only if the arrival rate is less than the maximum service rate of the system

– Equivalent to traffic intensity ρ = λ/sµ < 1

**• Maximum service rate of the system is number of servers times service rate per server
**

The Hashemite University 19

A Study of M/M/1/c Queues I

• Customers arrive according to a Poisson process with rate λ. • The system has a finite capacity of c customers including the one in service. • There is only one server. • Service times are exponential with rate µ.

The Hashemite University 20

A Study of M/M/1/c Queues II

• The arrival rate is

λ j = λ, λ j = 0,

j ≤ c −1 j≥c

µ0 = 0 µ j = µ, j ≥ 1

1 −ρ π0 = c+ 1 1 −ρ

πj = ρ π0 , πj =0,

j

j ≤c j >c

The Hashemite University 21

**A Study of M/M/1/c Queues III
**

• L is the expected number of entities in the system.

ρ(1 −( c +1) ρ + cρ L= c+ 1 (1 − ρ )( 1 − ρ)

c

c+ 1

)

Lq = L − (1 −π0 )

ρ(1 − (c +1) ρ + cρ = c +1 (1 − ρ )(1 − ρ)

c

The Hashemite University

c +1

)

ρ(1 − ρ) − c +1 1−ρ

22

A Study of M/M/1/c Queues IV

• We shall use Little’s formula to find W and Wq. Note that:

– Recall that λ was the arrival rate. – But if there are c entities in the system, any arrivals find the system full, cannot “arrive”. – So, of the λ arrivals per time unit, some proportion are turned away. πc is the probability of the system being full. – So λ(1- πc) is the actual rate of arrivals.

The Hashemite University

23

A Study of M/M/1/c Queues V

L W= λ (1 − π c ) Wq = Lq

λ (1 − π c )

24

The Hashemite University

Notes

• In Kendall’s notations also you must specify the queue discipline (FCFS, LCFS, etc.). • If no discipline is specified as we have explored in this lecture then the discipline is FCFS by default. • M in Kendall’s notation refers exactly to Markovian which is the memoryless property of the exponential distribution. • Studying the queue behavior of non-markovian queues is very hard and sometimes there is no closed from solution for the different queue parameters.

The Hashemite University

25

What about Queuing Networks??? Do you have any idea!??

The Hashemite University

26

Queuing Networks I

• A queueing network is a collection of many queues with some paths between them. • In other words it is a multi-stage queue discipline. • Example:

C hildren and A dults C hildren

2

1

A dults

3

27

The Hashemite University

Queuing Networks II

• For a queueing network you may interested in:

– The whole network (or system): here you need to find closed form equations to describe the behaviour of the network. – or may be you are interested in one queue from it: here you can apply the previous equations we have studied, all what you is to define the correct value of both the arrival and service rates.

The Hashemite University

28

Example I

• Customers arrive at a fast food restaurant at a rate of 100 per hour and take 30 seconds to be served. • How much time do they spend in the restaurant?

- Service rate = µ = 60/0.5=120 customers per hour - W = 1/µ−λ = 1/(120-100) = 1/20 hrs = 3 minutes

**• How much time they will wait in line?
**

– Wq = W - 1/µ = 2.5 minutes

**• How many customers in the restaurant?
**

– L = λW = 5

**• What is the server utilization?
**

– ρ = λ/µ = 5/6

The Hashemite University 29

Example II

The Hashemite University

30

Example III

• You have the following queueing network of four M/M/1 queues labeled as 1, 2, 3, and 4. jobs arrive from outside at a rate of (job/hour) for both queues 1 and 2, jobs leaves queue 1 enters queue 3 as you see while jobs leaves from queue 2 and enter queue 3 with probability of 0.35 and enter queue 4 with probability of 0.65. Find all the performance parameters of queue 3 (i.e. given that average service time of this queue = 15 second.

The Hashemite University 31

**Example III … cont’d.
**

λ 1 0.3 5 λ

• Solution:

– On board.

The Hashemite University 32

3

2

0.6 5

4

Example IV

The Hashemite University

33

Example IV -- Solution

The Hashemite University

34

Example IV– Solution… cont

The Hashemite University

35

Example IV– Solution… cont

The Hashemite University

36

Additional Notes

• It is your task to find the source for this material. • This is the last lecture included in the first exam material.

The Hashemite University

37

- Acceptable Use
- ICDL
- PRESENT cipher
- Dragon Fly
- Flattened Butterfly
- High radix , and routing
- Introduction
- Database System Concepts and Architecture
- Relational Database Design by ER- and EER-to-Relational Mapping
- Advance SQL
- The Relational Data Model and Relational Database Constraints
- Data Modeling Using the Entity-Relationship (ER) Model
- DML and QL
- SQL difinition language
- Ch1
- Appendix a , sic/ex
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Engineering Ethics
- Light-Weight Encryption Processor Verilog Code

Sign up to vote on this title

UsefulNot useful- Lecture 8
- Lecture 11
- Lecture 4
- Lecture 5
- Tutorial 2 -- Chapter 9
- Tutorial 3 -- Chapter 9
- Lecture 2
- Lecture 1
- Lecture _10 -- Part 2
- Lecture _10 -- Part 1
- Lecture 3
- Tutorial 1 -- RNG Performance Tests
- Lecture 7
- Lecture 9
- 7 - Exercises on Queueing Theory
- Queue
- Radon Measure on Compact Topological Measurable Space
- lecture4
- birDeathVar
- Change-points
- SkipLists-1-1
- Single Server Bulk Queue with Second Optional Service, Balking and Compulsory Vacation
- lecture-static-color-04_005.pdf
- Ackermann
- dailyhw9solns
- borel
- All Pass Filter
- Lecture 4
- Heat Green
- Strange Limits HB
- Lecture 6