monchai sopitkamon ph d computer engineering department
play

Monchai Sopitkamon, Ph.D. Computer Engineering Department Kasetsart - PDF document

Monchai Sopitkamon, Ph.D. Computer Engineering Department Kasetsart University An example of single queue systems includes an ATM machine ATM machine. A single line of people waiting to get money forms in front of the machine. in front of


  1. Monchai Sopitkamon, Ph.D. Computer Engineering Department Kasetsart University � An example of single queue systems includes an ATM machine ATM machine. � A single line of people waiting to get money forms in front of the machine. in front of the machine � People in the line use the ATM machine on a First Come First Serve (FCFS) basis Come First Serve (FCFS) basis. � Such ATM machine example constitutes an example of a single server single queue system with FCFS of a single server, single queue system with FCFS queuing discipline . 2

  2. � G/G/1 Queue � M/M/1 Queue � M/M/1 Queue � M/G/1 Queue � M/G/1 with Vacations � M/G/1 with Priorities / / � Approximation Results 3 � The notation G/G/1 means ( G eneric interarrival time distribution)/( G eneric service interarrival time distribution)/( G eneric service time distribution of single server)/( 1 server) 4

  3. � Response time T = W + E[S] where W = avg. time spent waiting in the queue and E[S] = avg. service time � Applying Little’s Law to the waiting line, to the entire queue and to the server we derive queue, and to the server, we derive avg. # of custs in waiting line, N w = λ x W avg # of custs in entire queuing stn N = λ x T avg. # of custs in entire queuing stn, N λ x T avg. # of custs at the server, N s = λ x E[S] Also, N s = fraction of time server is busy (=Utilization , y ( s ( ρ )) Finally, prob that server is idle = 1 – ρ = 1 – λ x E[S] 5 � The average interarrival time of packets to a communication link is equal to 5 ms and each communication link is equal to 5 ms and each packet takes 3 ms on average to be transmitted through the link What is the transmitted through the link. What is the utilization of the link? avg interarrival time 1/ λ 5 ms or λ 1/5 0 2 avg interarrival time = 1/ λ = 5 ms, or λ = 1/5 = 0.2 packets/ms. Therefore the utilization of the link ( ρ ) λ x E[S] Therefore, the utilization of the link ( ρ ) = λ x E[S] = 0.2 packets/ms x 3 ms/packet = 0.6 = 60% 6

  4. � Is a special case of G/G/1 queue when the interarrival times and service times are both exponentially distributed. � “M” stands for Markovian or memoryless which applied to M stands for Markovian or memoryless, which applied to � the interarrival times, means that if the distribution of the time between successive arrivals is exponentially distributed with parameter λ then the distribution of the residual time with parameter λ , then the distribution of the residual time until the next arrival is also exponentially distributed with the same parameter λ . � Applied to the service times, the memorylessness indicates Applied to the ser ice times the memor lessness indicates that the distribution of the residual service time is the same as that of the service time. 7 means that the conditional probability that we need to wait, for example, more than another 10 seconds before the first arrival, given p , , g that the first arrival has not yet happened after 30 seconds, is no different from the initial probability that we need to wait more than 10 seconds for the first arrival. To summarize: "memorylessness" of the probability distribution of the To summarize: memorylessness of the probability distribution of the waiting time T 1 until the first arrival means It does not mean (That would be independence. These two events are not independent.) 8

  5. � is a discrete probability distribution. � expresses the probability of a number of events occurring in a fixed time interval if these events occur with a known f d l f h h k average rate, and are independent of the time since the last event. event. � The probability that there are exactly k occurrences ( k being a non ‐ negative integer, k = 0, 1, 2, ...) is where e is the base of the natural log (= 2.71828...), g 7 , λ is a positive real number, equal to the expected number of occurrences that occur during the given interval. 9 � If λ is defined as the average number of occurrences p per unit time, and if if N t is the number of , t occurrences before time t then we have and the waiting time T until the first occurrence is a continuous random variable with an exponential ti d i bl ith ti l distribution (with parameter λ ). This probability distribution may be deduced from the fact that distribution may be deduced from the fact that 10

  6. � In conclusion: If the number of occurrences follows the Poisson distribution then the follows the Poisson distribution, then the waiting time until the next occurrence follows exponential distribution, and vice versa. l d b d � In other words, Poisson arrivals imply that p y interarrival times are exponentially distributed. distributed. 11 � The Poisson distribution arises in connection with Poisson processes. � It applies to various phenomena of discrete nature (that l h f d h is, those that may happen 0, 1, 2, 3, ... times during a given period of time) whenever the probability of the phenomenon period of time) whenever the probability of the phenomenon happening is constant in time. � Examples of events that can be modelled as Poisson distributions include distributions include: � The number of phone calls at a call center per minute. � The number of times a web server is accessed per minute. p � The number of spelling mistakes a secretary makes while typing a single page. 12

  7. Probability mass function Probability mass function Cumulative distribution function Cumulative distribution function ) P(N=k) k k Source: Wikipedia , http://en.wikipedia.org/wiki/Main_Page 13 Poisson Distribution with lam bda = 0.5 Poisson Distribution with lam bda = 5 700 120% 200 120% 600 600 100% 100% cdf 100% cdf Frequenc 500 150 80% Frequenc 80% 400 60% 100 60% 300 pmf pmf 40% 40% 40% 200 200 pmf f 50 20% 100 20% 0 0% 0 0% 0 0.4 0.8 1.2 1.5 1.9 2.3 2.7 3.1 3.5 3.9 0 1 3 0 1 3 4 5 6 8 9 1 1 1 Frequency C um ulative % Frequency C um ulative % Ch11_Data.xls 14

  8. Probability density function Cumulative distribution function Source: Wikipedia , http://en.wikipedia.org/wiki/Main_Page 15 � Cumulative distribution function (CDF) of an exponentially distributed random variable X with parameter λ is given by λ b F X ( x ) = Pr[X ≤ x ] = 1 – e ‐ λ x F X ( x ) = Pr[X ≤ x ] = 1 e � The average and standard deviation of an exponentially distributed random variable with i ll di ib d d i bl i h parameter λ are both equal 1/ λ . Therefore, the COV of an exponentially distributed random variable is of an exponentially distributed random variable is equal to 1. � Again, Poisson arrivals imply that interarrival times are exponentially distributed. i ll di ib d 16

  9. � Given a random variate U drawn from the uniform Exponentail Distribution distribution in the interval distribution in the interval 250 120% (0, 1], the variate 100% 200 Frequenc cdf df 80% 150 60% 100 pdf 40% has an exponential 50 20% distribution with 0 0% 0 1.3 2.7 4.0 5.3 6.6 8.0 9.3 0.6 2.0 3.3 parameter λ parameter λ . 2 4 5 6 8 9 10 12 13 Frequency C um ulativ e % Ch11_Data.xls 17 � Applying the Generalized Birth ‐ Death theorem with λ theorem with λ i = λ and μ i = μ = 1/E[S] to λ and μ μ 1/E[S] to determine probability p k that there are k customers in the entire queuing station as: h p k = p 0 ( λ / μ ) k = (1 ‐ ρ ) ρ k k = 0, 1, … because we had previously p 0 = (1 ‐ ρ ) and ρ = λ x E[S] ( λ / μ ) λ x E[S] = ( λ / μ ) 18

  10. � From probabilities p k and Little’s Law: ρ = 1 N − ρ E [ S ] = λ = / T N − ρ 1 ρ [ ] E S = − = [ ] W T E S − ρ 1 ρ 2 = λ = N w W − ρ ρ 1 1 19 � A file server received requests from a Poisson process at a rate of 30 requests/sec. Measurement data indicates that the coefficient of variation of the service time of a request at the coefficient of variation of the service time of a request at the file server is very close to 1 and that the average time of a request is 15 ms. What is the average response time at the file server? What would be the average response time if the file server? What would be the average response time if the arrival rate of requests were to double? Since the COV of the service time is equal to 1, the service time is e ponentiall distrib ted Hence the M/M/ model can be sed exponentially distributed. Hence, the M/M/1 model can be used. The average response time, T = E[S]/(1 ‐ ρ ) = E[S]/(1 ‐ λ E[S]) = (15x10 ‐ 3 )/(1 ‐ 30x15x10 ‐ 3 ) = 0.027 seconds. If the arrival rate is doubled to 60 requests/sec then the response time T If the arrival rate is doubled to 60 requests/sec, then the response time T = E[S]/(1 ‐ λ E[S]) = (15x10 ‐ 3 )/(1 ‐ 60x15x10 ‐ 3 ) = 0.15 seconds. This is (0.15/0.027) = more than 5.5 times increase. 20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend