Presentation is loading. Please wait.

Presentation is loading. Please wait.

M/G/1 Queue & Renewal Reward Theory

Similar presentations


Presentation on theme: "M/G/1 Queue & Renewal Reward Theory"— Presentation transcript:

1 M/G/1 Queue & Renewal Reward Theory

2 The M/G/1/FCFS Queue Poisson arrivals of rate λ, single server of rate μ, FCFS service order, general service time distribution When job arrives, its queueing time is sum of service times of other queued jobs, if any, and the excess/residual service time of the job in service, if any E[TQ] = E[NQ]E[S] + ρE[Se] = E[TQ]λE[S] + ρE[Se] Note 1: We have used the fact that the service times of jobs in the queue are all independent, and PASTA to argue that an arrival saw NQ jobs in the queue and the server busy with probability ρ Note 2: Se is the remaining service time given that there is a job in service  E[TQ] = E[Se]ρ/(1- ρ) So we need to compute E[Se] μ Poisson(λ) FCFS General

3 Excess Time Examples Exponential service time with mean 1/μ
Excess time is 1/μ because of the memoryless property of the exponential distribution Constant service time of duration 1/μ Excess times is 1/2μ since service time is sampled uniformly in [0,1/μ] k-phase Erlang service time, where each phase has mean duration of 1/kμ All stages are equally likely, so on average will arrive during “middle” stage, i.e., stage (k+1)/2, and the remaining time in each stage is 1/kμ

4 Renewal-Reward Theory
Recall that for a renewal process with mean time between renewals E[X], we have N(t)/t  1/E[X], as t  ∞, where N(t) is the number of renewals by time t Renewal-reward theorem Given a renewal process with i.i.d. renewals of finite mean duration E[X], and i.i.d. rewards accumulated during each renewal with finite mean E[R]  0 (rewards can and often depend on length of renewal interval) R(t)/t  E[R]/E[X], as t  ∞, where R(t) is the total reward earned by time t Average rate a which reward is earned is the ratio of the average reward per cycle and the average cycle duration

5 Renewal Reward & Excess Time
Se(t) Average excess time assuming a busy server (there is a job in service) E[Se] = lims∞[∫{0 to s}Se(t)dt]/s Define total reward accumulated by time s as: R(s) = ∫{0 to s}Se(t)dt So the time-average reward E[R] = E[Se], but by the Renewal-Reward Theorem, E[R] is the ratio of the average reward in one cycle (service time) and the average cycle time (E[S]) Reward in one cycle of duration s = ∫{0 to s}(s-t)dt = s2/2 Average reward in one cycle = E[S2]/2 Hence, we have E[R] = E[Se] = E[S2]/2E[S]

6 Application to M/G/1 Queue
Recall that we have E[TQ] = E[Se]ρ/(1- ρ) Pollaczek-Khinchin (P-K) formula E[TQ] = ρ/(1- ρ)E[S2]/2E[S] = λE[S2]/2(1- ρ) E[T] = E[TQ] + E[S] E[NQ] = λ2E[S2]/2(1- ρ) E[N] = λ2E[S2]/2(1- ρ) + ρ

7 Examples - E[TQ] = λE[S2]/2(1- ρ)
M/M/1 Queue (E[S2] = 2/μ2) E[N] = 2λ2/2μ2(1–ρ)+ρ = ρ2/(1–ρ)+ρ = (ρ2+ρ–ρ2)/(1–ρ) = ρ/(1–ρ) E[T] = 2λ/2μ2(1–ρ)+1/μ = 1/μ[ρ/(1–ρ)+1] = 1/μ[1/(1–ρ)] = 1/(μ–λ) M/D/1 Queue (E[S2] = 1/μ2) E[N] = λ2/2μ2(1–ρ)+ρ = ρ2/2(1–ρ)+ρ = (ρ2+2ρ–2ρ2)/2(1–ρ) = ρ(2–ρ)/2(1–ρ) E[T] = λ/2μ2(1–ρ)+1/μ = 1/μ[ρ/2(1–ρ)+1] = 1/μ[(2–ρ )/2(1–ρ)] M/E2/1 Queue (E[S2] = 2/μ2 +1/μ2)


Download ppt "M/G/1 Queue & Renewal Reward Theory"

Similar presentations


Ads by Google