Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University.

Similar presentations


Presentation on theme: "CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University."— Presentation transcript:

1 CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University

2 Goals for Today  Lean the most important queuing models  Single Queue: M/M/1  Multiple Queues: M/M/m  Multiple Servers: M/M/m/m

3 M/M/1 Queue 3 Poisson Arrivals, exponentially distributed service times, 1 server and infinite capacity buffer

4 M/M/1 Example M/M/1 Queue Poisson Arrivals (rate ), exponentially distributed service times (rate  ), one server, infinite capacity buffer. λ 01 μ λ 2 μ λ j-1 μ λ j μ μ λ λ μ Queue Server λ μ Click for Queue Simulator Queue Load

5 M/M/1 queue model 5  E[W] E[S] Xs E[X]

6 M/M/1 Queue: Steady State λ 01 μ λ 2 μ λ j-1 μ λ j μ μ λ λ μ Using the birth-death result λ j = λ and μ j = μ, we obtain Therefore for λ / μ = ρ <1 Probability that the Queue in Empty

7 M/M/1 Performance Metrics Server Utilization Throughput Expected Queue Length

8 M/M/1 Performance Metrics Average System Time Average waiting time in queue

9 Response Time vs. Arrivals 9

10 Stable Region CS352 Fall,2005 10 linear region

11 M/M/1 Performance Metrics Examples μ=0.5 Ε[Χ]Ε[Χ] Ε[W]Ε[W] Ε[S]Ε[S]

12 PASTA Property  PASTA: Poisson Arrivals See Time Averages Let π j (t)= Pr{ System state X(t)= j } Let a j (t)= Pr{ Arriving customer at t finds X(t)= j } In general π j (t) ≠ a j (t)!  Suppose a D/D/1 system with interarrival times equal to 1 and service times equal to 0.5 00.51.01.52.02.53.0 aaaa Thus π 0 (t)= 0.5 and π 1 (t)= 0.5 while a 0 (t)= 1 and a 1 (t)= 0!

13 Theorem For a queueing system, when the arrival process is Poisson and independent of the service process then, the probability that an arriving customer finds j customers in the system is equal to the probability that the system is at state j. In other words, Proof: Arrival occurs in interval (t, Δ t)

14 M/M/m Queue 14 Poisson Arrivals, exponentially distributed service times, m identical servers and infinite capacity buffer

15 M/M/m Queueing System Meaning: Poisson Arrivals, exponentially distributed service times, m identical servers and infinite capacity buffer. λ 01 μ λ 2 2μ2μ λ m mμmμ λ m+1 mμmμ 3μ3μ λ λ mμmμ 1 m …

16 M/M/m Queueing System Using the general birth-death result Letting ρ=λ/(mμ) we get To find π 0

17 M/M/m Performance Metrics Server Utilization

18 M/M/m Performance Metrics Throughput Expected Number of Customers in the System Using Little’s Law, the average response time Average Waiting time in queue

19 M/M/m Performance Metrics Queueing Probability Erlang C Formula

20 Example Suppose that customers arrive according to a Poisson process with rate λ=1. You are given the following two options,  Install a single server with processing capacity μ 1 = 1.5  Install two identical servers with processing capacity μ 2 = 0.75 and μ 3 = 0.75  Split the incoming traffic to two queues each with probability 0.5 and have μ 2 = 0.75 and μ 3 = 0.75 serve each queue. μ1μ1 λ Α μ2μ2 μ3μ3 λ Β μ2μ2 μ3μ3 λ C

21 Example Throughput It is easy to see that all three systems have the same throughput E[R A ]= E[R B ]= E[R C ]=λ Server Utilization Therefore, each server is 2/3 utilized Therefore, all servers are similarly loaded.

22 Example Probability of being idle For each server

23 Example Queue length and delay For each queue!

24 End of Chapter 24

25 M/M/∞ Queue 25

26 M/M/ ∞ Queueing System Special case of the M/M/m system with m going to ∞ λλ λ λ 01 μ 2 2μ2μ λ m mμmμ m+1 (m+1)μ 3μ3μ λ Let ρ=λ/μ then, the state probabilities are given by System Utilization and Throughput

27 M/M/ ∞ Performance Metrics Expected Number in the System Using Little’s Law No queueing! Number of busy servers

28 M/M/1/K – Finite Buffer Capacity Meaning: Poisson Arrivals, exponentially distributed service times, one server and finite capacity buffer K. Using the birth-death result λ j =λ and μ j =μ, we obtain Therefore for λ/μ = ρ λ 01 μ λ 2 μ λ K-1 μ λ K μ μ λ

29 M/M/1/K Performance Metrics Server Utilization Throughput Blocking Probability Probability that an arriving customer finds the queue full (at state K )

30 M/M/1/K Performance Metrics Expected Queue Length System time Net arrival rate (no losses)

31 M/M/m/m – Queueing System Meaning: Poisson Arrivals, exponentially distributed service times, m servers and no storage capacity. Using the birth-death result λ j =λ and μ j =μ, we obtain Therefore for λ/μ = ρ λ 01 μ λ 2 2μ2μ λ m-1 (m-1)μ λ m mμmμ 3μ3μ λ

32 M/M/m/m Performance Metrics Throughput Blocking Probability Probability that an arriving customer finds all servers busy (at state m ) Erlang B Formula

33 M/M/1//N – Closed Queueing System Meaning: Poisson Arrivals, exponentially distributed service times, one server and the number of customers are fixed to N. NλNλ 01 μ (N-1)λ 2 μ 2λ2λ N-1 μ λ N μ μ (N-2)λ λ μ 1 N … Using the birth-death result, we obtain

34 M/M/1//N – Closed Queueing System Response Time  Time from the moment the customer entered the queue until it received service. NλNλ 01 μ (N-1)λ 2 μ 2λ2λ N-1 μ λ N μ μ (N-2)λ For the queue, using Little’s law we get, In the “thinking” part, Therefore


Download ppt "CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University."

Similar presentations


Ads by Google