performance models- representation and analysis methods

31
Chapter six Performance Models- Repr esentation and Analysis methods

Upload: tesfahun-girma

Post on 03-Jun-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 1/31

Chapter six

Performance Models- Representation and

Analysis methods

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 2/31

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 3/31

1. Queuing notation• Queue

 – banks, – machine shop,

 – airline reservation systems etc

• Optimization of – waiting time, – queue length,

 – service to those in queue

• Ideal system –  – no queue and – no idle time

• Objective of queuing system- – optimization of queue and wait time

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 4/31

2. Rules for all queues

• Customers arrive at a constant or variable rate

• Customers are to be served at constant or

variable rate

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 5/31

Symbols used

• State of system- number of customers in queuingsystem ( queue and server)

• Queue length – number of customers waiting forservice to begin

• N(t) – number of customers in queuing system at time t• Pn(t)- probability of n customers in queue

• S- number of servers

•   n - mean arrival rate of new customers when n

customers are in system•   n- mean service rate for overall system when n

customers are in system

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 6/31

Classification of queuing systems

• Queuing systems are classified based on

 – Calling source – 

•  the population from which customers are drawn.

 –

The input or arrival process – • distribution of number of arrivals per unit time,

• the number of queues that are permitted to be formed,

•  the maximum queue length,

• maximum number of customers desiring service

 – The service process – 

• time allotted to serve customers,

• number and arrangement of servers,

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 7/31

Assumptions

• Successive arrivals are independent

• Long term inter arrival time constant exist

The probability of an arrival taking place intime t is proportional to t

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 8/31

Principles of queuing theory

• Two statistical properties –probability distributionof inter arrival times and probability distributionof service time

• Example: – FIFO service

 – Random arrivals• In a given interval of time, only one customer is expected to

come

•Arrival with Poisson distribution

 – Steady state

X= Number of arrival per unit timex- number of customers per

unit time

 Average arrival per time

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 9/31

Principles of … 

• Poisson arrival patter means inter arrival time

is exponential with the same mean  

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 10/31

Example: gas filling station

• Car arrival rate 5 minutes between arrival

• Cars arrive according to Poisson process withmean 12cars/hr

• Probability distribution of number of arrivals perhour is

• Distribution of time between two arrivals isexponential

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 11/31

Arrival of K customers at a time

• General Poisson distribution formula

• Where f(t) is given by

• Arrival time – exponential• Number of arrivals – Poisson

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 12/31

Assumptions for service time

• Similar assumptions as of arrival

 – Statistical independence of successive servicing

 – Long term constant for service time

 – Probability of completion is proportional to t

• Exponential service time

Where v is long term average service time

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 13/31

Arrival-service model

• Assumptions used

 – Arrival is random

 – Arrival from single queue

 – FIFO

 – Departure is random

 – Probability of arrival in t is t

 – Probability of departure in t is t

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 14/31

• Probability of being busy

• Average number of customers in servicefacility is  

• Probability of no waiting time is (1-)

Probability of – 1 customer arriving no customer departing in t

 – 1 customer arriving and 1 customer departing in

t

 – No customer departing and no customer arriving

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 15/31

Other performance metrics

• Average number of customers at time t

Probability of n customers in the system

• Probability of n customers in queue

• Average number of customers in queue

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 16/31

Performance cont… 

• Average time a customer spends in system

• Average time a customer spends in queue

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 17/31

Example: customers arrive in bank according to

Poisson process

• Mean inter arrival is 10 minutes

• Average service time in counter 5 minutes

A) what is the probability that customer will not wait

B) what is the expected number of customers in bank

C) how much time is a customer expected to wait in the bank

=6 =12a) b) c)

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 18/31

3. Little’s law 

• Is an important tool for verifying queuing

simulations

• Used to determine average number of

customers in system

• It states that

Where

average time a job spends in the system

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 19/31

Stochastic process

• Generating stochastic process is generation of

sequence of variates with probability distribution

•  IID process generation

 – Generation is similar

 – Steps

• 1) determine the seeds for the RNG

• 2) generate random numbers using each seed

• 3) using the CDF of the given distribution, find the inverse

and generate the random sequence elements

• 4) repeat the steps until the required number is obtained

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 20/31

Non IID stochastic process

• Processes should have temporal relations

• Relation is expressed in form of joint

distribution

• Defining temporal relation is difficult

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 21/31

5. Analysis of single queue: birth death

process, M/M/1, M/M/2, M/M/m, M/M/, M/M/m/B

• Kendall’s notation

• V/W/X/Y/Z

 – V arrival pattern ( D or M for deterministic or

exponential respectively)

 – W service pattern

 – X number of servers (take infinity if not specified )

 – Y system capacity

 – Z queue discipline(FIFO, LIFO) 

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 22/31

Simulation of M/M/1/ 

• Simulate an M/M/1/   system with mean arrival rate of 10

per hour and the mean service rate as 15 per hour for asimulation run of 3 hour. Determine the average customer

waiting time, percentage idle time of the server, maximum

length of the queue and average length of queue

• Average customer waiting time

• Average length of queue

min12hr 2.01015

11s  

3

4

15

10

5

10ALQ  

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 23/31

Result obtained using simulation

program

• Exponential arrival and service time is used

 – r=rand()/32768

 – Iat=(-1./mue)*log(1-r)

• Time is counted in minutes• For a single run

 – Number of arrivals=50

 – Average waiting time=30.83minutes – Average server idle time=2.46

 – Maximum queue length=16

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 24/31

Single queue multiple servers

M/M/s/ 

• Let

 – s denote number of servers in system

 – Each server provides service at the same rate

 – Average arrival rate for all n customers is same

 – <s 

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 25/31

M/M/s/ analysis cont… 

• For n busy servers, the over all service rate is

• Probability that there are (n+1) customers is

given by( n>s)

• Where

• (n-s) customers are waiting

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 26/31

M/M/s/ analysis cont… 

• Probability that all servers are busy is

 –  probability that n s

 – This is given by

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 27/31

M/M/s/ cont… 

• Average length of queue

=

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 28/31

Example – 2 server M/M/2/ 

• In a service station with two servers,

customers arrive at an average rate of 10 per

hour. The service rate of each server is 6

customers/hour.

• Determine

 – A) the fraction of time that all servers are busy

 – B) average number of customers waiting

 – C) average waiting time

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 29/31

• Soln.

• Servers will be busy if there are n>2 customers

• P(n2 )is then

•  where Po is

• Then P(n 2)

2s

hr /6

hr /10

  = = 0.79

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 30/31

Analysis using simulation M/M/2/3

• 2 servers

• Maximum capacity of 3

• Exponential arrival and service time

0 9 13 22 26 33

10 7 12 20 15 15

arrival Server 1 Server 2

cust idle service wait idle service wait

0 0 10 0

9 - - - 9 7 0

13 3 12 0 - - -

22 - - - 6 20 0

26 1 15 0 - - -

8/12/2019 Performance Models- Representation and Analysis Methods

http://slidepdf.com/reader/full/performance-models-representation-and-analysis-methods 31/31

Exercise

• Write a simulation program to analyze an

M/D/2/3 system

 – Exponential arrival with mean 3 minutes

 – 2 servers and maximum capacity of 3

 – Service time is deterministic with 5 and 7 minute

service time respectively

 – Simulate system for 1 hour and determine• Idle time of servers

• Waiting time of customers