Queueing System Dr Eric Hsiaokuag Wu hsiaocsie ncu



![Discrete Random Variable for Poisson w PMF w w w Mean E[X] = λ Discrete Random Variable for Poisson w PMF w w w Mean E[X] = λ](https://slidetodoc.com/presentation_image_h/aeddfe67ec44b9b77b26576870f57324/image-4.jpg)













![Exercise: Phone Call Duration w Probability Density Function (pdf) E[t] = 1 / λ Exercise: Phone Call Duration w Probability Density Function (pdf) E[t] = 1 / λ](https://slidetodoc.com/presentation_image_h/aeddfe67ec44b9b77b26576870f57324/image-18.jpg)





































- Slides: 55
Queueing System Dr. Eric Hsiaokuag Wu hsiao@csie. ncu. edu. tw http: //wmlab. csie. ncu. edu. tw/course/queueing 2010 Spring Wireless & Multimedia Network Laboratory
Agenda w Poisson Distribution for Arrival Behavior • Three case studies (spelling errors in a page, messages, traffic) w Exponential Distribution for Requested Service Behavior • Waiting time, memoryless property, hair cut w Discrete State, Continuous Time: Birth-Death Process m/m/1 (Poisson Arrival, Exponential Service). Wireless & Multimedia Network Laboratory
Discrete Random Variable X (Example: Bernoulli Random Variable) w w w Probability Mass Function (e. g. p(1) = p) Cumulative Distribution Function Mean value (e. g. E[X] = p) Variance (e. g. Var[X] = p- p*p ) Probability of Generation Function (1 -p+pz) Wireless & Multimedia Network Laboratory
Discrete Random Variable for Poisson w PMF w w w Mean E[X] = λ Variance Var[X] = λ Z-transform (Quiz 1, Exercise 3) Wireless & Multimedia Network Laboratory
The Poisson Process w w w The number of incoming telephone calls to a switchboard or a trunk The number of job arrivals to a computer system The number of failed components in a large group of initially fault-free components How often they arrive Wireless & Multimedia Network Laboratory
Customer Number of NCU Post office w How many of you have been to NCU Post office last week? Wireless & Multimedia Network Laboratory
Mobile Phone Calls for NCU basestation Basestation Telco Core Network or Private (Fiber) Network Wireless & Multimedia Network Laboratory
Poisson Distribution w Parameter λ (Formula 1) w Parameter λt (Formula 2) Wireless & Multimedia Network Laboratory
n is large (Poisson Approximation) Wireless & Multimedia Network Laboratory
Poisson Distribution~ Wireless & Multimedia Network Laboratory
Example w A manufacture produces IC chips, 1 percent of which are defective. Find the probability that in a box containing 100 chips. No defectives are found. w Adopting Binomial Random Variable: • C 1000 * 0. 010 * 0. 99100 = 0. 366 w Adopting Poisson Approximation: • e-1 = 0. 3679 Wireless & Multimedia Network Laboratory
Exercise 1 (Quality Assurance) (Poisson Approximation, Formula 1) w Errors in a page. (example: 200 words in a page) Wireless & Multimedia Network Laboratory
Exercise 2: (Communication Channel) (Poisson Approximation, formula 2) Wireless & Multimedia Network Laboratory
Exercise 3: Traffic Convergence (Sum of Two Random Variables w Y = X 1 + X 2 wλ 1 wλ 2 Wireless & Multimedia Network Laboratory
Arrival Solution: The Poisson Process w w w The number of incoming telephone calls to a company The number of incoming customers to a post office Probability Mass Function: • Formula 1: • Formula 2: Wireless & Multimedia Network Laboratory
Service Solution: Exponential Distribution w Exponential distribution: • • The amount of time until some specific event occurs The amount of time (starting from now) until an earthquake occurs A phone call duration A customer service time Wireless & Multimedia Network Laboratory
Continuous Random Variable w Uniform Distribution w Exponential Distribution Wireless & Multimedia Network Laboratory
Exercise: Phone Call Duration w Probability Density Function (pdf) E[t] = 1 / λ w Probability Distribution Function (PDF) Wireless & Multimedia Network Laboratory
Telephone Booth Exercise Wireless & Multimedia Network Laboratory
Memory-less Property Wireless & Multimedia Network Laboratory
Memory-less Property (Markov) w Y is memory-less if P{ Y> s+t | Y> t } = P {Y > s }, regardless how long you have waited (or invested, studied) t Wireless & Multimedia Network Laboratory
t= 5 min w After 5 mins t=5 mins Wireless & Multimedia Network Laboratory
t= 5 years (regardless how long you have waited) t=5 years Wireless & Multimedia Network Laboratory
Exercise: waiting for a phone call w I will call you tonight. (It does take a while) Wireless & Multimedia Network Laboratory
Poisson Arrival: Exponential Interarrival w For a Poisson Arrival process, Time between two successive job arrivals to a computing center are independent and identically distributed according to an exponential distribution The number of bus arrival X 3 X 2 Wireless & Multimedia Network Laboratory X 1
Exercise 2: Hair Cut Problem w w How long you are going to wait? Depends on how long a hair cut takes • • Constant Service Time (X = C) Exponential service time behavior (X = a random number) Wireless & Multimedia Network Laboratory
Queueing Model: Example: m/m/1 (Discrete State Continuous Time) How often they arrive how long they will stay = service time + waiting time Wireless & Multimedia Network Laboratory
Case study: Mobile Phone Calls for NCU basestation Basestation Telco Core Network or Private (Fiber) Network Wireless & Multimedia Network Laboratory
State Transition Diagram w Customer number in the system w How fast the state will change (a phone call starts, a phone call ends) w From the very beginning: (Memory-less, Markov Property) l 0 1 m Wireless & Multimedia Network Laboratory
Observation w Current State depends on Previous State (Markov Process) N(t) t Wireless & Multimedia Network Laboratory
Number of Customer in the system M/M/1 l l 1 0 m l 2 m l 3 m Wireless & Multimedia Network Laboratory 4 m m
Format w. M / 1 / 2 Number of buffer size number of server Amount of service a customer require B(x) = P[service time <=x] Arrival Time A(t) = P[interarrival time <= t ] Wireless & Multimedia Network Laboratory
Case Study: M/M/2 w State Transition Diagram l l 1 0 m l 2 2 m l 3 2 m Wireless & Multimedia Network Laboratory 4 2 m 2 m
Solve it (Standard Procedure) w (A) Draw State Transition Diagram (modeling) w (B) Recursive Relation: w Flow balance: rate in = rate out w rate to right = rate to left w (C) Z-transform or solve p(k) w (D) Throughput Analysis: w Little result = N = arrival rate * system time Wireless & Multimedia Network Laboratory
Discouraged Arrivals w Arrivals tend to get discouraged when more and more people are present in the system w One possible way to model the effect to choose the birth and death coefficients as follows: k=0, 1, 2, … k=1, 2, … Wireless & Multimedia Network Laboratory
(A) State Transition Diagram /2 1 0 m /3 k-2 2 m /(k-1) k-1 m m k=0, 1, 2, … k=1, 2, … Wireless & Multimedia Network Laboratory /k /(k+1) k+1 k m m m
(B) Equilibrium Equation /2 1 0 m w /3 k-2 2 m /(k-1) m Flow rate to right = Flow rate to left Wireless & Multimedia Network Laboratory /k k-1 m /(k+1) k+1 k m m m
(C) Solve p(k) Wireless & Multimedia Network Laboratory
(D) Solve Average N and T Wireless & Multimedia Network Laboratory
M/M/ : responsive Servers (infinitive number of servers) w There is always a clerk or server available for each arriving customer w A responsive server who accelerates his service rate linearly when more customers are waiting: k=0, 1, 2, … k=1, 2, … Wireless & Multimedia Network Laboratory
(A) State Transition Diagram λ λ 1 0 m k-2 2 2 m λ λ 3 m k=0, 1, 2, … k=1, 2, … Wireless & Multimedia Network Laboratory λ k-1 (k-1)m λ k km k+1 (k+1)m
(B) Equilibrium Equation λ 1 0 m w λ k-2 2 2 m λ λ 3 m Flow rate to right = Flow rate to left Wireless & Multimedia Network Laboratory λ k-1 (k-1)m λ k km k+1 (k+1)m (k+2)m
(C) Solve p(k) Wireless & Multimedia Network Laboratory
(D) Solve Average N and T Wireless & Multimedia Network Laboratory
M/M/m/m: m-SERVER LOSS System w A blocked calls cleared situation: there available m servers. Each newly arriving customer is given his private server; however, if a customer arrives when all severs are occupied, that customer is lost. k<m K>=m k=1, 2, …, m Wireless & Multimedia Network Laboratory
(A) State Transition Diagram λ λ 1 0 m λ λ m-3 2 2 m 3 m k<m K>=m k=1, 2, …, m Wireless & Multimedia Network Laboratory λ m-2 λ m-1 (m-2) u (m-1) u m
(B) Equilibrium Equation λ 1 0 m w λ m-3 2 2 m λ λ 3 m Flow rate to right = Flow rate to left Wireless & Multimedia Network Laboratory λ m-2 λ m-1 (m-2) u (m-1) u m
(C) Solve p(k) Wireless & Multimedia Network Laboratory
(D) Solve Average N and T Wireless & Multimedia Network Laboratory
Blocking Probability Wireless & Multimedia Network Laboratory
Cyclic queue w Consider a “cyclic queue” in which M customers circulate around through two queueing facilities as shown below: Stage 1 Wireless & Multimedia Network Laboratory Stage 2
(A) State Transition Diagram u 2 1 0 m 1 u 2 m-3 2 m 1 u 1 m 1 k<m K>=m u 2 m-2 u 1 u 2 m-1 m u 1 p(k)= P[ k customers in stage 1 and M-k in stage 2 ] k=1, 2, …, m Wireless & Multimedia Network Laboratory
(B) Equilibrium Equation u 2 1 0 m 1 w u 2 m-3 2 m 1 u 2 m 1 Flow rate to right = Flow rate to left Wireless & Multimedia Network Laboratory u 1 u 2 m-2 u 1 u 2 m-1 m u 1
(C) Solve p(k) Wireless & Multimedia Network Laboratory
(D) Solve Average N and T Wireless & Multimedia Network Laboratory