Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.

Slides:



Advertisements
Similar presentations
Part 3 Probabilistic Decision Models
Advertisements

Lecture 10 Queueing Theory. There are a few basic elements common to almost all queueing theory application. Customers arrive, they wait for service in.
Introduction to Queuing Theory
Many useful applications, especially in queueing systems, inventory management, and reliability analysis. A connection between discrete time Markov chains.
IE 429, Parisay, January 2003 Review of Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete, continuous.
Lab Assignment 1 COP 4600: Operating Systems Principles Dr. Sumi Helal Professor Computer & Information Science & Engineering Department University of.
CS 241 Spring 2007 System Programming 1 Queuing Framework for Process Management Evaluation Lecture 20 Klara Nahrstedt.
Probability, Statistics, and Traffic Theories
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
Chap. 20, page 1051 Queuing Theory Arrival process Service process Queue Discipline Method to join queue IE 417, Chap 20, Jan 99.
1.(10%) Let two independent, exponentially distributed random variables and denote the service time and the inter-arrival time of a system with parameters.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Queuing and Transportation
Single queue modeling. Basic definitions for performance predictions The performance of a system that gives services could be seen from two different.
Queueing Theory: Part I
To accompany Quantitative Analysis for Management, 8e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/28/20151.
Queuing. Elements of Waiting Lines  Population –Source of customers Infinite or finite.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
Internet Queuing Delay Introduction How many packets in the queue? How long a packet takes to go through?
Chapter 9: Queuing Models

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  …
The Poisson Process. A stochastic process { N ( t ), t ≥ 0} is said to be a counting process if N ( t ) represents the total number of “events” that occur.
Exponential and Chi-Square Random Variables
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.
Queueing Analysis of Production Systems (Factory Physics)
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
IE 429, Parisay, January 2010 What you need to know from Probability and Statistics: Experiment outcome: constant, random variable Random variable: discrete,
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.
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
M/M/1 queue λn = λ, (n >=0); μn = μ (n>=1) λ μ λ: arrival rate
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
Chapter 20 Queuing Theory to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c) 2004 Brooks/Cole,
M/M/1 Queues Customers arrive according to a Poisson process with rate. There is only one server. Service time is exponential with rate  j-1 jj+1...
Stevenson and Ozgur First Edition Introduction to Management Science with Spreadsheets McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies,
QUEUING THEORY.
Chapter 2 Probability, Statistics and Traffic Theories
Structure of a Waiting Line System Queuing theory is the study of waiting lines Four characteristics of a queuing system: –The manner in which customers.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
1 1 Slide Chapter 12 Waiting Line Models n The Structure of a Waiting Line System n Queuing Systems n Queuing System Input Characteristics n Queuing System.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
Queuing Models.
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.
QUEUING THEORY 1.  - means the number of arrivals per second   - service rate of a device  T - mean service time for each arrival   = ( ) Utilization,
Queuing Theory. Model Customers arrive randomly in accordance with some arrival time distribution. One server services customers in order of arrival.
Queueing Theory What is a queue? Examples of queues:
Chapter 9: Queuing Models
Internet Queuing Delay Introduction
Demo on Queuing Concepts
Lecture on Markov Chain
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Our favorite simple stochastic process.
Introduction Notation Little’s Law aka Little’s Result
Handling Routing Transport Haifa JFK TLV BGN To: Yishay From: Vered
Variability 8/24/04 Paul A. Jensen
Model Antrian M/M/s.
Queueing Theory 2008.
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
VIRTUE MARYLEE MUGURACHANI QUEING THEORY BIRTH and DEATH.
Presentation transcript:

Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems

Copyright ©: Nahrstedt, Angrave, Abdelzaher 2 Content of This Lecture Goals: Introduction to Principles for Reasoning about Process Management/Scheduling Things covered in this lecture: Introduction to Queuing Theory

Copyright ©: Nahrstedt, Angrave, Abdelzaher 3 Process States Finite State Diagram

Copyright ©: Nahrstedt, Angrave, Abdelzaher 4 Queueing Model Random Arrivals modeled as Poisson process Service times follow exponential distribution

Copyright ©: Nahrstedt, Angrave, Abdelzaher 5 Discussion If a bus arrives at a bus stop every 15 minutes, how long do you have to wait at the bus stop assuming you start to wait at a random time?

Copyright ©: Nahrstedt, Angrave, Abdelzaher 6 Queuing Theory (M/M/1 queue) ARRIVAL RATE ARRIVAL RATE (Poisson process) SERVICE RATE  Input Queue Server the distribution of inter-arrival times between two consecutive arrivals is exponential (arrivals are modeled as Poisson process) service time is exponentially distributed with parameter 

M/M/1 queue The M/M/1 queue assumes that arrivals are a Poisson process and the service time is exponentially distributed. Interarrival times of a Poisson process are IID (Independent and Identically Distributed) exponential random variables with parameter Arrival rate CPU Service rate  11 t 22 Arrival times: - independent from each other! - each interarrival  i follows an exponential distribution

Appendix: exponential distribution If  is the exponential random variable describing the distribution of inter- arrival times between two consecutive arrivals, it follows that: The probability density function (pdf) is: Arrival rate CPU Service rate   Probability to have the first arrival within  is 1-e -  t cumulative distribution function (cdf) 0

Copyright ©: Nahrstedt, Angrave, Abdelzaher Queueing Theory Queuing theory assumes that the queue is in a steady state M/M/1 queue model: Poisson arrival with constant average arrival rate (customers per unit time) Each arrival is independent. Interarrival times are IID (Independent and Identically Distributed) exponential random variables with parameter What are the odds of seeing the first arrival before time t? See for additional details

Copyright ©: Nahrstedt, Angrave, Abdelzaher 10 Analysis of Queue Behavior Poisson arrivals: probability n customers arrive within time interval t is

Copyright ©: Nahrstedt, Angrave, Abdelzaher 11 Analysis of Queue Behavior Probability n customers arrive within time interval t is: Do you see any connection between previous formulas and the above one?

Copyright ©: Nahrstedt, Angrave, Abdelzaher 12 Little’s Law in queuing theory The average number L of customers in a stable system is equal to the average arrival rate λ times the average time W a customer spends in the system It does not make any assumption about the specific probability distribution followed by the interarrival times between customers W q = mean time a customer spends in the queue = arrival rate L q = W q  number of customers in queue W = mean time a customer spends in the entire system (queue+server) L = W  number of customers in the system In words – average number of customers is arrival rate times average waiting time

Copyright ©: Nahrstedt, Angrave, Abdelzaher 13 Analysis of M/M/1 queue model Server Utilization: mean time W s a customer spends in the server is 1/ , where  is the service rate. According to M/M/1 queue model, the expected number of customers in the Queue+Server system is: Quiz: how can we derive the average time W in the system, and the average time W q in the queue?

Copyright ©: Nahrstedt, Angrave, Abdelzaher 14 Hamburger Problem 7 Hamburgers arrive on average every time unit 8 Hamburgers are processed by Joe on average every unit 1. Av. time hamburger waiting to be eaten? (Do they get cold?) Ans = ???? 2. Av number of hamburgers waiting in queue to be eaten? Ans = ???? Queue 7 8

Copyright ©: Nahrstedt, Angrave, Abdelzaher 15 Example: How busy is the server? λ =2 μ=3

Copyright ©: Nahrstedt, Angrave, Abdelzaher 16 How long is an eater in the system? λ =2 μ=3

Copyright ©: Nahrstedt, Angrave, Abdelzaher How long is someone in the queue? λ =2 μ=3

Copyright ©: Nahrstedt, Angrave, Abdelzaher How many people in queue? λ =2 μ=3

Copyright ©: Nahrstedt, Angrave, Abdelzaher 19 Interesting Fact As  approaches one, the queue length becomes infinitely large.

Copyright ©: Nahrstedt, Angrave, Abdelzaher 20 Until Now We Looked at Single Server, Single Queue ARRIVAL RATE ARRIVAL RATE SERVICE RATE  Input Queue Server

Copyright ©: Nahrstedt, Angrave, Abdelzaher 21 Sum of Independent Poisson Arrivals ARRIVAL RATE 1 SERVICE RATE  Input Queue Server ARRIVAL RATE 2 = = If two or more arrival processes are independent and Poisson with parameter λ i, then their sum is also Poisson with parameter λ equal to the sum of λ i

Copyright ©: Nahrstedt, Angrave, Abdelzaher 22 As long as service times are exponentially distributed... ARRIVAL RATE ARRIVAL RATE SERVICE RATE  1 Input Queue Server Server SERVICE RATE  2 Combined  =  1+  2

Copyright ©: Nahrstedt, Angrave, Abdelzaher 23 Question: McDonalds Problem μ μ μ μ μ μ λ λ λ λ λ λ A) Separate Queues per Server B) Same Queue for Servers Quiz: if W is waiting time for system A, and W is waiting time for system B, which queuing system is better (in terms of waiting time)? Quiz: if W A is waiting time for system A, and W B is waiting time for system B, which queuing system is better (in terms of waiting time)?