Lecture 3: 1 Introduction to Queuing Theory More interested in long term, steady state than in startup => Arrivals = Departures Little’s Law: Mean number.

Slides:



Advertisements
Similar presentations
Lecture 10 Queueing Theory. There are a few basic elements common to almost all queueing theory application. Customers arrive, they wait for service in.
Advertisements

Introduction to Queuing Theory
Chapter Queueing Notation
Lecture 12: Storage Systems Performance Kai Bu
Queueing Model 박희경.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/10/20151.
EECC551 - Shaaban #1 Lec # 11 Winter Input/Output & System Performance Issues System I/O Connection StructureSystem I/O Connection Structure.
EECC722 - Shaaban #1 Lec # 8 Fall I/O Systems Processor Cache Memory - I/O Bus Main Memory I/O Controller Disk I/O Controller I/O Controller.
I/O: Queuing Theory and Benchmarks. Review: Disk I/O Performance Response time = Queue + Device Service time 100% Response Time (ms) Throughput (% total.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
CS152 / Kubiatowicz Lec /28/01©UCB Fall 2001 CS152 Computer Architecture and Engineering Lecture 24 Busses (continued) Queueing Theory Disk IO November.
Queueing Theory: Part I
EECC722 - Shaaban #1 Lec # 13 Fall I/O Systems Processor Cache Memory - I/O Bus Main Memory I/O Controller Disk I/O Controller I/O Controller.
I/O Systems Processor Cache Memory - I/O Bus Main Memory I/O
JDK.F98 Slide 1 Lecture 25: I/O Introduction Prof. John Kubiatowicz Computer Science 252 Fall 1998.
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.
Performance Evaluation
EECC551 - Shaaban #1 Lec # 12 Fall I/O Systems Processor Cache Memory - I/O Bus Main Memory I/O Controller Disk I/O Controller I/O Controller.
EECC551 - Shaaban #1 Lec # 11 Fall Input/Output & System Performance Issues System I/O Connection StructureSystem I/O Connection Structure.
EECC551 - Shaaban #1 Lec # 10 Winter Input/Output & System Performance Issues System I/O Connection StructureSystem I/O Connection Structure.
Queuing Analysis Based on noted from Appendix A of Stallings Operating System text 6/28/20151.
OS Fall ’ 02 Performance Evaluation Operating Systems Fall 2002.
CS252/Kubiatowicz Lec /10/99 CS252 Graduate Computer Architecture Lecture 21 I/O Introduction Prof. John Kubiatowicz Computer Science 252 Fall 1998.
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?

DAP Spr.‘98 ©UCB 1 Lecture 13: I/O: A Little Queuing Theory, RAID Professor David A. Patterson Computer Science 252 Spring 1998.
Introduction to Queuing Theory
Lecture 4 1 Reliability vs Availability Reliability: Is anything broken? Availability: Is the system still available to the user?
CSE 7381/5381 I/O Introduction: Storage Devices, Metrics.
Computer Architecture Lec 18 – Storage. 01/19/10 Storage2 Review Disks: Arial Density now 30%/yr vs. 100%/yr in 2000s TPC: price performance as normalizing.
Queuing Theory Summary of results. 2 Notations Typical performance characteristics of queuing models are: L : Ave. number of customers in the system L.
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
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
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.
Lecture 10: Queueing Theory. Queueing Analysis Jobs serviced by the system resources Jobs wait in a queue to use a busy server queueserver.
Introduction to Queueing Theory
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
TexPoint fonts used in EMF.
CS433 Modeling and Simulation Lecture 12 Queueing Theory Dr. Anis Koubâa 03 May 2008 Al-Imam Mohammad Ibn Saud University.
CS252/Patterson Lec 6.1 2/2/01 CS252 Graduate Computer Architecture Lecture 7: I/O 3: a little Queueing Theory and I/O benchmarks February 7, 2001 Prof.
yahoo.com SUT-System Level Performance Models yahoo.com SUT-System Level Performance Models8-1 chapter11 Single Queue Systems.
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
CS352 - Introduction to Queuing Theory Rutgers University.
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.
Chapter 6 Queueing Models
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
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.
JDK.F98 Slide 1 Lecture 26: I/O Continued Prof. John Kubiatowicz Computer Science 252 Fall 1998.
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.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
Queuing Theory Simulation & Modeling.
Managerial Decision Making Chapter 13 Queuing Models.
Al-Imam Mohammad Ibn Saud University
Queueing Theory What is a queue? Examples of queues:
Queuing Theory Queuing Theory.
Internet Queuing Delay Introduction
Lecture 21: Storage Systems
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Queueing Theory Carey Williamson Department of Computer Science
Introduction Notation Little’s Law aka Little’s Result
TexPoint fonts used in EMF.
Queuing Theory By: Brian Murphy.
Single server model Queue Server I/O Controller And device Arrivals.
Carey Williamson Department of Computer Science University of Calgary
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:

Lecture 3: 1 Introduction to Queuing Theory More interested in long term, steady state than in startup => Arrivals = Departures Little’s Law: Mean number tasks in system = arrival rate x mean reponse time –Observed by many, Little was first to prove Applies to any system in equilibrium, as long as nothing in black box is creating or destroying tasks ArrivalsDepartures

Lecture 3: 2 A Little Queuing Theory: Notation Queuing models assume state of equilibrium: input rate = output rate Notation: r average number of arriving customers/second () T ser average time to service a task (traditionally  = 1/ T ser ) userver utilization (0..1): u = r x  (or u = r / T ser ) T q average time/task in queue T sys average time/task in system: T sys = T q + T ser L ser average number of tasks in service: L ser = r x T ser L q average length of queue: L q = r x T q L sys average length of system: L sys = r x T sys ProcIOCDevice Queue server System

Lecture 3: 3 Little’s Law Length system = rate x Time system (Mean number customers = arrival rate x mean service time) Length queue = Arrival rate x Time queue = r x T q = L q Length server = Arrival rate x Time server = r x T ser = L ser

Lecture 3: 4 Example Suppose an I/O system with a single disk gets about 10 I/O requests per second and the average time for a disk to service an I/O request is 50 ms. What is the utilization of the I/O system? –The service rate is 1/50ms = 20 I/O /sec –Server utilization = Arrival rate / Service rate = 10/20 = 0.5

Lecture 3: 5 Example Suppose the average time to satisfy a disk request is 50 ms and the I/O system with many disks gets about 200 I/O requests per second. What is the mean number of I/O requests at the disk server? Length server = Arrival rate X Time server (L ser = r x T ser ) = 200x0.05 = 10 So there are 10 requests on average at the disk server

Lecture 3: 6 A Little Queuing Theory A single server queue: combination of a servicing facility that accommodates 1 customer at a time (server) + waiting area (queue): together called a system T sys = L q x T ser + Mean time to complete service of tasks when new task arrives Server spends a variable amount of time with customers; how do you characterize variability? –Distribution of a random variable: histogram? curve? ProcIOCDevice Queue server System

Lecture 3: 7 Random Variables A variable is random if it takes one of a specified set of values with a specified probability You cannot know exactly what its next value will be But you do know the probability of all possible value Usually characterized by Mean and Variance

Lecture 3: 8 Some Distribution Functions

Lecture 3: 9 A Little Queuing Theory Server spends a variable amount of time with customers –Weighted mean m1 = (f1 x T1 + f2 x T fn x Tn)/F (F=f1 + f2...) –variance = (f1 x T1 2 + f2 x T fn x Tn 2 )/F – m1 2 ป Must keep track of unit of measure (100 ms 2 vs. 0.1 s 2 ) –Squared coefficient of variance: C = variance/m1 2 ป Unitless measure (100 ms 2 vs. 0.1 s 2 ) Exponential distribution C = 1 : most short relative to average, few others long; 90% < 2.3 x average, 63% < average Hypoexponential distribution C 90% < 2.0 x average, only 57% < average Hyperexponential distribution C > 1 : further from average C=2.0 => 90% < 2.8 x average, 69% < average ProcIOCDevice Queue server System Avg.

Lecture 3: 10 A Little Queuing Theory: Variable Service Time Server spends a variable amount of time with customers –Weighted mean m1 = (f1xT1 + f2xT fnXTn)/F (F=f1+f2+...) –Squared coefficient of variance C Disk response times C ~= 1.5 (majority seeks < average) Yet usually pick C = 1.0 for simplicity Another useful value is average time must wait for server to complete task: m1(z) –Not just 1/2 x m1 because doesn’t capture variance –Can derive m1(z) = 1/2 x m1 x (1 + C) –No variance => C= 0 => m1(z) = 1/2 x m1 ProcIOCDevice Queue server System

Lecture 3: 11 A Little Queuing Theory: Average Wait Time Calculating average wait time in queue T q –If something at server, it takes to complete on average m1(z) –Chance server is busy = u; average delay is u x m1(z) –All customers in line must complete; each avg T s er T q = u x m1(z) + L q x T s er = 1/2 x u x T ser x (1 + C) + L q x T s er T q = 1/2 x u x T s er x (1 + C) + r x T q x T s er T q = 1/2 x u x T s er x (1 + C) + u x T q T q x (1 – u) = T s er x u x (1 + C) /2 T q = T s er x u x (1 + C) / (2 x (1 – u)) Notation: raverage number of arriving customers/second T ser average time to service a customer userver utilization (0..1): u = r x T ser T q average time/customer in queue L q average length of queue:L q = r x T q

Lecture 3: 12 A Little Queuing Theory: M/G/1 and M/M/1 Assumptions so far: –System in equilibrium –Time between two successive arrivals in line are random –Server can start on next customer immediately after prior finishes –No limit to the queue: works First-In-First-Out –Afterward, all customers in line must complete; each avg T ser Described “memoryless” or Markovian request arrival (M for C=1 exponentially random), General service distribution (no restrictions), 1 server: M/G/1 queue When Service times have C = 1, M/M/1 queue T q = T ser x u x (1 + C) /(2 x (1 – u)) = T ser x u / (1 – u) T ser average time to service a customer userver utilization (0..1): u = r x T ser T q average time/customer in queue

Lecture 3: 13 A Little Queuing Theory: An Example processor sends 10 x 8KB disk I/Os per second, requests & service exponentially distrib., avg. disk service = 20 ms On average, how utilized is the disk? –What is the number of requests in the queue? –What is the average time spent in the queue? –What is the average response time for a disk request? Notation: raverage number of arriving customers/second = 10 T ser average time to service a customer = 20 ms (0.02s) userver utilization (0..1): u = r x T ser = 10/s x.02s = 0.2 T q average time/customer in queue = T ser x u / (1 – u) = 20 x 0.2/(1-0.2) = 20 x 0.25 = 5 ms (0.005s) T sys average time/customer in system: T sys =T q +T ser = 25 ms L q average length of queue:L q = r x T q = 10/s x.005s = 0.05 requests in queue L sys average # tasks in system: L sys = r x T sys = 10/s x.025s = 0.25

Lecture 3: 14 A Little Queuing Theory: Another Example processor sends 20 x 8KB disk I/Os per sec, requests & service exponentially distrib., avg. disk service = 12 ms On average, how utilized is the disk? –What is the number of requests in the queue? –What is the average time a spent in the queue? –What is the average response time for a disk request? Notation: raverage number of arriving customers/second= 20 T ser average time to service a customer= 12 ms userver utilization (0..1): u = r x T ser = /s x. s = T q average time/customer in queue = T s er x u / (1 – u) = x /( ) = x = ms T sys average time/customer in system: T sys =T q +T ser = 16 ms L q average length of queue:L q = r x T q = /s x s = requests in queue L sys average # tasks in system : L sys = r x T sys = /s x s =

Lecture 3: 15 A Little Queuing Theory: Another Example processor sends 20 x 8KB disk I/Os per sec, requests & service exponentially distrib., avg. disk service = 12 ms On average, how utilized is the disk? –What is the number of requests in the queue? –What is the average time a spent in the queue? –What is the average response time for a disk request? Notation: raverage number of arriving customers/second= 20 T ser average time to service a customer= 12 ms userver utilization (0..1): u = r x T ser = 20/s x.012s = 0.24 T q average time/customer in queue = T s er x u / (1 – u) = 12 x 0.24/(1-0.24) = 12 x 0.32 = 3.8 ms T sys average time/customer in system: T sys =T q +T ser = 15.8 ms L q average length of queue:L q = r x T q = 20/s x.0038s = requests in queue L sys average # tasks in system : L sys = r x T sys = 20/s x.016s = 0.32

Lecture 3: 16 A Little Queuing Theory: Yet Another Example Suppose processor sends 10 x 8KB disk I/Os per second, squared coef. var.(C) = 1.5, avg. disk service time = 20 ms On average, how utilized is the disk? –What is the number of requests in the queue? –What is the average time a spent in the queue? –What is the average response time for a disk request? Notation: raverage number of arriving customers/second= 10 T ser average time to service a customer= 20 ms userver utilization (0..1): u = r x T ser = 10/s x.02s = 0.2 T q average time/customer in queue = T ser x u x (1 + C) /(2 x (1 – u)) = 20 x 0.2(2.5)/2(1 – 0.2) = 20 x 0.32 = 6.25 ms T sys average time/customer in system: T sys = T q +T ser = 26 ms L q average length of queue:L q = r x T q = 10/s x.006s = 0.06 requests in queue L sys average # tasks in system :L sys = r x T sys = 10/s x.026s = 0.26