# 25 Queueing

• View
226

3

Tags:

Embed Size (px)

### Text of 25 Queueing

• Copyright : Nahrstedt, Angrave, Abdelzaher, Caccamo*Queueing Systems

• Copyright : Nahrstedt, Angrave, Abdelzaher*Content of This LectureGoals:Introduction to Principles for Reasoning about Process Management/Scheduling

Things covered in this lecture:Introduction to Queuing Theory

• Copyright : Nahrstedt, Angrave, Abdelzaher*Process States Finite State Diagram

• Copyright : Nahrstedt, Angrave, Abdelzaher*Queueing ModelRandom Arrivals modeled as Poisson process

• Copyright : Nahrstedt, Angrave, Abdelzaher*DiscussionIf a bus arrives at a bus stop every 15 minutes, how long do you have to wait at the bus stop assuming you start to wait at a random time?

• Copyright : Nahrstedt, Angrave, Abdelzaher*Queuing Theory (M/M/1 queue) ARRIVAL RATE (Poisson process)SERVICE RATE Input QueueServerthe distribution of inter-arrival times between two consecutive arrivals is exponential (arrivals are modeled as Poisson process)

service time is exponentially distributed with parameter

• M/M/1 queueThe M/M/1 queue assumes that arrivals are a Poisson process and the service time is exponentially distributed.

Interarrival times of a Poisson process are IID (Independent and Identically Distributed) exponential random variables with parameter

1t2Arrival times:- independent from each other! each interarrival i follows an exponential distribution

• Appendix: exponential distributionIf is the exponential random variable describing the distribution of inter-arrival times between two consecutive arrivals, it follows that: The probability density function (pdf) is:Probability to have the first arrival within is 1-e- tcumulative distributionfunction (cdf)0

• Copyright : Nahrstedt, Angrave, AbdelzaherQueueing TheoryQueuing theory assumes that the queue is in a steady state

M/M/1 queue model:Poisson arrival with constant average arrival rate (customers per unit time) Each arrival is independent. Interarrival times are IID (Independent and Identically Distributed) exponential random variables with parameter What are the odds of seeing the first arrival before time t?

• Copyright : Nahrstedt, Angrave, Abdelzaher*Analysis of Queue Behavior

Poisson arrivals: probability n customers arrive within time interval t is

• Copyright : Nahrstedt, Angrave, Abdelzaher*Analysis of Queue Behavior

Probability n customers arrive within time interval t is:

Do you see any connection between previous formulas and the above one?

• Copyright : Nahrstedt, Angrave, Abdelzaher*Littles Law in queuing theoryThe average number L of customers in a stable systemis equal to the average arrival rate times the average time W a customer spends in the systemIt does not make any assumption about the specific probability distribution followed by the interarrival times between customers

Wq= mean time a customer spends in the queue

= arrival rate

Lq = Wq number of customers in queue

W = mean time a customer spends in the entire system (queue+server)

L = W number of customers in the system

In words average number of customers is arrival rate times average waiting time

• Copyright : Nahrstedt, Angrave, Abdelzaher*Analysis of M/M/1 queue model Server Utilization:

mean time Ws a customer spends in the server is 1/, where is the service rate.

According to M/M/1 queue model, the expected number of customers in the Queue+Server system is:

Quiz: how can we derive the average time W in the system, and the average time Wq in the queue?

• Copyright : Nahrstedt, Angrave, Abdelzaher*Hamburger Problem7 Hamburgers arrive on average every time unit

8 Hamburgers are processed by Joe on average every unit

Av. time hamburger waiting to be eaten? (Do they get cold?) Ans = ????

Av number of hamburgers waiting in queue to be eaten? Ans = ????Queue78

• Copyright : Nahrstedt, Angrave, Abdelzaher*Example: How busy is the server?=2=3

• Copyright : Nahrstedt, Angrave, Abdelzaher*How long is an eater in the system?=2=3

• Copyright : Nahrstedt, Angrave, AbdelzaherHow long is someone in the queue?=2=3

• Copyright : Nahrstedt, Angrave, AbdelzaherHow many people in queue?=2=3

• Copyright : Nahrstedt, Angrave, Abdelzaher*Interesting FactAs approaches one, the queue length becomes infinitely large.

• Copyright : Nahrstedt, Angrave, Abdelzaher*Until Now We Looked at Single Server, Single Queue ARRIVAL RATE SERVICE RATE Input QueueServer

• Copyright : Nahrstedt, Angrave, Abdelzaher*Sum of Independent Poisson Arrivals ARRIVAL RATE 1SERVICE RATE Input QueueServerARRIVAL RATE 2= 1+ 2If two or more arrival processes are independent and Poisson with parameter i, then their sum is also Poisson with parameter equal to the sum of i

• Copyright : Nahrstedt, Angrave, Abdelzaher*As long as service times are exponentially distributed... ARRIVAL RATE SERVICE RATE 1Input QueueSERVICE RATE 2Combined =1+2

• Copyright : Nahrstedt, Angrave, Abdelzaher*Question: McDonalds ProblemA) Separate Queues per ServerB) Same Queue for ServersQuiz: if WA is waiting time for system A, and WB is waiting time for system B, which queuing system is better (in terms of waiting time)?

******w = average time spent by an aperiodic task in the system. = / ; = average arrival rate; = average service rate.

***************

Recommended

Documents
Documents
Documents
Documents
Documents
Documents
Technology
Documents
Documents
Documents
Documents
Documents