COMP60611 Fundamentals of Parallel and Distributed Systems

Slides:



Advertisements
Similar presentations
Chapter 13 Queueing 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.
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.
Stochastic Processes Dr. Nur Aini Masruroh. Stochastic process X(t) is the state of the process (measurable characteristic of interest) at time t the.
Lecture 13 – Continuous-Time Markov Chains
Nur Aini Masruroh Queuing Theory. Outlines IntroductionBirth-death processSingle server modelMulti server model.
Chap. 20, page 1051 Queuing Theory Arrival process Service process Queue Discipline Method to join queue IE 417, Chap 20, Jan 99.
Model Antrian By : Render, ect. Outline  Characteristics of a Waiting-Line System.  Arrival characteristics.  Waiting-Line characteristics.  Service.
Multiple server queues In particular, we look at M/M/k Need to find steady state probabilities.
Data Communication and Networks Lecture 13 Performance December 9, 2004 Joseph Conron Computer Science Department New York University
To accompany Quantitative Analysis for Management, 9e by Render/Stair/Hanna 14-1 © 2003 by Prentice Hall, Inc. Upper Saddle River, NJ Chapter 14.
HW # Due Day: Nov 23.
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
Lecture 14 – Queuing Systems
Queuing Theory (Waiting Line Models)
Slide - 1 Dr Terry Hinton 6/9/05UniS - Based on Slides by Micro Analysis & Design An example of a Simulation Simulation of a bank: Three tasks or processes:
Spreadsheet Modeling & Decision Analysis
Introduction to Management Science
Copyright warning. COMP5348 Lecture 6: Predicting Performance Adapted with permission from presentations by Alan Fekete.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
Simulation Examples ~ By Hand ~ Using Excel
1 Performance Evaluation of Computer Networks: Part II Objectives r Simulation Modeling r Classification of Simulation Modeling r Discrete-Event Simulation.
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.
NETE4631:Capacity Planning (2)- Lecture 10 Suronapee Phoomvuthisarn, Ph.D. /
Stochastic Models Lecture 2 Poisson Processes
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
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 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.
Example simulation execution The Able Bakers Carhops Problem There are situation where there are more than one service channel. Consider a drive-in restaurant.
Modeling and Simulation Queuing theory
WOOD 492 MODELLING FOR DECISION SUPPORT Lecture 25 Simulation.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
Simulation in Healthcare Ozcan: Chapter 15 ISE 491 Fall 2009 Dr. Burtner.
© 2015 McGraw-Hill Education. All rights reserved. Chapter 17 Queueing Theory.
Queuing Models.
Simple Queueing Theory: Page 5.1 CPE Systems Modelling & Simulation Techniques Topic 5: Simple Queueing Theory  Queueing Models  Kendall notation.
Simulation. Types of simulation Discrete-event simulation – Used for modeling of a system as it evolves over time by a representation in which the state.
1 BIS 3106: Business Process Management (BPM) Lecture Nine: Quantitative Process Analysis (2) Makerere University School of Computing and Informatics Technology.
Modeling the Optimization of a Toll Booth Plaza By Liam Connell, Erin Hoover and Zach Schutzman Figure 1. Plot of k values and outputs from Erlang’s Formula.
Introduction to Probability - III John Rundle Econophysics PHYS 250
Computer Simulation Henry C. Co Technology and Operations Management,
OPERATING SYSTEMS CS 3502 Fall 2017
Models of Traffic Flow 1.
Queueing Theory What is a queue? Examples of queues:
2.7: Simulation.
Queuing Theory Non-Markov Systems
Chapter 9: Queuing Models
Modeling and Simulation CS 313
Chapter 10 Verification and Validation of Simulation Models
Demo on Queuing Concepts
Lecture on Markov Chain
Birth-Death Process Birth – arrival of a customer to the system
Solutions Queueing Theory 1
System Performance: Queuing
MATS Quantitative Methods Dr Huw Owens
DECISION MODELING WITH Prentice Hall Publishers and
COMP60621 Designing for Parallelism
COMP60611 Fundamentals of Parallel and Distributed Systems
COMP60621 Fundamentals of Parallel and Distributed Systems
COMP60621 Designing for Parallelism
COMP60621 Designing for Parallelism
COMP60611 Fundamentals of Parallel and Distributed Systems
Stochastic Processes A stochastic process is a model that evolves in time or space subject to probabilistic laws. The simplest example is the one-dimensional.
Queuing Models J. Mercy Arokia Rani Assistant Professor
COMP60611 Fundamentals of Parallel and Distributed Systems
LECTURE 09 QUEUEING THEORY PART3
Presentation transcript:

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

Analysis of M/M/1 Queue Diagrammatic representation of the queue at any particular time: queue service queue service XXXX X - 4 in queue, none in queue, 1 being served none being served We wish to trace the queue behaviour over time and, hopefully, identify long-term steady-state characteristics. At time t, let N(t) be a random variable that describes the number (of customers) in the system. Q(t) is a related random variable that describes the number in the queue: 09/12/2018

Analysis of M/M/1 Queue N(t) increases by 1 with each arrival and decreases by 1 with each service completion. N(t) 5 4 3 2 1 A1 A2 A3 A4 A5 S1 A6 S2 S3 …… S6 t This diagram could represent a general G/G/1 queue. It will represent an M/M/1 queue if the inter-arrival times A2-A1, A3-A2, … and the service times S1-A1, S2-S1, S3-S2, … both satisfy negative exponential distributions. 09/12/2018

Analysis of M/M/1 Queue 09/12/2018

Analysis of M/M/1 Queue 09/12/2018

Analysis of M/M/1 Queue 09/12/2018

Analysis of M/M/1 Queue is referred to as the traffic intensity. 09/12/2018

Some Interesting Consequences 09/12/2018

Some Interesting Consequences 09/12/2018

Simple Example That’s a lot of theory! What does it all mean? Consider a TV repair shop. TVs arrive for repair at random at an average rate of 4 per day (assume an 8 hour day). A single repair service does the repairs; the average time for repair is 1.5 hours and repair times satisfy a negative exponential distribution. Arrivals:  = 0.5 (0.5 sets per hour in the 8 hour day) Service:  = 2/3 (0.667 repairs per working hour – the average repair time is 1/ = 1.5 working hours). 09/12/2018

TV Repair Shop Example 0 2 4 6 8 10 09/12/2018

TV Repair Shop Characteristics Hence, traffic intensity ρ = / = 0.5/0.667 = 0.75 (75%). Expected number of TV sets in system = L = ρ/(1 – ρ) = 0.75/0.25 = 3.00. Expected number of TV sets in queue = L – ρ = 2.25. Mean queueing time = /{( – )} = 0.5/{0.67(0.67 – 0.5)} = 0.5/{0.667*0.183} = 4.5 hours. Mean time in system = 1/( – ) = 1/(0.667 – 0.5) = 6 hours. 09/12/2018

TV Repair Shop Characteristics 09/12/2018

Analysis of M/M/k Queue We have shown how to analyse a very simple system: M/M/1 queue We now consider a more challenging and more concurrent scenario: M/M/k queue Arrival of Customers 09/12/2018

System Characteristics Arrivals: Customers arrive, at random, at a rate ; i.e. random arrivals with inter-arrival time a random variable with a negative exponential distribution with parameter . They form a single queue for the multiple servers. Service: Served by one of k service points, each having a service time which is a random variable with negative exponential distribution with (the same) parameter . Assuming that  < k (the arrival rate is less than the cumulative service rate), there exists a steady state solution. 09/12/2018

Analysis of M/M/k Queue 09/12/2018

Analysis of M/M/k Queue 09/12/2018

Analysis of M/M/k Queue 09/12/2018

Simple Example (See Sasieni, Yaspan & Friedman, 1959). An insurance company has two claims adjusters in its branch office. People with claims arrive in Poisson fashion at an average rate of 20 per 8 hour working day. The length of time an adjuster spends with each claimant satisfies a negative exponential distribution with a mean service time of 40 minutes. What is the average time in the queue and what is the average time in the system? How would this vary if the company employed an extra claims adjuster? Arrivals:  = 2.5 (2.5 claimants per hour in the 8 hour day) Service:  = 1.5 (1.5 claims per working hour – the average service time is 1/ = 0.667 working hours). 09/12/2018

Characteristics 09/12/2018

Characteristics 09/12/2018

Effect of an Extra Adjuster 09/12/2018

Effect of an Extra Adjuster 09/12/2018

Discrete Event Simulation Thus far, our models of queueing systems have been analytical (and simple); in particular, the assumptions about queueing behaviour and service behaviour have been especially simple. The behaviour of the queue has been described by equations that have been capable of solution, so that we have been able to predict useful quantities, such as mean queueing time, mean queue length, etc. The models have enabled the solution of “what if” questions, such as “what happens if we increase the number of service points?” 09/12/2018

Discrete Event Simulation Yet, the analysis was already beginning to get unwieldy! In real life, queueing systems are fundamentally too complicated to be modelled by such relatively simple analytical models. The only way to capture the behaviour of more complicated, and complex, queueing systems is by means of simulation models. This means of study has become known as Discrete Event Simulation. 09/12/2018

Discrete Event Simulation Build a (computational) simulation model so that the behaviour of the simulation model replicates the behaviour of the real system as far as the properties being modelled are concerned. The simulation model includes parameters such as average arrival rate, average service time, number of service points, etc. Model inter-arrival times according to some suitable probability distribution, and model service times in a similar way – Monte Carlo simulation. Evolve the simulation system by tracking from one event to the next: Arrival  if there is an available server, go to be served, else enter queue; Service completion  leave system and, if queue is not empty, begin new service for the task at the head of the queue. 09/12/2018

Discrete Event Simulation Suppose inter-arrival times satisfy a negative exponential distribution with parameter . Determine a random number that is uniformly distributed in the range [0,1] and use this to predict the inter-arrival time and, hence, the next arrival (see graph on next slide). Model service times in a similar way: a negative exponential distribution with parameter . 09/12/2018

Pr{arrival in (0,t)} 0 2 4 6 8 10 inter-arrival time 09/12/2018

Discrete Event Simulation Thus, given the first arrival (at time t = 0), we can use the sequence of predicted inter-arrival times to predict all subsequent arrival times. Each arrival enters an ordered queue. Customers/tasks are removed from the head of the queue whenever there is an available service point. The time to complete a service is predicted in a similar fashion to the prediction of inter-arrival times, but with a parameter , rather than . The same uniform random number generator can be used to drive both predictions (inter-arrival times and service times). 09/12/2018

Discrete Event Simulation Discrete event simulation is used in many contexts. A typical example is given by one of our current research projects, which is using a discrete event simulation package called SimGrid to model the scheduling of the computational tasks constituting a large concurrent application to some number of heterogeneous parallel processors, as typified by the architecture of a modern HPC (High Performance Computing) system. The concurrent tasks are represented by the nodes of a DAG (directed acyclic graph), and the data dependencies between the tasks are represented by the arcs of the DAG. The objective is to schedule the nodes of the DAG to the heterogeneous processors in such a way as to minimise the overall execution time. 09/12/2018

Summary Queueing systems occur in many different situations in real life, and it is frequently necessary to anticipate the way that such systems will behave in practical scenarios. We have introduced queueing theory as a useful vehicle for analysing the behaviour of (relatively simple) queueing systems. We have further introduced Discrete Event Simulation as a means of approaching more complicated queueing systems, where analysis becomes too difficult. 09/12/2018