Docsity

Queuing Systems Part 1-System Networking-Lecture Slides, Slides of Computer Networks

Partial preview of the text

Download Queuing Systems Part 1-System Networking-Lecture Slides and more Slides Computer Networks in PDF only on Docsity!

Lecture 14 – Queuing

Systems

Topics

• Basic structure and components

• Performance measures

• Steady-state analysis and Little’s law

• Birth-death processes

• Single-server and multi-server examples

• Flow balance equations

Input source

Queue Service mechanism

Arriving customers

Exiting customers

Structure of Single Queuing Systems

Note

  1. Customers need not be people; other possibilities include parts, vehicles, machines, jobs.
  2. Queue might not be a physical line; other possibilities include customers on hold, jobs waiting to be printed, planes circling airport.

System Arrival Process Service Process

Bank Customers Arrive Tellers serve customers

Pizza Orders are phoned Orders are driven to parlor in customers

Blood Pints of blood arrive Patients use up bank via donation pints of blood

Shipyard Damaged ships sent Ships are repaired to shipyard for repair & return to sea

Printers Jobs arrive from Documents are computers printed

Queuing Applications

What is the ...

  1. average number of customers in the system?
  2. average time a customer spends in the system?
  3. probability a customer is rejected?
  4. fraction of time a server is idle?

These questions are aimed at characterizing complex systems. Analyses used to support decision-making.

Typical Performance Questions

In queuing (and most analyses of complex stochastic systems), design takes the form of asking “what if ” questions rather than trying to optimize the design.

Multiple Servers, Multiple Queues

What is average wait in the queue? What is average time in the system?

N ( t ) = # of customers in the system at time t  0

Pk ( t ) = probability exactly k customers in system at time t , given # in system at time 0

s = # of parallel servers

 k = mean arrival rate

(expected # of arrivals per unit time)

 k = mean service rate

(expected # of departures per unit time)

(Both  k and  k assume k customers are in system)

Notation and Terminology

Notation for Steady-State Analysis

p k = probability of having exactly k customers in the

system

L = expected number of customers in the system

Lq = expected queue length (doesn’t include those being served)

W = expected time in system, including service time

Wq = expected waiting time in the queue (doesn’t include service)

For any queuing system that has a steady state

and has an average arrival rate of ,

L =  W

For example, if the average waiting time is 2 hours and customers arrive at a rate of 3 per hour then, on average, there are 6 customers in the system.

Similarly, Lq =  Wq

If  k =  for all k  1 then W = Wq + 1/ 

(1/  is the mean

service time here)

Little’s Law

Applications in a variety of areas, but in queuing “birth” refers to the arrival of a customer while “death” refers to the departure of a customer.

Recall, N ( t ) = # of customers in the system at time t.

Assumptions

  1. Given that N ( t ) = k , the pdf governing the remaining time until the next birth (arrival) is

exp(  k ) k = 0, 1, 2,...

  1. Given that N ( t ) = k , the pdf governing the remaining time until the next death

(service completion) is exp(  k ) k = 1, 2,...

  1. All random variables are assumed to be independent.

Birth and Death Processes

We will investigate steady-state (not transient) results for birth-death processes based on the

Expected rate in = Expected rate out principle

 1

3  2  3

 0  1  2 0 1 2

Let p k = steady-state probability of being in state k.

Transition Rate Diagram

p 1 =

 0  1 p^0 p^2 =

 1  2 p^1 +^

1  2 (^1 p^1 –^ ^0 p^0 )^ =

 1  2 p^1 =

 1  0  2  1

p 0

Thus p k = Ck p 0 , k = 1, 2,... and S k p k = 1

so (C 0 + C 1 + C 2 + • • • ) p 0 = 1 or p 0 = 1 / (1 + S k Ck )

1 0 0 1 1

k k k k k

p p

 

1 0 0 1 1

Let (^) k k^ k , 1,... and let 1 k k

C k C

 

Once we have calculated the p k ’s we can find:

L = S k p k = expected # of customers in the system

Lq = S ( k–s ) p k = expected # of customers in queue

Ls = L – L q = expected # of customers in service

 = S  k p k = average (effective) arrival rate

E = Ls / s = efficiency of system (utilization)

k =

Some Steady-State Results

k = s +

k= 0

Determining System Characteristics

What is the probability that all servers are idle?

Pr{all servers idle} = p 0 = 0.

What is the probability that a customer will not have to wait?

Pr{no wait} = p 0 + p 1 + p 2 = 0.

What is the probability that a customer will have to wait?

Pr{wait} = 1 – Pr{no wait} = 0.

What is the probability that a customer balks?

Pr{customer balks} = p 6 = 0.

Steady-State Measures for Example

Expected number in queue:

Lq = 1 p 4 + 2 p 5 + 3p 6 = 0.

Expected number in service:

Ls = p 1 + 2 p 2 + 3(1 – p 0 – p 1 – p 2 ) = 2.

Expected number in the system:

L = Lq + Ls = 2.

Efficiency of the servers:

E = Ls / s = 2.244 / 3 = 0.748 or 74.8%