1 Queueing Theory Frank Y. S. Lin Information Management Dept. National Taiwan University

Slides:



Advertisements
Similar presentations
UNIT-II Queuing Theory
Advertisements

Introduction to Queuing Theory
1 Chapter 8 Queueing models. 2 Delay and Queueing Main source of delay Transmission (e.g., n/R) Propagation (e.g., d/c) Retransmission (e.g., in ARQ)
Cheng-Fu Chou, CMLab, CSIE, NTU Basic Queueing Theory (I) Cheng-Fu Chou.
Discrete Time Markov Chains
TCOM 501: Networking Theory & Fundamentals
Lecture 13 – Continuous-Time Markov Chains
Queueing Model 박희경.
Model Antrian By : Render, ect. Outline  Characteristics of a Waiting-Line System.  Arrival characteristics.  Waiting-Line characteristics.  Service.
System Performance & Scalability i206 Fall 2010 John Chuang.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
TCOM 501: Networking Theory & Fundamentals
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
Waiting Line Management
Lecture 11 Queueing Models. 2 Queueing System  Queueing System:  A system in which items (or customers) arrive at a station, wait in a line (or queue),
1 TCOM 501: Networking Theory & Fundamentals Lectures 9 & 10 M/G/1 Queue Prof. Yannis A. Korilis.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
Queueing Theory.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.

Introduction to Queuing Theory
Eurecom, Sophia-Antipolis Thrasyvoulos Spyropoulos / Introduction to Continuous-Time Markov Chains and Queueing Theory.
Queueing Theory Models Training Presentation By: Seth Randall.
Queueing Theory I. Summary Little’s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems  M/M/1  M/M/m  M/M/1/K  …
Network Analysis A brief introduction on queues, delays, and tokens Lin Gu, Computer Networking: A Top Down Approach 6 th edition. Jim Kurose.
Introduction to Queuing Theory
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
CS433 Modeling and Simulation Lecture 13 Queueing Theory Dr. Anis Koubâa 03 May 2009 Al-Imam Mohammad Ibn Saud University.
 Birth Death Processes  M/M/1 Queue  M/M/m Queue  M/M/m/B Queue with Finite Buffers  Results for other Queueing systems 2.
Introduction to Operations Research
Introduction to Queueing Theory
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
Queueing Theory What is a queue? Examples of queues: Grocery store checkout Fast food (McDonalds – vs- Wendy’s) Hospital Emergency rooms Machines waiting.
1 Queuing Models Dr. Mahmoud Alrefaei 2 Introduction Each one of us has spent a great deal of time waiting in lines. One example in the Cafeteria. Other.
TexPoint fonts used in EMF.
1 Elements of Queuing Theory The queuing model –Core components; –Notation; –Parameters and performance measures –Characteristics; Markov Process –Discrete-time.
Modeling and Analysis of Computer Networks
Queuing Theory. Introduction Queuing is the study of waiting lines, or queues. The objective of queuing analysis is to design systems that enable organizations.
M/M/1 queue λn = λ, (n >=0); μn = μ (n>=1) λ μ λ: arrival rate
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
CS352 - Introduction to Queuing Theory Rutgers University.
Network Design and Analysis-----Wang Wenjie Queueing Theory II: 1 © Graduate University, Chinese academy of Sciences. Network Design and Performance Analysis.
Chapter 1 Introduction. “Wait-in-line” is a common phenomenon in everywhere. Reason: Demand is more than service. “How long must a customer wait?” or.
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Introduction Definition M/M queues M/M/1 M/M/S M/M/infinity M/M/S/K.
Queuing Theory.  Queuing Theory deals with systems of the following type:  Typically we are interested in how much queuing occurs or in the delays at.
Chapter 5 Elementary Stochastic Analysis Prof. Ali Movaghar.
Chap 2 Network Analysis and Queueing Theory 1. Two approaches to network design 1- “Build first, worry later” approach - More ad hoc, less systematic.
© 2015 McGraw-Hill Education. All rights reserved. Chapter 17 Queueing Theory.
Queueing Fundamentals for Network Design Application ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
Queueing Theory. The study of queues – why they form, how they can be evaluated, and how they can be optimized. Building blocks – arrival process and.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
Simple Queueing Theory: Page 5.1 CPE Systems Modelling & Simulation Techniques Topic 5: Simple Queueing Theory  Queueing Models  Kendall notation.
QUEUING THEORY 1.  - means the number of arrivals per second   - service rate of a device  T - mean service time for each arrival   = ( ) Utilization,
WAITING LINES AND SIMULATION
Chapter 1 Introduction.
Al-Imam Mohammad Ibn Saud University
CTMCs & N/M/* Queues.
Queueing Theory What is a queue? Examples of queues:
Finite M/M/1 queue Consider an M/M/1 queue with finite waiting room.
System Performance: Queuing
Queueing Theory 2008.
Queueing Theory Frank Y. S. Lin Information Management Dept.
Waiting Line Models Waiting takes place in virtually every productive process or service. Since the time spent by people and things waiting in line is.
Course Description Queuing Analysis This queuing course
Presentation transcript:

1 Queueing Theory Frank Y. S. Lin Information Management Dept. National Taiwan University

2 References Leonard Kleinrock, “Queueing Systems Volume I: Theory”, New York: Wiley, D. Gross and C. M. Harris, “Fundamentals of Queueing Theory”, New York: Wiley, 1998.

3 Agenda Introduction Stochastic Process General Concepts M/M/1 Model M/M/1/K Model Discouraged Arrivals M/M/∞ and M/M/m Models M/M/m/m Model

4 Introduction

5 Queueing System A queueing system can be described as customers arriving for service, waiting for service if it is not immediate, and if having waited for service, leaving the system after being served.

6 Why Queueing Theory Performance Measurement Average waiting time of customer / distribution of waiting time. Average number of customers in the system / distribution of queue length / current work backlog. Measurement of the idle time of server / length of an idle period. Measurement of the busy time of server / length of a busy period. System utilization.

7 Why Queueing Theory (cont’d) Delay Analysis Network Delay = Queueing Delay + Propagation Delay (depends on the distance) + Node Delay Processing Delay (independent of packet length, e.g. header CRC check) Adapter Delay (constant)

8 Characteristics of Queueing Process Arrival Pattern of Customers Probability distribution Patient / impatient (balked) arrival Stationary / nonstationary Service Patterns Probability distribution State dependent / independent service Stationary / nonstationary

9 Characteristics of Queueing Process (cont’d) Queueing Disciplines First come, first served (FCFS) Last come, first served (LCFS) Random selection for service (RSS) Priority queue Preemptive / nonpreemptive System Capacity Finite / infinite waiting room.

10 Characteristics of Queueing Process (cont’d) Number of Service Channels Single channel / multiple channels Single queue / multiple queues Stages of Service Single stage (e.g. hair-styling salon) Multiple stages (e.g. manufacturing process) Process recycling or feedback

11 Notation A queueing process is described by A/B/X/Y/Z

12 Notation (cont’d) For example, M/D/2/∞/FCFS indicates a queueing process with exponential inter-arrival time, deterministic service times, two parallel servers, infinite capacity, and first-come, first- served queueing discipline. Y and Z can be omitted if Y = ∞ and Z = FCFS.

13 Stochastic Process

14 Stochastic Process Stochastic process: any collection of random variables Χ(t), t T, on a common probability space where t is a subset of time. Continuous / discrete time stochastic process Example: Χ(t) denotes the temperature in the class on t = 7:00, 8:00, 9:00, 10:00, … (discrete time) We can regard a stochastic process as a family of random variables which are “indexed” by time. For a random process X(t), the PDF is denoted by F X (x;t) = P[X(t) <= x]

15 Some Classifications of Stochastic Process Stationary Processes: independent of time F X (x; t + τ) = F X (x; t) Independent Processes: independent variables F X (x; t) = F X 1,…, X n (x 1,…, x n ; t 1,…,t n ) = F X 1 (x 1 ; t 1 ) …F X n (x n ; t n ) Markov Processes: the probability of the next state depends only upon the current state and not upon any previous states. P[X(t n+1 ) = x n+1 | X(t n ) = x n, …., X(t 1 ) = x 1 ] = P[X(t n+1 ) = x n+1 | X(t n ) = x n ]

16 Some Classifications of Stochastic Process (cont’d) Birth-death Processes: state transitions take place between neighboring states only. Random Walks: the next position the process occupies is equal to the previous position plus a random variable whose value is drawn independently from an arbitrary distribution.

17 General Concepts

18 Continuous-time Memoryless Property If X ~Exp(λ), for any a,b > 0, P[X > a + b | X > a] = P[X > b] Proof: P[X > a + b | X > a]

19 Global Balance Equation Define P i = P[system is in state i] P ij = P[get into state j right after leaving state i] rate out of state j = rate into state j

20 General Balance Equation Define S = a subset of the state space S j rate in = rate out

21 General Equilibrium Solution Notation: P k = the probability that the system contains k customers (in state k) λ k = the arrival rate of customers when the system is in state k. μ k = the service rate when the system is in state k.

22 General Equilibrium Solution (cont’d) Consider state  k: k-1kk+1 λ k-1 μkμk μ k+1 λkλk #

23 General Equilibrium Solution (cont’d)

24 Little’s Result = average number of customers in the system T = system time (service time + queueing time) λ= arrival rate  Black box System time T … Queueing time Service time

25 M/M/1 Model Single Server, Single Queue (The Classical Queueing System)

26 M/M/1 Queue Single server, single queue, infinite population: Interarrival time distribution: Service time distribution λ < μ Stability condition λ < μ

27 M/M/1 Queue (cont’d) System utilization Define state S n = n customers in the system (n-1 in the queue and 1 in service) S 0 = empty system rate out rate in S

28 M/M/1 Queue (cont’d) Define p n = P[n customers in the system] (rate in = rate out)  Since    #

29 M/M/1 Queue (cont’d) Average number of customers in the system #

30 M/M/1 Queue (cont’d) Average system time P[ ≧ k customers in the system] (Little ’ s Result) #

31 M/M/1/K Model Single Server, Finite Storage

32 M/M/1/K Model The system can hold at most a total of K customers (including the customer in service) λ k = λ if k < K 0 if k  K μ k = μ

33 M/M/1/K Model (cont’d)

34 Discouraged Arrivals

35 Discouraged Arrivals Arrivals tend to get discouraged when more and more people are present in the system.

36 Discouraged Arrivals (cont’d)

37 Discouraged Arrivals (cont’d)

38 M/M/∞ and M/M/m M/M/∞ - Infinite Servers, Single Queue (Responsive Servers) M/M/m - Multiple Servers, Single Queue (The m-Server Case)

39 M/M/∞ Queue There is always a new server available for each arriving customer.

40 M/M/ ∞ Queue (cont’d) (Little’s Result)

41 M/M/m Queue The M/M/m queue An M/M/m queue is shorthand for a single queue served by multiple servers. Suppose there are m servers waiting for a single line. For each server, the waiting time for a queue is a system with service rateμ and arrival rate λ/m. The M/M/1 analysis has been done, at risk conclusion: delay = throughput

42 M/M/m Queue (cont’d) λ k = λ μ k = kμ if k  m mμ if k > m For k  m For k > m

43 M/M/n Queue (cont’d) ∴ P[queueing] = Total system time =

44 Comparisons (cont’d) M/M/1 v.s M/M/4 If we have 4 M/M/1 systems: 4 parallel communication links that can each handle 50 pps (μ), arrival rate λ = 25 pps per queue.  average delay = 40 ms. Whereas for an M/M/4 system,  average delay = 21.7 ms.

45 Comparisons (cont’d) Fast Server v.s A Set of Slow Servers #1 If we have an M/M/4 system with service rate μ=50 pps for each server, and another M/M/1 system with service rate 4μ = 200 pps. Both arrival rate is λ = 100 pps  delay for M/M/4 = 21.7 ms  delay for M/M/1 = 10 ms

46 Comparisons (cont’d) Fast Server v.s A Set of Slow Servers #2 If we have n M/M/1 system with service rate μ pps for each server, and another M/M/1 system with service rate nμ pps. Both arrival rate is nλ pps μ λ μ λ μ λ … nλnλ nμnμ S1S1 S2S2

47 M/M/m/mM/M/m/m Multiple Servers, No Storage (m-Server Loss Systems)

48 M/M/m/mM/M/m/m There are available m servers, each newly arriving customers is given a server, if a customers arrives when all servers are occupied, that customer is lost e.g. telephony system.

49 M/M/m/m (cont’d)

50 M/M/m/m (cont’d) Let p m describes the fraction of time that all m servers are busy. The name given to this probability expression is Erlang’s loss formula and is given by This equation is also referred to as Erlang’s B formula and is commonly denoted by B(m,λ/μ)