1 / 40

Queueing Theory (Delay Models)

Queueing Theory (Delay Models). M/M/1 queueing system. Arrival statistics: stochastic process taking nonnegative integer values is called a Poisson process with rate λ if A(t) is a counting process representing the total number of arrivals from 0 to t

ashton
Télécharger la présentation

Queueing Theory (Delay Models)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Queueing Theory (Delay Models)

  2. M/M/1 queueing system • Arrival statistics: stochastic process taking nonnegative integer values is called a Poisson process with rate λ if • A(t) is a counting process representing the total number of arrivals from 0 to t • arrivals are independent • probability distribution function

  3. M/M/1 queueing system P[1 arrival and no departure in δ]= where the arrival and departure processes are independent

  4. M/M/1 queueing system • Global balance equation

  5. M/M/1 queueing system from Then • Average number of customers in the system

  6. M/M/1 queueing system • Average delay per customer (waiting time + service time) by Little’s theorem • Average waiting time • Average number of customer in queue • Server utilization

  7. M/M/1 queueing system • example 1/λ=4 ms, 1/μ=3 ms

  8. תרגיל • חבילת מידע מגיעה למערכת כל K שניות. לכל החבילות גודל זהה, והן דורשות K שניות למשלוח. זמן העיבוד של כל חבילה במערכת הוא P שניות. מהו מספר החבילות במערכת?

  9. פתרון Arrival rate: =1/K Time in the system: T=K+P Applying Little’s theorem: N= T = +P/K Though the process is deterministic, and N(t) does not converge to any value, N is well defined, interpreted as the time average

  10. תרגיל • קצב הגעה למערכת הוא *n • קצב השרות הוא *n • א. שרטט את דיאגרמת המצבים • ב. מצא את הסתברויות הסטציונרות • ג. מצא את מספר הצרכנים הממוצע במערכת במצב היציב • ד. מצא את זמן ההשהייה הממוצע במערכת באמצעות משפט LITTLE

  11. פתרון • א • ב

  12. פתרון • ג • ד

  13. תרגיל • צומת ברשת משתמש בשיטת הניתוב הבאה: כאשר חבילה מגיעה אליו ללא תלות ביעדה הוא מפנה אותה לקו יציאה אם התור לקו זה הוא ריק ולא נשלחת ברגע זה שום חבילה דרך קו זה. אחרת מופנית חבילה זו דרך קו אחר כלשהו. נניח כי מופע ההודעות לצומת הוא פואסוני עם  אורך החבילות מתפלג אקספוננצילי עם  וקיבולת הקו היא C. א. איזה חלק מהחבילות מגיעות דרך הקו העדיף ? ב.אם הוחלט להצמיד תור לקו המהיר, מה אורכו המינימלי של התור כך שההסתברות שחבילה תשודרנה בקו זה תהיה לפחות 0.9 בהנחה ש ? (האם המערכת במצב יציב?)

  14. פתרון א Message Length: Transmission Rate: Transmission Time: Service Rate:

  15. פתרון • ב

  16. M/M/1 Example I Traffic to a message switching center for one of the outgoing communication lines arrive in a random pattern at an average rate of 240 messages per minute. The line has a transmission rate of 800 characters per second. The message length distribution (including control characters) is approximately exponential with an average length of 176 characters. Calculate the following principal statistical measures of system performance, assuming that a very large number of message buffers are provided: Queueing Theory

  17. M/M/1 Example I (cont.) • (a) Average number of messages in the system • (b) Average number of messages in the queue waiting to be transmitted. • (c) Average time a message spends in the system. • (d) Average time a message waits for transmission • (e) Probability that 10 or more messages are waiting to be transmitted. Queueing Theory

  18. M/M/1 Example I (cont.) • E[s] = Average Message Length / Line Speed = {176 char/message} / {800 char/sec} = 0.22 sec/message or • m = 1 / 0.22 {message / sec} = 4.55 message / sec • l = 240 message / min = 4 message / sec • r = l E[s] = l / m = 0.88 Queueing Theory

  19. M/M/1 Example I (cont.) • (a) N= r / (1 - r) = 7.33 (messages) • (b) Nq = r2 / (1 - r) = 6.45 (messages) • (c) W = E[s] / (1 - r) = 1.83 (sec) • (d) Wq = r× E[s] / (1 - r) = 1.61 (sec) • (e) P [11 or more messages in the system] = r11 = 0.245 Queueing Theory

  20. M/M/1 Example II A branch office of a large engineering firm has one on-line terminal that is connected to a central computer system during the normal eight-hourworking day. Engineers, who work throughout the city, drive to the branch office to use the terminal to make routine calculations. Statistics collected over a period of time indicate that the arrival pattern of people at the branch office to use the terminal has a Poisson (random) distribution, with a mean of 10 people coming to use the terminal each day. The distribution of time spent by an engineer at a terminal is exponential, with a Queueing Theory

  21. M/M/1 Example II (cont.) mean of 30 minutes. The branch office receives complains from the staff about the terminal service. It is reported that individuals often wait over an hour to use the terminal and it rarely takes less than an hour and a half in the office to complete a few calculations. The manager is puzzled because the statistics show that the terminal is in use only 5 hours out of 8, on the average. This level of utilization would not seem to justify the acquisition of another terminal. What insight can queueing theory provide? Queueing Theory

  22. M/M/1 Example II (cont.) • {10 person / day}×{1 day / 8hr}×{1hr / 60 min} = 10 person / 480 min = 1 person / 48 min ==> l = 1 / 48 (person / min) • 30 minutes : 1 person = 1 (min) : 1/30 (person) ==> m = 1 / 30 (person / min) • r = l / m = {1/48} / {1/30} = 30 / 48 = 5 / 8 Queueing Theory

  23. M/M/1 Example II (cont.) • Arrival Rate l = 1 / 48 (customer / min) • Server Utilization r = l / m = 5 / 8 = 0.625 • Probability of 2 or more customers in system P[N ³ 2] = r2 = 0.391 • Mean steady-state number in the system L = E[N] = r / (1 - r) = 1.667 • S.D. of number of customers in the system sN = sqrt(r) / (1 - r) = 2.108 Queueing Theory

  24. M/M/1 Example II (cont.) • Mean time a customer spends in the system W = E[w] = E[s] / (1 - r) = 80 (min) • S.D. of time a customer spends in the system sw = E[w] = 80 (min) • Mean steady-state number of customers in queue Nq = r2 / (1 - r) = 1.04 • Mean steady-state queue length of nonempty Qs E[Nq | Nq > 0] = 1 / (1 - r) = 2.67 • Mean time in queue Wq = E[q] = r×E[s] / (1 - r) = 50 (min) Queueing Theory

  25. M/M/1 Example II (cont.) • Mean time in queue for those who must wait E[q | q > 0] = E[w] = 80 (min) • 90th percentile of the time in queue pq(90) = E[w] ln (10 r) = 80 * 1.8326 = 146.6 (min) Queueing Theory

  26. M/M/m, M/M/m/m, M/M/∞ • M/M/m (infinite buffer) • detailed balance equations in steady state

  27. M/M/m where From

  28. M/M/m • The probability that all servers are busy - Erlang C formula • expected number of customers waiting in queue

  29. M/M/m • average waiting time of a customer in queue • average delay per customer • average number of customer in the system by Little’s theorem

  30. M/M/s Case Example I Find p0 Queueing Theory

  31. M/M/s Case Example I (cont.) = 0.429 (@ 43% of time, system is empty) as compared to m = 1: P0 = 0.20 Queueing Theory

  32. M/M/s Case Example I (cont.) • Find W • Wq = Lq / l = 0.152 / (1/10) = 1.52 (min) W = Wq + 1 / m = 1.52 + 1 / (1/8) = 9.52 min) • What proportion of time is both repairman busy? (long run) P(N ³ 2) = 1 - P0 - P1 = 1 - 0.429 - 0.343 = 0.228 (Good or Bad?) Queueing Theory

  33. M/M/∞ • M/M/∞: The infinite server case • The detailed balance equations Then

  34. M/M/m/m • M/M/m/m : The m server loss system • when m servers are busy, next arrival will be lost • circuit switched network model

  35. M/M/m/m • The blocking probability (Erlang-B formula)

  36. Moment Generating Function

  37. Discrete Random Variables

  38. Continuous Random Variables

More Related