CSCI1600: Embedded and Real Time Software Lecture 19: Queuing Theory Steven Reiss, Fall 2015.

Slides:



Advertisements
Similar presentations
Chapter 13 Queueing Models
Advertisements

CS 241 Spring 2007 System Programming 1 Queuing Framework for Process Management Evaluation Lecture 20 Klara Nahrstedt.
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)
Lindsay Mullen Seminar Presentation #2 November 4, 2013
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 19 Scheduling IV.
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
Queuing Models Basic Concepts
System Performance & Scalability i206 Fall 2010 John Chuang.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
1 Queuing Theory 2 Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or.
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),
Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University
1 Queueing Theory H Plan: –Introduce basics of Queueing Theory –Define notation and terminology used –Discuss properties of queuing models –Show examples.
Queueing Network Model. Single Class Model Open - Infinite stream of arriving customers Closed - Finite population eg Intranet users Indistinguishable.
Queueing Theory.
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.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
Queuing Theory. Queuing theory is the study of waiting in lines or queues. Server Pool of potential customers Rear of queue Front of queue Line (or queue)
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
QUEUING MODELS Queuing theory is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open at a store –Determine the.
Chapter 9: Queuing Models
Lecture 14 – Queuing Systems

Location Models For Airline Hubs Behaving as M/D/C Queues By: Shuxing Cheng Yi-Chieh Han Emile White.
Introduction to Queuing Theory
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
Queuing models Basic definitions, assumptions, and identities Operational laws Little’s law Queuing networks and Jackson’s theorem The importance of think.
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.
Introduction to Operations Research
Introduction to Queueing Theory
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.
TexPoint fonts used in EMF.
1 Systems Analysis Methods Dr. Jerrell T. Stracener, SAE Fellow SMU EMIS 5300/7300 NTU SY-521-N NTU SY-521-N SMU EMIS 5300/7300 Queuing Modeling and Analysis.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
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.
yahoo.com SUT-System Level Performance Models yahoo.com SUT-System Level Performance Models8-1 chapter11 Single Queue Systems.
Modeling and Simulation Queuing theory
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
CS352 - Introduction to Queuing Theory Rutgers University.
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.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
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.
© 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.
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.
Simple Queueing Theory: Page 5.1 CPE Systems Modelling & Simulation Techniques Topic 5: Simple Queueing Theory  Queueing Models  Kendall notation.
Queuing Theory Simulation & Modeling.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
OPERATING SYSTEMS CS 3502 Fall 2017
Al-Imam Mohammad Ibn Saud University
Queueing Theory What is a queue? Examples of queues:
CSCI1600: Embedded and Real Time Software
Queueing Theory Carey Williamson Department of Computer Science
System Performance: Queuing
TexPoint fonts used in EMF.
Queuing Theory By: Brian Murphy.
Lecture 13 – Queuing Systems
Queueing Theory 2008.
Carey Williamson Department of Computer Science University of Calgary
Queuing Models J. Mercy Arokia Rani Assistant Professor
Course Description Queuing Analysis This queuing course
Presentation transcript:

CSCI1600: Embedded and Real Time Software Lecture 19: Queuing Theory Steven Reiss, Fall 2015

Queuing Theory History  Agner Krarup Erlang ( )  Analysis of telephone networks ( )  Why does this involve queues?

Analysis of Telelphone Networks  Issues  How many operators are needed  How many circuits are needed

Queuing Theory  A branch of probability theory studying queues  Applications  Computer systems  Communication networks  Call centers  Transportation  … Arriving Jobs Server Departing Jobs

Parameters: Arrivals  Arrival rate λ  How fast jobs are arriving  Regular or random  Random = Poisson process  With some distribution Arriving Jobs Server Departing Jobs

Parameters: service  Service demand S – amount of service the job needs  Measured in various terms (time, size, …)  Regular or random (with a given distribution)  Service capacity C – how fast server process jobs  Service rate μ = C/S  Service time = S/C = 1/μ Arriving Jobs Server Departing Jobs

Parameter: Service  Multiple symmetric servers  m parallel servers constitute a single serving station  Each has capacity C  Overall capacity depends on number of serviced jobs  C(N) = min(N,m)C Arriving Jobs Server 1 Departing Jobs Server m

Parameters: Queue  Scheduling discipline  First come, first served (FCFS, FIFO)  Priority queue (Shortest in, first out)  OS I/O scheduler  Preemptive vs. nonpreemptive servicing  Preemptive servicing can be interrupted by higher priority job  Linux real-time thread scheduling Arriving Jobs Server Departing Jobs

Statistical Basis for Queuing Theory  Arrival probability distribution  Service probability distribution  Determine various properties of the system  Average queue size  Maximum expected queue size  Average wait time  Maximum expected wait time

Poisson Arrival  A completely random arrival process  The number of jobs is very large  Jobs are independent of each other  Job arrivals are not simultaneous  λ: the average arrival rate  Examples  Phone calls to a switchboard  Radioactive decay  Customers going to checkout  Trains needing switches thrown

Poisson Process  Represented by Poisson distribution  Probablity of seeing i jobs during the time interval T  P[n(t) = i] = (λT) i /i! * e -λT PDF CDF

Poisson Process Properties  Memoryless  The number of arrivals in the time interval (T;T+Δt)  Does not depend on the number before T  Superposition  Combination of m independent Poisson processes with λ 1,λ 2,…λ m is a Poisson process with λ= λ 1 +λ 2 +…+λ m  Interval between job arrivals  Is distributed exponentially f x (x) = λe -λx

Exponential Service Distribution  PDF: fs(t) = μe -μt where μ is the service rate  CDF: Fs(t) = 1 - μe -μt  Mean = Std. Deviation = 1/μ = service time

Other Distributions  Erlang  The job visits an exponential server k times  Hyperexponential  k types of jobs, each has probability π i  Each type of job has its own service time  Each type of jobs passed to its own server  General  With known mean and standard deviation

A/S/n Notation  Proposed by D. Kendeall in 1953  Arrival process (A) – message arrival distribution  Server process (S) – servicing time distribution  Number of servers (n)  Distribution lables  M : exponential (memoryless, Poisson)  D : deterministic (constant arrival/processing times)  G : general  E k : k-stage Erlang  H k : k-stage Hyperexponential

Examples  M/M/1  One server for jobs that arrive and are serviced by Poisson process  System with many independent jobs sources can be approximated this way  M/D/n  Arrival process is Poisson, service is deterministic  There are n servers  G/G/n  General system with arbitrary arrival and service times

Goals of Queuing Theory  Predict the performance of the system in steady state  Not startup or shut down  Assumptions  The population of jobs is infinite  The size of the queue is infinite (can be bounded)  Specific distributions for A and S known

Performance Metrics  W: waiting time (queuing delay)  Time between receipt of a job and start of processing  Depends on the load on the server  S: service time (processing delay)  The actual processing time of the job  Depends on the serving capacity  T: response time  T = W + S  Throughput  Average number of jobs per time unit

Little’s Law  Number of jobs in the system N(t)  N = λT  λ : the mean arrival rate  T : the mean service time  Queue size Q  Q = max(0,N – m)  Waiting time in the Queue W  Q = λW

Little’s Law Example  Clothing store  Customers arrive 10/hour and stay 30 minutes  λ = 10, T = 0.5  Average number of customers in the store N = 10*0.5 = 5  Register line subsystem in the store  Average register queue is 2 people  The wait time W = Q/λ = 2/10 = 0.2 hours

Other Metrics  Traffic intensity p  Single server: p = arrival rate * service time = λ/μ  m servers: p = λ/(mμ)  p is dimensionless, measured in Erlangs  If p > 1, then more jobs arrive than the system can handle  p < 1 needed to prevent overload  Utilization factor  U = min(p,1)

Analytic Solutions  Some queuing models can be solved analytically  M/M/1 for example  Other variants

M/M/1 Performance

M/M/1 Example

How to Fix Overload  How can we reduce job delays  Obvious:  Shorten μ (speed up the code, profile, optimize)  Lengthen λ (decrease the load, make less bursty)  Move to M/M/m  How many servers do you want  This can be solved as well

Problems  Classical queuing theory is too restrictive  Infinite number of jobs  Only certain distributions are handled  Job routine is not allowed  Some limitations can be alleviated  But calculations and the math involved are complex  Provides insufficient information

Solving Queuing Problems  Use a computer representation of the system  Instead of a mathematical model  Use simulation to learn the properties  This is what is generally used  MATLAB SimEvents  OMNET  Can construct arbitrary models and run them

Homework  For next week (10/26)  Present you project to the class  Plans, progress to date  Project model  Tasks and model(s) for each task  Hand this in  Can be part of presentation