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.

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
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)
Probability, Statistics, and Traffic Theories
Lecture 13 – Continuous-Time Markov Chains
#11 QUEUEING THEORY Systems Fall 2000 Instructor: Peter M. Hahn
ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar
Performance analysis for high speed switches Lecture 6.
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.
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.
1 Overview of Queueing Systems Michalis Faloutsos Archana Yordanos The web.
CS533 Modeling and Performance Evaluation of Network and Computer Systems Queuing Theory (Chapter 30-31)
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Instructor Longin Jan Latecki C12: The Poisson process.
Queueing Theory.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
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)
Queuing Networks: Burke’s Theorem, Kleinrock’s Approximation, and Jackson’s Theorem Wade Trappe.
Introduction to Queuing Theory. 2 Queuing theory definitions  (Kleinrock) “We study the phenomena of standing, waiting, and serving, and we call this.
Lecture 4 Mathematical and Statistical Models in Simulation.
Internet Queuing Delay Introduction How many packets in the queue? How long a packet takes to go through?
CMPE 252A: Computer Networks Review Set:
1 Exponential Distribution & Poisson Process Memorylessness & other exponential distribution properties; Poisson process and compound P.P.’s.
Introduction to Queuing Theory
Eurecom, Sophia-Antipolis Thrasyvoulos Spyropoulos / Introduction to Continuous-Time Markov Chains and Queueing Theory.
Simulation Output Analysis
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  …
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.
Tch-prob1 Chap 3. Random Variables The outcome of a random experiment need not be a number. However, we are usually interested in some measurement or numeric.
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Introduction to Operations Research
Lecture 10: Queueing Theory. Queueing Analysis Jobs serviced by the system resources Jobs wait in a queue to use a busy server queueserver.
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
Introduction to Queueing Theory
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
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.
TexPoint fonts used in EMF.
1 Elements of Queuing Theory The queuing model –Core components; –Notation; –Parameters and performance measures –Characteristics; Markov Process –Discrete-time.
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.
Queuing Theory and Traffic Analysis Based on Slides by Richard Martin.
Why Wait?!? Bryan Gorney Joe Walker Dave Mertz Josh Staidl Matt Boche.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
M/M/1 Queues Customers arrive according to a Poisson process with rate. There is only one server. Service time is exponential with rate  j-1 jj+1...
CS352 - Introduction to Queuing Theory Rutgers University.
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.
Computer Networking Queueing (A Summary from Appendix A) Dr Sandra I. Woolley.
Chapter 2 Probability, Statistics and Traffic Theories
Maciej Stasiak, Mariusz Głąbowski Arkadiusz Wiśniewski, Piotr Zwierzykowski Model of the Nodes in the Packet Network Chapter 10.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Queueing Systems.
CS 4594 Broadband Intro to Queuing Theory. Kendall Notation Kendall notation: [Kendal 1951] A/B/c/k/m/Z A = arrival probability distribution (most often.
COMT 4291 Queuing Analysis COMT Call/Packet Arrival Arrival Rate, Inter-arrival Time, 1/ Arrival Rate measures the number of customer arrivals.
Chap 2 Network Analysis and Queueing Theory 1. Two approaches to network design 1- “Build first, worry later” approach - More ad hoc, less systematic.
Mohammad Khalily Islamic Azad University.  Usually buffer size is finite  Interarrival time and service times are independent  State of the system.
Queueing Theory What is a queue? Examples of queues:
Internet Queuing Delay Introduction
Lecture on Markov Chain
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Internet Queuing Delay Introduction
TexPoint fonts used in EMF.
Queueing Theory 2008.
Carey Williamson Department of Computer Science University of Calgary
Course Description Queuing Analysis This queuing course
Presentation transcript:

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 an experiment, and we can assign probabilities to these outcomes. r For the role of a die and rv Y: P{Y=i} = 1/6 for any number i=1,2,3,4,5,or 6. r For the role of a pair of dice and rv X: P{X=2} = 2/36 P{X=3} = 2/36 P{X=4} = 4/36 P{X=5} = 4/36 and so on...

Bernoulli and Binomial RVs r Suppose a trial can be classified as either a success or failure (arrival of a packet or not). r For an rv X, let X=1 for an arrival, and X=0 for a non-arrival, and let p be the chance of an arrival. r p(0) = P{X=0} = 1 - p p(1) = P{X=1} = p r Suppose we had n trials. Then for a series of trials, define a binomial RV with parameters (n,p) as:

Poisson Random Variables r Poisson is an estimation of a binomial RV with params (n,p) r Let =np, therefore p= /n. r Remember that terms in box equal to about 1

Poisson RVs r In short, for poisson rv, we have the following distribution r The mean is r Take an interval [0,t] and N(t), the number of events occurring in that interval. r Without additional derivation, take it as true that r The number of events occurring in any fixed interval of length t is stated above. (It’s a Poisson random variable with parameter t and mean of t.)

Exponential RVs r The exponential rv arises in the modelling of the time between ocurrence of events. m Packet interarrival times r exponential rv X with parameter lambda: r The probability that this time exceeds h seconds r For a poisson random variable, the time between events is an exponentially distributed r.v.

Relationship Between RVs r The number of trials (time units) until the arrival of a packet is a geomtric random variable. r As the number of trials gets large, the approaches an exponential random variable T The interval [0,T] has been divided into n sub-intervals. The number of packets arriving is a binomial random variable, but with a large number of trials, can becomes a Poisson r.v T

Generic Delay Model The Big Black Box of delay (T seconds) Arriving customers Departing Customers

Some terms… r Each customer spends T seconds in the box, representing service time. r Let N(t) represent the number of customers in the system at time t. r Throughput: average number of messages per second that pass through the system.

Generic Delay Model The Big Black Box of delay (T seconds) Arriving customers Departing Customers A(t) N(t)= A(t) - D(t) D(t)

Arrivals r Let A(t) be the number of arrivals from time t=0 to time t. r Let D(t) be the number of departures. r Then number in system at time t: N(t) = A(t) - D(t). Assuming the system was empty at t=0.

Generic Delay Model The Big Black Box of delay (T seconds) Arriving customers Departing Customers A(t) N(t)= A(t) - D(t) D(t)

Num. of Customers in the system r Let a 1 be the 1 st arrival in the system. The 2 nd comes a 2 time units later a1a1 a2a2 a3a3 a4a4 A(t) t

Avg num in the system r The number in the system at time t. T1T1 T2T2 T3T3 T4T4 a1a1 a2a2 a3a3 a4a4 A(t) t D(t)

Avg num in the system r The number in the system at time t. T1T1 T2T2 T3T3 T4T4 a1a1 a2a2 a3a3 a4a4 A(t) t D(t) N(t)

Arrivals r Let a 1 be the 1 st arrival in the system. The 2 nd comes a 2 time units later. r Therefore the n th customer comes at time a 1 + a 2 + a 3 +  + a n. r The avg arrival rate,, up to the time when the n th customer arrives is n / (a 1 + a 2 +  + a n ) = customer/sec r Note the avg interarrival rate of customers is the reciprocal of : (a 1 + a 2 +  + a n ) /n sec/customer r Arrival rate = 1/(mean of interarrival time).

Queuing fun r The long-term arrival rate is therefore customers/sec r Similarly, we can derive throughput  Throughput = customers/sec Note the average service time is 1/ .

Example r We are in line at the bank behind 10 people, and we estimate the teller taking around 5 minutes/per customer. r The throughput is the reciprocal of average time in service = 1/5 persons per minute r How long will we wait at the end of the queue? The queue size divided by the processing rate = 10/(1/5) = 50 minutes.

Kendall Notation r Queuing systems are classified by a specific notation denoting: m The customer arrival pattern m The service time distribution m The number of servers m The maximum number of customers in the system. r E.g., M/M/1/  Exponential interarrivals, exponential service times, 1 server, infinite buffer. (usually “M/M/1”) r M= exponential, D= deterministic, G= general r E.g., M/M/c/K exponenetial interarrivals, exponential service times, c servers, K customers can queue. queue server

M/M/1 Queue r In a steady state, i.e., < . r Interarrival time are random and have an exponential distribution. r FIFO servicing. r Service time is random and has an exponential distribution. r 1 server r No limit to the size of the queue. queue server

M/M/1 Queue: busy period r Let’s derive traffic intensity . r Let P 0 be the probability of that the system is idle. r The system is defined to be in steady state, so what goes in must come out. = (0 customers)P 0 +  (1-P 0 ) =  (1-P 0 ) P 0 = 1 - ( /  ) r The utilization is 1-P 0 = ( /  ) =  r  is in Erlang units and is a measure of traffic intensity.

M/M/1: Coming and Going r The interarrival times are exponential with mean ; We know the number of arrivals A(t) in an interval t is given by a Poisson random variable r It has a mean E[A(t)]= t r We can say the same of the departure times: they are exponential with a rate . The number of departures are a Poisson rv, the mean is E[D(t)]=  t

More Derivation Fun r So what can we do with E[A(t)]= t and E[D(t)]=  t? r With some derivation, we can figure out probabilities and expected means of m The mean number of customers in the system m The mean time customers spend in the system m The mean number queued up. m The mean time spent being queued up. r To do this we are going to set up a state diagram and solve for equations.

States r Let the “state” of our system be equal to the number of customers in the system. r Because we are modeling using Exponential RVs, the M/M/1 queue is memoryless. r The transition to a new state is independent of time spent in the current state, all that matters is the number in the system. r There is a certain probability of being in any state n. r In a steady state, this probability becomes independent of time and is written P n. r Hence, that’s why we considered the idle time as P 0.

Markovian Models r For any small interval of time t, there is a small chance of an arrival, and a small chance of a departure. r Let’s make t small enough that the chance of both a departure and arrival is negligible. 0 1 t tt 2 3 t tt

r For an arbitrary set of states, we have the following set of transition probabilities r Because we are in steady state, the flow between states (the transition probabilities) must balance. ( P n-1 )t= (  P n )t States n- 1 n t tt n+1 t tt 0 1 t tt 2 t tt...

Transition Probabilities r Because we are in steady state, the flow between states (the transitions) must balance. (  P n+1 )t= ( P n )t P n+1 = /  P n P n+1 =  P n r Let’s use this recurrence to solve for P n. For n=1, P 1 =  P 0. For n=2, P 2 =  P 1 =  2 P 0 P n =  n P 0 r These probabilities must sum to 1…

Solving the Recurrence r P n =  n P 0. These probabilities must sum to 1: and therefore and substituting above P n =  n (1-  )

Mean number in system r What can we do with this? r It tells us the probability that there are n customers in the system. r Therefore, to find the mean number of customers in the system, it’s and substituting above P n =  n (1-  )

Mean number of packets in the sys r What’s the mean number of packets in the system? r It’s the sum of the number of customers times the probability of that state.

Mean number in Queue r Notice the mean number in queue is larger than 1 even for the smallest traffic intensities. r And that the queue size tends towards infinity even though the service rate is larger than the arrival rate

Mean time in system r Call the mean time packets are in the system E[T]. r We know from Little’s Law that: E[N] = E[T] r Therefore, E[T] = E[N]/ =  / (1-  )

Meantime waiting in Queue r The mean time waiting in queue E[Q], is the time spent in the system not being serviced. r How long do we wait in service on average? m The reciprocal of the departure rate (1/  `.

Summary r E[N] = mean number in system r E[T] = mean time in system r = average arrival rate r avg number in system is equal to the avg number in queue and the avg number in service E[N] = E[N q ]+E[N s ] r Avg time in systems is equal to the avg time in queue and the avg time in service E[T] = E[Q]+E[X] r From Little’s Law that E[N] = E[T] r And E[N q ] = E[Q]

Summary r From Little’s Law that E[N] = E[T] r And E[N q ] = E[Q] r Given any one of E[N], E[N q ], E[T], or E[Q], we can calculate the other three; assuming we know and E[X]. r For example, if I tell you E[T], then E[N]= E[T], E[Q]= E[T]-E[X] E[N q ]= E[Q] = (E[T]-E[X])

Summary r We also know that E[N]=  /(1-  ) E[T] = E[N]/ =  / (1-  ) r We know that E[X] = 1/  =  / m therefore E[T]= E[X]/(1-  ) r and E[Q] =  /(1-  )  r and E[Q]=  E[X]/(1-  ) r E[N q ] = E[Q]=  /(1-  )  =  2 /(1-  )