COMP60611 Fundamentals of Parallel and Distributed Systems

Slides:



Advertisements
Similar presentations
LESSONs NINE and TEN QUEUING MODELS.
Advertisements

Lecture 13 – Continuous-Time Markov Chains
Queueing Theory: Recap
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. QUEUING MODELS Queuing is the analysis of waiting lines It can be used to: –Determine the # checkout stands to have open.
Model Antrian By : Render, ect. Outline  Characteristics of a Waiting-Line System.  Arrival characteristics.  Waiting-Line characteristics.  Service.
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Queuing Systems Chapter 17.
Queuing and Transportation
Queueing Theory: Part I
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 Professor Stephen Lawrence Leeds School of Business University of Colorado Boulder, CO
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
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.

Queuing Theory (Waiting Line Models)
Queuing Networks. Input source Queue Service mechanism arriving customers exiting customers Structure of Single Queuing Systems Note: 1.Customers need.
Introduction to Queuing Theory
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Introduction to Operations Research
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
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.
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.
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.
Waiting Lines and Queuing Models. Queuing Theory  The study of the behavior of waiting lines Importance to business There is a tradeoff between faster.
1 Chapters 8 Overview of Queuing Analysis. Chapter 8 Overview of Queuing Analysis 2 Projected vs. Actual Response Time.
CS352 - Introduction to Queuing Theory Rutgers University.
Queues. Examples of Queue Problems Post Office Post Office (Each counter with all services v Different counters for different services) T-Mobile Customer.
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
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.
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.
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.
Simple Queueing Theory: Page 5.1 CPE Systems Modelling & Simulation Techniques Topic 5: Simple Queueing Theory  Queueing Models  Kendall notation.
OPERATING SYSTEMS CS 3502 Fall 2017
WAITING LINES AND SIMULATION
Chapter 1 Introduction.
Models of Traffic Flow 1.
Al-Imam Mohammad Ibn Saud University
Queueing Theory What is a queue? Examples of queues:
Queuing Theory Non-Markov Systems
Chapter 9: Queuing Models
Lecture on Markov Chain
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
CPSC 531: System Modeling and Simulation
Queueing Theory Carey Williamson Department of Computer Science
System Performance: Queuing
Handling Routing Transport Haifa JFK TLV BGN To: Yishay From: Vered
COMP60611 Fundamentals of Parallel and Distributed Systems
COMP60621 Designing for Parallelism
Queuing Analysis Two analytical techniques can be employed to study queuing processes: Shock wave analysis Demand-capacity process is deterministic Suited.
Lecture 13 – Queuing Systems
COMP60621 Designing for Parallelism
COMP60621 Designing for Parallelism
Queueing Theory 2008.
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
VIRTUE MARYLEE MUGURACHANI QUEING THEORY BIRTH and DEATH.
Presentation transcript:

COMP60611 Fundamentals of Parallel and Distributed Systems Lecture 13 Queueing Theory: Part 1 John Gurd, Graham Riley Centre for Novel Computing School of Computer Science University of Manchester

Queueing Theory Mathematical study of waiting in queues (lines) Another model of concurrent activity Applicable to many situations Everyday situations, such as: Supermarket check-outs Bank tellers Airport landings Passport control Computer Science applications: Scheduling read/write accesses to disk Scheduling tasks on multiple servers 31/12/2018

Single-channel Queue 31/12/2018

Single Queue, Multiple Servers Arrival of Customers 31/12/2018

Multiple Queues, Multiple Servers Departure of Customers Arrival of Customers Customer free to join any queue 31/12/2018

Queueing Problems There are three basic elements to any queueing problem: The input process – the arrivals rate The queueing discipline – number of queues, etc. The service mechanism – the service rate 31/12/2018

Input Process Number of potential customers: Finite or infinite Number arriving simultaneously: One or many (with constant or varying batch size(s)) Intervals between arrivals: Constant, completely random, other statistical distribution Average rate of arrivals: Constant, varying with time, influenced by state of queue Outside influence: None, input is output of previous queue, network of queues Etc. 31/12/2018

Queueing Discipline Number of queues: Queue discipline: Etc. One, multiple (fixed number or varying numbers) Queue discipline: Served in order of arrival (FIFO – “fair” queue) Served in inverse order of arrival (LIFO – “unfair” queue) Served at random Served in priority order (based on “need”?) Changes from time-to-time Etc. 31/12/2018

Service Mechanism Number of service points: Number served: Etc. One, several (fixed number or varying numbers) Number served: One-at-a-time, in batches (with fixed or variable batch size(s)) Etc. 31/12/2018

Effectiveness of Queues For given assumptions about the three basic elements of a queueing problem (input, discipline, service), we can set up a mathematical model to predict the behaviour of the system, to answer questions such as: What is the average queue size? What is the average waiting time? What is the probability of waiting longer than a given time? Etc. Thereby we can compare different queuing scenarios and plan appropriate resources. 31/12/2018

Simple Example of Queue Behaviour Arrivals: let  be a constant that represents the average rate of arrivals. For random arrivals, in any short time interval (t,t+∂t), The probability that there is no arrival is Pr{no arrival} = 1 – ∂t + o(∂t), where lim(o(∂t)/ ∂t) = 0 as ∂t → 0 (i.e., o(∂t) is negligible compared with ∂t). The probability that there is one arrival is Pr{one arrival} = ∂t + o(∂t). The probability that there is more than one arrival is Pr{two or more arrivals} = o(∂t). N.B. The probability of an arrival (or not) in any interval (t,t+∂t) is independent of t and is independent of any other non-overlapping interval. Arrival (or non-arrival) in any given interval is thus not influenced in any way by what happened at earlier times. 31/12/2018

Poisson Arrivals The number of arrivals, N, in a finite interval (t,t+x) of length x is a random variable which has a Poisson distribution with parameter x. Pr{N=n} = probability of n arrivals in (t,t+x) = 31/12/2018

Poisson Arrivals Proof: Suppose that the interval x is divided into m equal subintervals of length x/m = ∂t, then: Pr{one arrival in any subinterval} = ∂t + o(∂t), Pr{no arrival in any subinterval} = 1 – ∂t + o(∂t). Hence: Pr{exactly n arrivals in (t,t+x)} = (One arrival in each of n subintervals, and no arrivals in the remaining (m – n) subintervals; note that m > n.) 31/12/2018

Poisson Arrivals Hence: Pr{exactly n arrivals in (t,t+x)} = Thus N has a Poisson distribution with parameter x. 31/12/2018

Inter-arrival Time The time that elapses between arrivals is called the inter-arrival time. Denoting this by the continuous random variable T, it can be shown that T has a negative exponential distribution: Pr{T>t} = Pr{no arrival in (0,t)} = Equivalently, Pr{T≤t} = Pr{arrival in (0,t)} = 1 – Pr{T>t} = 31/12/2018

Pr{no arrival in (0,t)} 0 2 4 6 8 10 t 31/12/2018

Pr{arrival in (0,t)} 0 2 4 6 8 10 t 31/12/2018

Equivalence The following three statements are equivalent: Pr{no arrivals in (t,t+∂t)} = 1 – ∂t + o(∂t) and Pr{one arrival in (t,t+∂t)} = ∂t + o(∂t). The number of arrivals in any interval of length x is a random variable N which has a Poisson distribution with parameter x. The inter-arrival time between successive arrivals is a random variable T which has a negative exponential distribution with parameter . We now turn our attention to the service mechanism. 31/12/2018

Service Mechanism We assume a single server and that the service time X is a random variable with a negative exponential distribution with parameter . Thus Pr{X>x} = Alternatively, the probability that a service that has been in progress for time x terminates in the interval (x,x+∂x) is ∂x + o(∂x). Or, the probability that a service that has been in progress for time x does not terminate in the interval (x,x+∂x) is 1 – ∂x + o(∂x). Alternatively, the number of customers N that can be serviced during the interval (t,t+x) is a random variable that has a Poisson distribution with parameter x and Pr{N=n} = 31/12/2018

Shorthand Notation for Queues Different kinds of queue are denoted by X/Y/Z, where X is the inter-arrival distribution, Y is the service time distribution, and Z is the number of servers. The permitted distributions are: M = negative exponential (Markovian) D = constant (Deterministic) G = General independent M/M/1 thus denotes a single server queue with random arrivals (negative exponential inter-arrival times) and random service completions (negative exponential service times); While D/M/2 denotes a two-server queue with regular arrivals (constant inter-arrival times) and random service completions (negative exponential service times). 31/12/2018