Queuing Theory and Stochas St t ochas ic Service Syste y ms Li Xia

Similar documents
Basic concepts of probability theory

Basic concepts of probability theory

Basic concepts of probability theory

Analysis of Software Artifacts

Queueing Theory and Simulation. Introduction

Elementary queueing system

Chapter 2 Queueing Theory and Simulation

Chapter 10. Queuing Systems. D (Queuing Theory) Queuing theory is the branch of operations research concerned with waiting lines.

Introduction to Queueing Theory

COMP9334 Capacity Planning for Computer Systems and Networks

Introduction to Queueing Theory

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

Kendall notation. PASTA theorem Basics of M/M/1 queue

Introduction to Queueing Theory

Outline. Finite source queue M/M/c//K Queues with impatience (balking, reneging, jockeying, retrial) Transient behavior Advanced Queue.

NICTA Short Course. Network Analysis. Vijay Sivaraman. Day 1 Queueing Systems and Markov Chains. Network Analysis, 2008s2 1-1

Bulk input queue M [X] /M/1 Bulk service queue M/M [Y] /1 Erlangian queue M/E k /1

Queueing systems. Renato Lo Cigno. Simulation and Performance Evaluation Queueing systems - Renato Lo Cigno 1

Performance Evaluation of Queuing Systems

Queues and Queueing Networks

CDA5530: Performance Models of Computers and Networks. Chapter 4: Elementary Queuing Theory

10.2 For the system in 10.1, find the following statistics for population 1 and 2. For populations 2, find: Lq, Ls, L, Wq, Ws, W, Wq 0 and SL.

COMP9334: Capacity Planning of Computer Systems and Networks

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 "

Exercises Stochastic Performance Modelling. Hamilton Institute, Summer 2010

5/15/18. Operations Research: An Introduction Hamdy A. Taha. Copyright 2011, 2007 by Pearson Education, Inc. All rights reserved.

Intro to Queueing Theory

Sandwich shop : a queuing net work with finite disposable resources queue and infinite resources queue

M/G/1 and M/G/1/K systems

Základy teorie front

PBW 654 Applied Statistics - I Urban Operations Research

7 Variance Reduction Techniques

INDEX. production, see Applications, manufacturing

Solutions to COMP9334 Week 8 Sample Problems

Name of the Student:

SYMBOLS AND ABBREVIATIONS

Probability Models in Electrical and Computer Engineering Mathematical models as tools in analysis and design Deterministic models Probability models

Part II: continuous time Markov chain (CTMC)

Probability and Statistics Concepts

Stochastic Models in Computer Science A Tutorial

Introduction to Queueing Theory with Applications to Air Transportation Systems

QUEUING SYSTEM. Yetunde Folajimi, PhD

Classical Queueing Models.

Systems Simulation Chapter 6: Queuing Models

GI/M/1 and GI/M/m queuing systems

Lecture 7: Simulation of Markov Processes. Pasi Lassila Department of Communications and Networking

Non Markovian Queues (contd.)

Queuing Theory. The present section focuses on the standard vocabulary of Waiting Line Models.

Queueing Theory II. Summary. ! M/M/1 Output process. ! Networks of Queue! Method of Stages. ! General Distributions

Glossary availability cellular manufacturing closed queueing network coefficient of variation (CV) conditional probability CONWIP

Chapter 1. Introduction. 1.1 Stochastic process

Slides 9: Queuing Models

1.225 Transportation Flow Systems Quiz (December 17, 2001; Duration: 3 hours)

Math Spring Practice for the final Exam.

Chapter 6 Queueing Models. Banks, Carson, Nelson & Nicol Discrete-Event System Simulation

Queueing Systems: Lecture 3. Amedeo R. Odoni October 18, Announcements

The effect of probabilities of departure with time in a bank

An Analysis of the Preemptive Repeat Queueing Discipline

Computer Systems Modelling

Introduction to Queuing Theory. Mathematical Modelling

EE 368. Weeks 3 (Notes)

Engineering Mathematics : Probability & Queueing Theory SUBJECT CODE : MA 2262 X find the minimum value of c.

CS 700: Quantitative Methods & Experimental Design in Computer Science

Networking = Plumbing. Queueing Analysis: I. Last Lecture. Lecture Outline. Jeremiah Deng. 29 July 2013

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

Recap. Probability, stochastic processes, Markov chains. ELEC-C7210 Modeling and analysis of communication networks

Contents Preface The Exponential Distribution and the Poisson Process Introduction to Renewal Theory

Massachusetts Institute of Technology

[Chapter 6. Functions of Random Variables]

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

Introduction to Markov Chains, Queuing Theory, and Network Performance

Discrete Random Variables

CS418 Operating Systems

Advanced Computer Networks Lecture 3. Models of Queuing

Operational Laws Raj Jain

Derivation of Formulas by Queueing Theory

Figure 10.1: Recording when the event E occurs

11 The M/G/1 system with priorities

CPSC 531: System Modeling and Simulation. Carey Williamson Department of Computer Science University of Calgary Fall 2017

continuous random variables

Part I Stochastic variables and Markov chains

Since D has an exponential distribution, E[D] = 0.09 years. Since {A(t) : t 0} is a Poisson process with rate λ = 10, 000, A(0.

CHAPTER 4. Networks of queues. 1. Open networks Suppose that we have a network of queues as given in Figure 4.1. Arrivals

16:330:543 Communication Networks I Midterm Exam November 7, 2005

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science

SOLUTIONS IEOR 3106: Second Midterm Exam, Chapters 5-6, November 8, 2012

Uniform random numbers generators

1 Basic concepts from probability theory

THIELE CENTRE. The M/M/1 queue with inventory, lost sale and general lead times. Mohammad Saffari, Søren Asmussen and Rasoul Haji

A Queueing System with Queue Length Dependent Service Times, with Applications to Cell Discarding in ATM Networks

Expected Values, Exponential and Gamma Distributions

Performance Modelling of Computer Systems

Analysis of A Single Queue

Expected Values, Exponential and Gamma Distributions

Northwestern University Department of Electrical Engineering and Computer Science

The Queue Inference Engine and the Psychology of Queueing. ESD.86 Spring 2007 Richard C. Larson

Section 1.2: A Single Server Queue

BMIR Lecture Series on Probability and Statistics Fall, 2015 Uniform Distribution

IEOR 6711: Stochastic Models I SOLUTIONS to the First Midterm Exam, October 7, 2008

Operational Laws 33-1

Transcription:

Queuing Theory and Stochastic Service Systems Li Xia

Syllabus Instructor Li Xia 夏俐, FIT 3 618, 62793029, xial@tsinghua.edu.cn Text book D. Gross, J.F. Shortle, J.M. Thompson, and C.M. Harris, Fundamentals of Queueing Theory, 4th Edition, Hoboken: Wiley, 2008. (copyis provided) Reference books: Leonard Kleinrock, Queueing Systems, vol. 1: Theory, John Wiley, 1975. Caltech course (Prof. Adam Wierman): http://courses.cms.caltech.edu/cs147/ h / / 林闯, 计算机网络和计算机系统的性能评价, 清华大学出版社,2001. 2

Grading Syllabus Homework: 40% (4 assignments) Course Interaction: 10% Midterm Presentation: 20% (paper reading) Final Projects\Exams: 30% Lecture notes and assignments are available online (in English) http://cfins.au.tsinghua.edu.cn/personalhg/xiali /teaching/course_queues.htm 3

Beijing Subway Throughput? h Safety? 4

Railway ticket online booking in 2012 Chinese new year Crash of ticket booking system Large number of tickets for sale (4million) Vast visit requests 秒杀? (billion) System architecture is not optimal Bandwidth of network access 5

How to solve it? Modeling and Analysis Performance analysis and optimization Queueing scheme, increase bandwidth Internet client Web server Application server Database server 6

Applications in daily life Supermarkets How long customers have to wait at checkouts? Behavior of waiting time during peak hours Number of checkouts? Line in counters of bank Multiple lines v.s. one line Number of counters? 7

Applications in engineering Computer/circuit /i i architecture design 1 fast disk v.s. 2 slow disks? Invest on large buffer v.s. fast CPU? Scheduling policy to improve performance Communication network design Buffer size design of switch/router Data packet scheduling policy in sensor or mobile network 8

List of applications areas Production system (machine, different products) Computer system (cpu, disk, RAM design) Communication network k(buffer design, link capacity) Transportation system (traffic lights control) Bankbranches operation (counter/type design) Airlines scheduling (takeoff/landing arrangement) Data center (optimal control, energy saving) Call center (optimize the operators, hotlines, ) Post office ce( (multi class, ut specialization) at 9

What s queue? A general queuing system Customer arrival Customer departure waiting room Service facility Basic elements Arrival pattern, service pattern, queue discipline, system capacity, customer type,.. 10

Why we need queuing theory? Resource constraints Design thearchitecture Formulate the system model Analyze the system performance Optimize the system performance Counter intuitive Randomness is complicated Some examples 11

CPU design A simple model of CPU Job arrival at rate λ, Poisson process Job mean size is 1/μ, exponential i.e., service rate is μ FCFS(first come first serve), buffer is infinite assume λ < μ, [question]why? λ buffer CPU μ Model of a cpu 12

CPU design, cont. If the arrival rate λ doubles, how to upgrade? If want to maintain the same delay of jobs, [question] what you choose? A. double μ B. less than double μ C. more than double μ Why? Double μ will cut the delay in half prove with M/M/1 queuing theory Physical intuition, time speeds up with scale 2 13

Lines in bank Customer arrival in Poisson with rate λ Counter service rate is μ, exponential FCFS, infinite waiting capacity λ μ μ λ μ 3λ μ λ μ μ 3 lines 1 line 14

Lines in bank, cont. Assume μ = 2/min, λ = 1/min queue length, 1 2 waiting time, response time, L 1 =1.5, L 2 =0.237 W 1 =0.5min, W 2 =0.079min T T1 =1min, T 2 =0.579min [question] how is the following queue? 3λ 3μ 15

Closed queueing network Model the intensive traffic with N capacity of network Batch system, intensive queue with limited capacity, etc. N=6 jobs 0.5 μ = 1 1 3 0.5 μ = 1 1 3 16

Closed queueing network, cont. If we double the speed of server 1 How it effects the response time of job? How it effects the throughput? [Answer] only change by a small amount Suppose N is very large, how is above question? Change 0, if N What if N is very small If N=1, changed amount is large 17

Closed queueing network, cont. What if the queueing network is open? remarkable improvement of throughput and average response time λ 05 0.5 1 μ = 1 3 0.5 μ = 1 1 3 18

Scheduling How service disciplines affect response time? FCFS, first come first serve LCFS, last come first serve Random [answer] all the same λ μ 19

Scheduling, cont. What if PR LCFS, preemptive resumed LCFS? Depends on the randomness of job size High randomness, big improvement No randomness, worse λ μ 20

Summary of examples Why counter intuition? Randomness of queuing Interactions among customers and servers Toy example, but many insights i Models Analysis Optimization 21

Basic concepts of probability theory Random variable discrete/continuous random variable Transform Z transform, Laplace transform Distribution Geometric, Binomial, Poisson, exponential, Erlang, Hyperexponential, phase type 22

Random variable X is denoted as random variable Discrete random variable, if X is discrete Continuous random variable, if X is continuous Distribution function, or called cdf, cumulative distribution function F(x)=Pr(X<x) () ( ) Probability density function, pdf f(x)=pr(x=x), x is discrete f(x)= F(x)/ x, x is con nuous 23

Random variable Mean: E(X) Variance: Var(X), or σ 2 (X) σ 2 (X) = E{(X E(X)) 2 }=E(X 2 ) E 2 (X) Standard deviation: σ(x) Covariance of two random variables X, Y Cov(X,Y)=E{(X E(X))(Y E(Y))} E(X))(Y E(Y))} Correlation coefficient of X, Y r(x,y)=cov(x,y)/ σ(x)σ(y) 1 r(x,y) 1 24

Coefficient of variation: Coefficient of variation: c X c X = σ(x)/e(x) c X =0: deterministic c X <1: smooth c X =1: pure random c X >1: bursty Figures as example t t t 25

Discrete Random Variables 26

Discrete Random Variables 27

Continuous Random Variables 28

Continuous Random Variables 29

Z transform for discrete distribution Z transform is also called generating function P(z): Z transform of discrete r.v. X, p(n)=pr(x=n), assume n=0,1,2, Pz ( ) Ez ( X ) pnz ( ) Property = = n= 0 P (0) = p (0), P (1) = 1, P (1) = E ( X ) n P (1) =? 30

Laplace transform for continuous distribution F*(s): Laplace transform of a continuous r.v. X pdf of X is f(x), cdf of X is F(x), assume x 0 * sx sx F s = e f x dx= e df x 0 0 ( ) ( ) ( ) Property Shortcut to calculate l the k moment of X * * *( k) k k F (0) = 1, F (0) = E( X), F (0) = ( 1) E( X ) * sx F () s = s e F() x dx 0 31