Module 7: Introduction to Queueing Theory (Notation, Single Queues, - - PowerPoint PPT Presentation

module 7 introduction to queueing theory notation single
SMART_READER_LITE
LIVE PREVIEW

Module 7: Introduction to Queueing Theory (Notation, Single Queues, - - PowerPoint PPT Presentation

Module 7: Introduction to Queueing Theory (Notation, Single Queues, Littles Result) (Slides based on Daniel A. Reed, ECE/CS 441 Notes, Fall 1995, used with permission) ECE/CS 441: Computer System Analysis Module 6, Slide 1 Outline of Section


slide-1
SLIDE 1

ECE/CS 441: Computer System Analysis

Module 6, Slide 1

Module 7: Introduction to Queueing Theory (Notation, Single Queues, Little’s Result)

(Slides based on Daniel A. Reed, ECE/CS 441 Notes, Fall 1995, used with permission)

slide-2
SLIDE 2

ECE/CS 441: Computer System Analysis

Module 6, Slide 2

Outline of Section on Queueing Theory

  • 1. Notation
  • 2. Little’s Result
  • 3. Single Queues
  • 4. Solutions for networks of queues - Product Form Results (on blackboard, not

slides)

  • 5. Mean value analysis (if time permits)
slide-3
SLIDE 3

ECE/CS 441: Computer System Analysis

Module 6, Slide 3

Queueing Theory Notation

  • Queuing characteristics

– Arrival process – Service time distribution – Number of servers – System capacity – Population size – Service discipline

  • Each of these is described mathematically

– Descriptions determine tractability of (efficient) analytic solution – Only a small set of possibilities are solvable using standard queueing theory

slide-4
SLIDE 4

ECE/CS 441: Computer System Analysis

Module 6, Slide 4

Arrival Processes

  • Suppose jobs arrive at times t1 , t2 , ... ,tj

– Random variables τj = tj - tj-1 are inter-arrival times – There are many possible assumptions for the distribution of the τj – Typical assumptions for the τj:

  • Independent
  • Identically distributed

– Many other possible assumptions:

  • Bulk arrivals
  • Balking
  • Correlated arrivals
  • For Poisson arrival, the inter-arrival times are:

– IID (independent and identically distributed) – exponentially distributed (i.e., CDF F(x) = 1 - e -x/a)

  • Other common arrival time distributions include

– Erlang, Hyper-exponential, Deterministic, General (with a specified mean and variance)

slide-5
SLIDE 5

ECE/CS 441: Computer System Analysis

Module 6, Slide 5

Other Queue Features

  • Service time

– Interval spent actually receiving service (exclusive of waiting time) – As with arrival processes, there are many possible assumptions – Most common assumptions are

  • IID random variables
  • exponential service time distribution
  • Number of servers

– Servers may or may not be identical – Service discipline determines allocation of customers to servers

  • System capacity

– Maximum number of customers in the system (including those in service) – May be finite or infinite

  • Population size

– Total number of potential customers – May be finite or infinite

slide-6
SLIDE 6

ECE/CS 441: Computer System Analysis

Module 6, Slide 6

Other Queue Features (Continued)

  • Service discipline

– The order waiting customers are serviced – Many possibilities, including

  • First-come-first-serve (FCFS), the most common
  • Last-come-first-serve (LCFS)
  • Last-come-first-serve preempt resume (LCFS-PR)
  • Round robin (RR) with finite quantum size
  • Processor sharing (PS) --- RR with infinitesimal quantum size
  • Infinite server (IS)

– Almost anything might be used, depending on the the total state of the queue – As expected, service discipline affects the nature of the stochastic process that represents the behavior of the queueing system

slide-7
SLIDE 7

ECE/CS 441: Computer System Analysis

Module 6, Slide 7

Queueing Discipline Specification

  • Queueing discipline is typically specified using Kendall’s notation (A/S/m/B/K/SD), where

– Letters correspond to six queue attributes

  • A: interarrival time distribution
  • S: service time distribution
  • m: number of servers
  • B: number of buffers (system capacity)
  • K: population size
  • SD: service discipline
  • Interarrival and service time specifiers

– M exponential – Ek Erlang with parameter k – Hk hyperexponential with parameter k – D deterministic – G general (any distribution, mean and variance used in the solution)

  • Bulk arrivals or service are denoted by a superscript

– M[x] denotes exponential arrivals with group size x – x is generally a random variable with separately specified distribution

  • Omitted specifiers assume certain defaults

– infinite buffer capacity – infinite population size – FCFS service discipline

slide-8
SLIDE 8

ECE/CS 441: Computer System Analysis

Module 6, Slide 8

Example Queueing Discipline Specifications

  • M/D/5/40/200/FCFS

– Exponentially distributed interarrival times – Deterministic service times – Five servers – Forty buffers (35 for waiting) – Total population of 200 customers – First-come-first-serve service discipline

  • M/M/1

– Exponentially distributed interarrival times – Exponentially distributed service times – One server – Infinite number of buffers – Infinite population size – First-come-first-serve service discipline

slide-9
SLIDE 9

ECE/CS 441: Computer System Analysis

Module 6, Slide 9

An Introductory Example

  • Given these descriptions, what are examples of their application?
  • Consider a typical bank

– 5 tellers – Customers form a single line and are serviced FCFS – Excluding a run on the bank, the waiting room is effectively infinite – For a large bank, the population is effectively infinite – Bulk arrivals are possible if friends arrive together for service

  • What about service time and inter-arrival time distributions?

– We can go measure them with a watch at the bank – Or, we can make mathematically simplifying assumptions – Latter is most common and exponential distribution is typical

  • Combining these facts and assumptions

– M/M/1 queue – As we shall see, the mean queue length (including one in service) for an M/M/1 queue is – Where

  • λ is the mean inter-arrival time
  • µ is the mean service time

! µ ! "

slide-10
SLIDE 10

ECE/CS 441: Computer System Analysis

Module 6, Slide 10

Notation and Basic “Facts”

  • Standard variable names

– τ is job interarrival time – λ = 1/E[τ] mean job arrival rate – s is service time per customer (job) – m is number of servers – µ = 1/E[s] is mean service rate per server – n = nq + ns is number of jobs in the system – nq is number of jobs waiting to receive service – ns is number of jobs in service – r is response time (service time plus queueing delay) – w is waiting time (queueing delay only)

  • System must be “stable” to have an interesting steady state solution

– Number of jobs in the system is finite – Requires the relation λ < mµ hold unless

  • the population is finite (queue length is bounded)
  • the buffer capacity is finite (arrivals are lost when queue is full)
  • (in these cases, system is always stable)
slide-11
SLIDE 11

ECE/CS 441: Computer System Analysis

Module 6, Slide 11

Notation and Basic “Facts”

  • Number of jobs in the system

– n = nq + ns (jobs are either waiting or in service) – – and, if the service rates are independent of queue length

  • Cov(nq,ns) = 0
  • Var[n] = Var[nq] + Var[ns]
  • Number and time

– r = w + s (response time is the sum of queueing delay and service) – – and, if the service rates are independent of queue length

  • Cov(w,s) = 0
  • Var[r] = Var[w] + Var[s]

E[n] = E[nq]+ E[ns] (or n = n

q + n s)

s w r s w r + = so , variables random are and , , but,

slide-12
SLIDE 12

ECE/CS 441: Computer System Analysis

Module 6, Slide 12

Little’s Law

  • Very important result -- Part of the queueing folk literature for the past century
  • Formal proof due to J. D. C. Little (1961)
  • Relates mean queue length to arrival rate and mean response time
  • Mathematically (in seady state),
  • Applies to any “black box” queue under the following assumptions

– System is work conserving – Number of jobs entering is same as number leaving (system is stable)

  • Also applies to any transient interval, without requirement that system be stable.
  • Note that these are very general conditions, and can apply for any system

(“black box”) in which customers leave and enter subject to the above constraints.

  • An intuitive proof...

n = !r

slide-13
SLIDE 13

ECE/CS 441: Computer System Analysis

Module 6, Slide 13

Little’s Law (Continued)

  • Sketch of proof (of steady-state case):

– During a long interval, arrivals ≈ departures (else no stability) – Area under the curve is total job time units – Mean queue length is average curve height (area/time) – Mean time in system is area/arrivals – Mean arrival rate is arrivals/time

  • A very general result:

– No assumptions about arrival or service processes – Holds for any queueing discipline (simply charge the area differently)

n r

jobs x time jobs x time time jobs Avg number in system Avg time in system jobs time

x

arrival rate

= (jobs x time)

slide-14
SLIDE 14

ECE/CS 441: Computer System Analysis

Module 6, Slide 14

Analysis of Single Queues

  • Plan:

– Start with one of the simplest queues, an M/M/1 – Model as a “birth-death” process – Generalize result to other types of queues

  • A birth-death process is a Markov process in which states are numbered a integers, and

transitions are only permitted between “neighboring” states.

  • Steady state solution of a birth death process (Kleinrock, Queueing Systems, vol. 1):

– (Theorem) steady state probability pn of being in state n is – where p0 is the probability of being in state 0

  • Now for a proof ...

pn = !0!1...! n"1 µ1µ2 ...µn p0 n = 1,2,..., #

slide-15
SLIDE 15

ECE/CS 441: Computer System Analysis

Module 6, Slide 15

Birth-Death (Steady-State) State Occupancy Proof

! = " = =

  • =

= # $ $ % & ' ' ( ) + = + + # =

  • #

= + # # + # + + + + # #

,..., 2 , 1 ... ... is... solution the And and ,... 3 , 2 , 1

  • r

) ( earlier) described solution process Markov (by state steady in the stable, If

1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1

n p p p p p j p p p p p p

n j j j n n n j j j j j j j j j j j j j j j

µ * µ µ µ * * * µ * µ * µ * µ µ * µ *

Flow balance at state j

slide-16
SLIDE 16

ECE/CS 441: Computer System Analysis

Module 6, Slide 16

Birth-Death (Steady-State) State Occupancy Proof, cont.

! " + = = !

  • #

= $ = + # = 1 1 1

1 1 have we 1 because Finally,

n n j j j j j

p p µ %

slide-17
SLIDE 17

ECE/CS 441: Computer System Analysis

Module 6, Slide 17

M/M/1 Queue Analysis

j i j i / M / M

j j

and all for

  • and

all for

  • process

death

  • birth

a

  • f

case special a is 1

i i

µ µ ! ! = =

  • (

)

! = " =

  • "

= + + + + = = =

  • !

= # # $ % & & ' ( =

  • !

,... , , n p ... p p p ,..., , n p p

n n n n n n

2 1 1

  • n

substituti By 1 1 1 and and intensity" traffic " the called is ratio the

  • n,

By traditi 2 1 tion simplifica By

2

) ) ) ) ) ) ) µ * ) µ *

slide-18
SLIDE 18

ECE/CS 441: Computer System Analysis

Module 6, Slide 18

M/M/1 Queue Analysis (Continued)

[ ] (

) ( )

[ ]

( ) ( ) ( )

! ! ! ! !

" = " = " = " = " =

= # =

  • #

= # $ $ % & ' ' ( ) # = # =

  • #

= # = =

  • =

#

  • n

j n j n j j n n n n n n

p n n E n ] n [ E n E ] n [ Var ) ( n np n n ] n [ E p U * * * * * * * * * * * * 1 system in the jobs more

  • r
  • f

y Probabilit 1 1 system in the jobs

  • f

number

  • f

Variance 1 1 ) (or length queue Mean 1 simply is

  • n

Utilizati

2 2 1 2 2 2 1 1

“almost” mean of a geometric random variable---factor out a rho first

slide-19
SLIDE 19

ECE/CS 441: Computer System Analysis

Module 6, Slide 19

M/M/1 Queue Analysis (Continued)

( )

[ ]

! ! µ " " µ " ! ! " "

! µ

# = $ # =

  • #

=

  • %

& # = # = = =

  • &

= # #

1 ) 1 ( ) (or queue in the jobs

  • f

number Mean 1 ) ( ...) homework as (show is time response

  • f

CDF as approaches time response the where 1 1 yields Law s Little' via ) (or time response Mean

2 1 ) 1 ( n n q q q r

p n n n n E e r F n r r n R r

slide-20
SLIDE 20

ECE/CS 441: Computer System Analysis

Module 6, Slide 20

M/M/1 Queue Example

5 2 1 1 time response mean

  • 5

1 4 6 1 system in the jobs

  • f

number mean

  • 6

5 3 n utilizatio

  • statistics

following the calculate can We 0.5 =

  • 0.3

=

  • queue

following he Consider t . . r r . . . n n . . . U U = = ! = = = ! = = = = =

  • "

µ # # µ " # µ "

slide-21
SLIDE 21

ECE/CS 441: Computer System Analysis

Module 6, Slide 21

M/M/1 Queue Example (Continued)

  • Consider changing λ

– hold µ fixed at 0.5 – examine changes in performance metrics

slide-22
SLIDE 22

ECE/CS 441: Computer System Analysis

Module 6, Slide 22

M/M/m Queues

  • M/M/m queues

– m servers rather than one server – Reasonable model of

  • a bank queue with multiple tellers
  • a shared memory multiprocessor
  • Assumptions

– m servers – All servers have the same service rate µ – Single queue for access to the servers – Arrival rate λ – Formally

  • What are the state occupancy probabilities?

!n = ! n = 0,1,..., " µn = nµ mµ # $ % n = 0,1,... m !1 n = m,m +1,..."

slide-23
SLIDE 23

ECE/CS 441: Computer System Analysis

Module 6, Slide 23

M/M/m Queues (Continued)

! ! " ! ! # $ =

  • %

= =

  • &

& 2 1 1 1

! ! have we , and the

  • f
  • n

substituti simple By ,..., 2 , 1 ... ... earlier s

  • ccupancie

y probabilit the

  • f

form general Recall

  • process

death

  • birth

another Just

  • ies

probabilit

  • ccupancy

State p m m p n p n p p

n m n n n n n j j n n n

µ ' µ ' µ ' µ µ µ ' ' ' 1 ,..., 2 , 1 ! = m n ! + = ,..., 1 ,m m n

slide-24
SLIDE 24

ECE/CS 441: Computer System Analysis

Module 6, Slide 24

M/M/m Queues (Continued)

  • r equivalently (with ! = " /(mµ))

pn = m!

( )

n

n! p0 !nmm m! p0 # $ % % & % %

  • And, because

pn

n= 0 '

(

=1 we have p0 = 1+ (m!)m m!(1) !) + (m!)n n!

n=1 m)1

(

* + ,

  • .

/

)1

! + = ,..., 1 ,m m n 1 ,..., 2 , 1 ! = m n

slide-25
SLIDE 25

ECE/CS 441: Computer System Analysis

Module 6, Slide 25

M/M/m Queues (Continued)

1 system in the jobs

  • f

number Mean yourself s derivation these do should You

  • etc.)

time, response n, utilizatio length, (queue measures standard" " the derive can We

  • queue,

M/M/1 for the that manner to similar a In ! !" ! # + = + =

  • m

n n n n

s q

slide-26
SLIDE 26

ECE/CS 441: Computer System Analysis

Module 6, Slide 26

M/M/m Queues (Continued)

( ) ( ) ( )

! " ! ! " µ # ! m mp np n n p m m p jobs m P m

m n n m n n s s m m n n

= $ + $ =

  • %

= $ = & = =

' = % = ' = 1 1

service in jobs

  • f

number Expected formula C s Erlang' as known also

  • queue

must job arriving an y probabilit the

  • is

that

  • bserve

1 ! where

slide-27
SLIDE 27

ECE/CS 441: Computer System Analysis

Module 6, Slide 27

M/M/m Queues (Continued)

! ! " # $ $ % & ' =

  • '

= ' = =

  • !

! " # $ $ % & ' + = = + =

  • q

w , r q r ) ( m n n n w w ) ( m n r s w r m m

q q s q

100 100 ln max time) waiting

  • f

percentile ( 1 again) law s (Little' time ng Mean waiti 1 1 1 law) s Little' apply (just time response Mean be must n utilizatio server individual

  • service

in jobs mean

  • servers
  • server

each

  • f
  • n

Utilizati ( ( ) µ ) * * ) ( µ * ) )

slide-28
SLIDE 28

ECE/CS 441: Computer System Analysis

Module 6, Slide 28

M/M/m Queue Example

  • Consider changing m

– hold λ and µ fixed – examine changes in performance metrics

  • Observations

– M/M/m queue has asymptote at – substantial performance gains with even two servers

! mµ

slide-29
SLIDE 29

ECE/CS 441: Computer System Analysis

Module 6, Slide 29

M/M/1 and M/M/m Queue Comparison

  • Which is better?
  • m queues each with an arrival rate !/m
  • one queue with m servers and an arrival rate of !
  • Suppose we use mean response time as our metric...
  • m M /M /1 queues

r = 1 µ " ! /m

  • one M /M /m queue

r = 1 µ 1+ # m 1" $

( )

% & ' ( ) * where # = ! /µ

( )

m

m! 1" ! / mµ

( )

( )

p0 and p0 = 1+ ! /µ

( )

m

m! 1" ! / mµ

( )

( )

+ ! /µ

( )

n

n!

n=1 m"1

+

,

  • .

. / 1 1

"1

slide-30
SLIDE 30

ECE/CS 441: Computer System Analysis

Module 6, Slide 30

Queueing Comparison

  • Consider the following

– service rate µ fixed at 4, divided evenly among m servers – fix λ =2 – m M/M/1 queues (arrival rate to each is λ/m) – One M/M/m queue (total arrival rate is λ) – Increase m

  • What happens to response time in both queues? Why?
slide-31
SLIDE 31

ECE/CS 441: Computer System Analysis

Module 6, Slide 31

Mean Response Time as function of m

slide-32
SLIDE 32

ECE/CS 441: Computer System Analysis

Module 6, Slide 32

Queueing Comparison

  • Consider the following

– service rate µ fixed at 2.1, divided evenly among m servers – varying λ (subject to stability constraint) – m M/M/1 queues (arrival rate to each is λ/m) – One M/M/m queue (total arrival rate is λ)

  • What happens as λ approaches 2.1? Why?
slide-33
SLIDE 33

ECE/CS 441: Computer System Analysis

Module 6, Slide 33

Mean Response Time as a Function of Arrival Rate

slide-34
SLIDE 34

ECE/CS 441: Computer System Analysis

Module 6, Slide 34

Extrapolation Scenarios

  • Given queueing formulae, standard questions include

– Performance measures for different parameters – Parameters values needed to satisfy a particular performance constraint

  • Examples:

– What is the mean response time if arrival rate doubles? – What is the mean queue length if service rate decreases by one third? – What is the number of servers for mean response time less than five minutes?

  • Approach:

– Plug and crank – Repeated solution with different parameter values

slide-35
SLIDE 35

ECE/CS 441: Computer System Analysis

Module 6, Slide 35

Extrapolation Scenarios (Continued)

( )

constraint this satisfies 3 here,

  • 3

such that

  • f

alue smallest v find

  • 4

3 for solve

  • minutes?

3 have to need we do processors many How seconds) (24.6 minutes 41 1 1 1 time response mean have we crank, and plug by and e jobs/minut 5.0 is rate arrival mean

  • processor)

(per e jobs/minut 4.0 is rate service mean

  • inspection

By seconds 12 is time al interarriv job mean

  • seconds

15 is time service job mean

  • )

processors (two system ssor multiproce

  • example

Concrete = < = <

  • =

! " # $ % & ' + =

  • m

. r m ,... , m . r . m r r ( ) µ

slide-36
SLIDE 36

ECE/CS 441: Computer System Analysis

Module 6, Slide 36

M/M/m/B Queues

  • Finite buffers

– no more than B jobs in total can be

  • queued
  • and in service

(i.e., total number of jobs in the system must be less than B) – jobs arriving when B jobs are present are discarded

  • More formally, this implies

and

  • Observations

  • r servers are wasted

– birth-death process – finite number of states

!n = ! n = 1,2,..., B "1 µn = nµ mµ ! " # n = 1,2,..., m !1 n = m,m +1,..., B B ! m

slide-37
SLIDE 37

ECE/CS 441: Computer System Analysis

Module 6, Slide 37

M/M/m/B Queues (Continued)

( )

( ) ( )

rates arrival effective

  • lengths

queue mean

  • time

response mean

  • compute

to ies probabilit

  • ccupancy

state the use can we Now, 1 1 1 is system in the jobs zero

  • f

y probabilit the Finally, because And, formula

  • ccupancy

state the Applying

1 1 1 1

  • !

" # $ % & + ' ' + = =

  • (

( ) ( ( * + = =

  • (

( ) ( ( * + =

  • '

' = + ' = '

, ,

m n n m m B B n n m n n n n m n n n n n

! n m ) ( ! m m p p p ! m m p ! n ) m ( p m p m ! m p ! n p

  • µ

.

  • µ

. µ . n = 1,2,..., m !1 n = m,m +1,..., B n = 1,2,..., m !1 n = m,m +1,..., B

slide-38
SLIDE 38

ECE/CS 441: Computer System Analysis

Module 6, Slide 38

M/M/m/B Queues (Continued)

( )

) p ( m ~ U U ) p ( n ~ n r ~ p p ~ ~ p ) m n ( n np n n

B B B B n n B m n n q B n n

! = = ! = = ! = =

  • !

= =

  • "

" "

! = + = =

1 is server each

  • f

n utilizatio the Finally,

  • law

s Little' by 1 is time response mean the entry, after lost not are jobs Because

  • rate

loss the is

  • difference

the and 1 available are buffers

  • nly when

system enter the jobs

  • than

less is rate arrival effective

  • space

by waiting d constraine are Arrivals queue in the number mean and service) plus (queue length queue Mean

1 1 1

# µ $ $ $ $ $ $ $ $ $ $

slide-39
SLIDE 39

ECE/CS 441: Computer System Analysis

Module 6, Slide 39

Other Queues

  • Other queues can be solved to varying degrees...
  • Exact solutions are possible for

– M/Er /1 (Erlangian service) – M/D/1 (special case of M/G/1) – M/M/1 with bulk arrivals (restricted cases)

  • Analysis is more difficulty for:

– G/M/1 – M/G/1 – G/G/1

slide-40
SLIDE 40

ECE/CS 441: Computer System Analysis

Module 6, Slide 40

M/G/1 Queues

  • M/G/1

– General service time distribution – Otherwise, similar to M/M/1 queues – The most complex, readily solvable single queue

  • Solution approach

– First, some additional mathematical machinery – Then, comparisons with M/M/1 queues

  • Service time distribution is general

– Service history matters – Denote service time already received by X0(t)

  • Arrival distribution is negative exponential

– Arrival history does not matter – But we do need to know the number of customers N(t) present – N(t) is non-Markovian because it depends on service time

  • State-space description

– States are [N(t), X0(t)] – Mixed discrete/continuous, two-dimensional description – Analysis via this method (supplementary variables) is ugly – Use the method of embedded Markov chains...

slide-41
SLIDE 41

ECE/CS 441: Computer System Analysis

Module 6, Slide 41

M/G/1 Queues (Continued)

  • What has changed from M/M/1?

– Two-dimensional state space – State space is now continuous (due to X0(t))

  • Ideally

– Convert [N(t), X0(t)] to one-dimensional N(t) – Implicitly specify remaining service duration X0(t)

  • How do we do this?

– Look only at selected points in time – Compute new metrics only at those points – Choose those points to implicitly carry X0(t) – departures instants make great choices

  • Remaining (residual) service X0(t) is zero!
  • At that instant, we can treat the behavior like a Markov chain
  • N(t) is the number of customers left behind
  • This is an embedded Markov chain; for details (see Kleinrock, vol. 1) but we

haven’t specified the distribution of departure instants

slide-42
SLIDE 42

ECE/CS 441: Computer System Analysis

Module 6, Slide 42

M/G/1 Queues (Continued)

  • A informal derivation follows (see Kleinrock vol. 1 for details)...
  • Notation

– Arrival rate λ (Poisson process) – General service time distribution

  • mean
  • variance
  • What is the expected time until a customer that arrives completes service?

– Mean time needed to service customers already waiting

  • Mean time is
  • Note that this is independent of the distribution of x

– plus the residual time for customer in service ...

  • Residual life requires yet another aside...

x n

q x

slide-43
SLIDE 43

ECE/CS 441: Computer System Analysis

Module 6, Slide 43

Residual Life

  • What is a “renewal”?

– Informally, a point where random variables which describe a model are memoryless given current state, with respect to past state.

  • Renewal example

– Consider a queue with general service distribution, and Poisson arrival process – Most time points are not renewal points, since remaining service time depends on service time completed. – However, times at which service completes are renewal points, since arrival process is Poisson.

  • Need to determine the residual lifetime of a customer in service:

– Denote this random variable as R – Distribution of R depends on

  • Distribution of original variable A (the service time distribution) at

its renewal point and some time expended after the renewal point

slide-44
SLIDE 44

ECE/CS 441: Computer System Analysis

Module 6, Slide 44

Residual Life (Continued)

( ) ( )

f f r not f f ) x ( f r not ds ) s ( a ) ( a ) A ( P ) ( a t a t t r R ) t ( r t A ) t ( a

e

t e e e e e

2 is lifetime residual mean

  • )

variance! the ( moment second

  • mean
  • pdf
  • riginal

the

  • f

moments first two

  • n the
  • nly

depends

  • proof)

without (claim lifetime residual Average domain discrete in the case

  • nly

the is

  • n

distributi geometric the

  • n

distributi l exponentia for the true was that this saw we

  • pdf

the changes knowledge short, in

  • helps

time expended about the knowing general, in

  • Intuition

1 is lifetime) residual (the

  • f

pdf the , then time expended has lifetime

  • riginal

the

  • variable)

(original

  • f

pdf the is

  • Suppose

2 2

=

  • !

= > = > = !

  • "

# # # # # #

slide-45
SLIDE 45

ECE/CS 441: Computer System Analysis

Module 6, Slide 45

Residual Life (Continued)

67 6 10 2 33 133 2 that notice

  • therwise

15 5 finally and 75 5 20 1 1 1 and

  • therwise

20 then units, time 5 for use in been has part the if

  • therwise

20 10 is mean value the suppose and

  • uniform

is time failure the

  • f

pdf the suppose

  • part)

(computer Example

2 15 1 5 20 1 20 1

. . f f r t ) t ( r . ds ) s ( b t t t ) t t ( b ) t ( b ) t ( b

e e e e e

= ! = = " # $ % + < = & = ! & = & " # $ % + < = + " # $ % < =

  • '

( ( (

Observe – pdf of residual time is not the same as the

  • riginal pdf

– Knowledge of past behavior changes the pdf – There are only two exceptions

  • negative exponential distribution

(continuous)

  • geometric distribution (discrete)
slide-46
SLIDE 46

ECE/CS 441: Computer System Analysis

Module 6, Slide 46

M/G/1 Queues (Continued)

) ( x r x x x r r , r x x x n r x x t plus x x n x

q q q q q q

! " ! " " ! ! # = + =

  • +

=

  • $

= $ $ $ $

  • 1

2 terms g rearrangin by and 2 so is interval this during arrivals

  • f

number Expected 2 is arrival new a for time waiting the items, Combining is service in customer a

  • f

y probabilit the service in is customer a assuming 2 is that this recall service in customer for time residual the

  • f
  • n

distributi the

  • f

t independen is that this note is mean time time service mean the denote let iting already wa customers service to needed mean time

  • service?

for wait to have arrival new a does long How

2 2 2 2

Little’s Law again!

slide-47
SLIDE 47

ECE/CS 441: Computer System Analysis

Module 6, Slide 47

M/G/1 Queues (Continued)

2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

1 1 1 : n) formulatio

  • riginal

(yields tion simplifica by and

  • time

service mean the is 1

  • time

service mean the

  • f

variance the is

  • and

variation

  • f

t coefficien the is where 1 2 1 and 1 2 1 1 math) e (verify th as expressed are and both Normally, 1 2 time response mean the yields time service mean the Adding 1 2 is is service receive to mean time the saw, just we As x x x x x x x C x C C ) ( ) C ( r ) ( ) C ( r r r ) ( x x r ) ( x r

s s s s q s q q

µ ! µ ! ! " µ # " µ # µ " # " # = = $ + = + = + = $ + = $ + + =

  • $

+ =

  • $

=

slide-48
SLIDE 48

ECE/CS 441: Computer System Analysis

Module 6, Slide 48

M/G/1 Queues (Continued) ( ) ( )

s s s s s s s

C C C ) ( ) ( ) ( n / D / M zero C ) ( ) ( n

  • ne

C ) ( C ) ( C r n ith linearly w grow values

  • time

response and length queue mean increases larger

  • ns

implicatio profound has

  • f

value The 2 2 1 1 2 1 queue) 1 (

  • n

distributi tic determinis for the is

  • before

knew we as 1 1 1 2 1 1 so

  • n,

distributi l exponentia negative for the is

  • it!

treasure it, remember it, learn

  • formula

(PK) Khinchin

  • Pollaczek

famous the is this

  • ns

Observatio 1 2 1 1 2 1 is system in the number mean the law, s Little' Via

2 2 2 2 2 2 2 2

  • !

" # $ % & ' ' = ' + + = ' = ' + = ' + + =

  • '

+ + = ' + + = =

  • (

( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( µ ) µ ) )

slide-49
SLIDE 49

ECE/CS 441: Computer System Analysis

Module 6, Slide 49

Queueing Comparison

  • Consider the following

– M/D/1 queue (Cs = 0) – M/M/1 queue (Cs = 1) – M/G/1 queue (Cs > 1)

slide-50
SLIDE 50

ECE/CS 441: Computer System Analysis

Module 6, Slide 50

Queueing Example

  • Consider the following

– arrival rate λ = 0.6 – service rate µ = 1.0 – M/D/1, M/M/1, and M/G/1 queues and compare mean response times

  • M/M/1
  • M/D/1
  • M/G/1 (Cs = 2.0)

r = 1 µ ! " = 1 1.0 ! 0.6 = 2.5 r = 1 µ + ! 1+ Cs

2

( )

2µ 2 1" #

( )

= 1 1.0 + 0.6(1+ 0) 2(1.0)(1" 0.6 /1.0) = 1.75 r = 1 µ + ! 1+ Cs

2

( )

2µ 2 (1" #) = 1 1.0 + 0.6(1+1) 2(1.0)(1" 0.6 /1.0) = 3.25

slide-51
SLIDE 51

ECE/CS 441: Computer System Analysis

Module 6, Slide 51

Queueing Example (Continued)

  • Consider M/M/1 and M/G/1 queues

– assume same arrival rates for both – desire same mean response times – must solve for ratio of service rates

  • M/M/1
  • M/G/1
  • Equating, we have
  • Let’s look at some numerical solutions...

r = 1 µm ! " r = 1 µg + ! 1+ Cs

2

( )

2µg

2 1" ! / µg

( )

1 µm ! " = 1 µg + " 1+ Cs

2

( )

2µg

2 1! " / µg

( )

slide-52
SLIDE 52

ECE/CS 441: Computer System Analysis

Module 6, Slide 52

M/G/1 via Embedded DTMC

slide-53
SLIDE 53

ECE/CS 441: Computer System Analysis

Module 6, Slide 53

M/G/1 via Embedded DTMC

slide-54
SLIDE 54

ECE/CS 441: Computer System Analysis

Module 6, Slide 54

M/G/1 via Embedded DTMC

slide-55
SLIDE 55

ECE/CS 441: Computer System Analysis

Module 6, Slide 55

M/G/1 via Embedded DTMC

slide-56
SLIDE 56

ECE/CS 441: Computer System Analysis

Module 6, Slide 56

Queueing Example (Continued)

  • Comparison Example (Continued)

– arrival rate λ = 0.6 – M/M/1 queue (service rate µm = 1.0) – M/G/1 queue (service rate µg)