+ All Categories
Home > Documents > BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

Date post: 11-Nov-2014
Category:
Upload: kevin-kaiguara
View: 26 times
Download: 1 times
Share this document with a friend
Description:
BACHELOR OF SCIENCE IN INFORMATICS. SCHOOL NOTES. STRATHMORE UNIVERSITY. COMPUTER SIMULATION.
Popular Tags:
76
BIF3203 Computer Simulation Part II: Analytical Model of queuing systems Nicodemus Maingi [email protected] Phase II First Floor Staffroom, 3B
Transcript
Page 1: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

BIF3203 Computer Simulation Part II: Analytical Model of queuing systems

Nicodemus Maingi [email protected] Phase II First Floor Staffroom, 3B

Page 2: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

The Queuing system n  Stochastic models associated with the queuing - result

when the demands on a process exceed the current capacity of that process.

n  A queuing system: n  Consists of one or more servers that provide service of some

sort to arriving customers. n  Arriving customers finding all servers busy, generally join one

or more queues (lines) in front of the servers, n  Hence the name queuing system.

n  Several examples;, n  bank-teller service, n  computer systems, n  manufacturing systems, n  maintenance systems, n  communications systems etc.

Page 3: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

The Queuing system (2) n  Principal actors in a queuing:

n  Customers n  Servers

Page 4: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Components of a Queuing System/model

n  A queuing system is characterized by three components: n  Arrival process n  Service mechanism n  Queue discipline

Page 5: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Arrival Process n  Entities arrive to the system according to some arrival pattern n  Arrivals are independent of preceding arrivals i.e. successive inter-

arrival times are statistically independent and completely random. n  Arrivals may originate from one or several sources referred to as

the calling population. n  Population of Customers can be considered either limited

(closed systems) or unlimited (open systems). n  An Unlimited population represents a theoretical model of systems

with a large number of possible customers (a bank on a busy street, a motorway petrol station).

n  A limited population may be a number of processes to be run (served) by a computer or a certain number of machines to be repaired by a service man.

Page 6: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Arrival Process (2) n  The term "customer" is taken very generally.

n  Customers may be people, machines of various nature, computer processes, telephone calls, products on an assembly line etc.

n  Most queuing models assume that the population is infinite. n  The arrival process consists of describing how customers arrive to

the system. n  On arrival at the system, they can start service immediately or wait

in a queue if the service mechanism is not free. n  If a customer arrives but fails to enter the system, we say that the

customer has balked (leaving without service). n  The arrival of customers is represented by the time between

successive arrivals (called inter-arrival time). n  If the arrival process is unaffected by the number of customers

present, we usually describe the inter-arrival time by specifying a probability distribution.

Page 7: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Arrival Process (3)

n  Arrival: defines the way customers enter the system. n  Mostly the arrivals are random - with random intervals

between two adjacent arrivals. n  Typically the arrival is described by a random distribution of

intervals also called Arrival Pattern.

Page 8: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2007

Queue Discipline

n  A Queue: represents a certain number of customers waiting for service (of course the queue may be empty).

n  Typically the customer being served is considered not to be in the queue.

n  Sometimes the customers form a queue literally (people waiting in a line for a bank teller). n  Sometimes the queue is an abstraction (planes waiting for a

runway to land). n  There are two important properties of a queue:

n  Maximum Size and n  Queuing Discipline.

Page 9: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2007

Queue Discipline (2) n  Maximum Queue Size: (also called System capacity) is

the maximum number of customers that may wait in the queue (plus the ones) being served).

n  A Queue is always limited, but some theoretical models assume an unlimited queue length. n  If the queue length is limited, some customers are forced to

renounce without being served. n  Queue Discipline: means the rule that a server uses to

choose the next customer from the queue (if any) when the server completes the service of the current customer.

n  Queuing Discipline: represents the way the queue is organized (rules of inserting and removing customers to/from the queue).

Page 10: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queue Discipline (3)

Commonly used queue disciplines are: n  FIFO: (First In First Out) also called FCFS (First Come

First Serve) - orderly queue. Customers are served on a first-in first-out basis

n  LIFO: (Last In First Out) also called LCFS (Last Come First Serve) - stack. Customers are served in a last-in first-out manner

n  SIRO: (Serve In Random Order). n  Priority Queue: that may be viewed as a number of

queues for various priorities: n  Customers are served in order of their importance, on the

basis of their service requirements.

Page 11: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queue Discipline (4)

n  RR: Round robin, each customer receives, in turn, a small “time slice” of service.

n  Sharing the capacity of the server: PS (Processor sharing), all customers in the queue are receive service simultaneously

n  Many other more complex queuing methods that typically change the customer’s position in the queue according to n  the time spent already in the queue, n  expected service duration, and/or n  priority

n  Note: These methods are typical for computer multi-access systems.

Page 12: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queue Discipline (5)

n  Most queuing models assume FCFS as the queue discipline.

n  Quantitative parameters such as average queue length, average time spent in the system are independent of the queuing discipline.

n  That’s why most models either do not take the queuing discipline into account at all or assume the normal FIFO queue. n  The only parameter that depends on the queuing discipline

is the variance (or standard deviation) of the waiting time.

Page 13: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Service Mechanism n  Service: represents some activity that takes time

and that the customers are waiting for. n  It is taken very generally - it may be a real service

carried on persons or machines, but it may be a CPU time slice, connection created for a telephone call, being shot down for an enemy plane, etc.

n  A service takes random time. n  Theoretical models are based on random distribution of

service duration also called Service Pattern. n  Number of servers:

n  Systems with one server only are called Single Channel. n  Systems, systems with more servers are called Multi Channel

Systems.

Page 14: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Service Mechanism (2) n  The service mechanism: the way that customers receive service

once they are selected from the front of a queue. n  A service mechanism is also called a server.

n  Service time: the amount of time which a customer takes to be served.

n  A statistical distribution is used to model the service time of a server.

n  Some queuing models assume a single server, some multiple servers. n  Generally, most queuing models assume that the system has either a

single server or allow the number of servers to become a variable. n  In many cases, the assumption is that the service time distribution is

independent of the number of customers present. i.e. the server does not work faster when more customers are present.

n  Output: represents the way customers leave the system. n  Output is mostly ignored by most theoretical models, but sometimes

the customers leaving the server enter the queue again ("round robin" time-sharing systems).

Page 15: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2007

Queuing Theory

n  A collection of mathematical models for various queuing systems that take as inputs parameters of the above elements and that provide quantitative parameters describing the system performance. n  Due to their random nature of the processes involved, the

queuing theory is rather demanding and all models are based on very strong assumptions (not always satisfied in practice).

n  Many systems (especially queuing networks) are not solvable at all, so the only technique that may be applied is simulation.

Page 16: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queuing Theory (2)

n  Queuing systems are important – provide a trade-off between the various costs of providing service and the costs associated with waiting for the service (or leaving the system without being served). n  High quality, fast service is expensive, but costs caused by

customers waiting in the queue should be minimized. n  Alternatively, long queues may cost a lot because customers

(e.g. machines) do not work while waiting in the queue or customers leave because of long queues – lose of business.

n  The ultimate is to find an optimum system configuration (e.g. the optimum number of servers)

n  For instance, by applying queuing theory or by simulation.

Page 17: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE STRUCTURE OF QUEUING SYSTEMS

n  Although there are numerous examples of queuing systems, it is possible to categorize them into one of four main types;

1)  Single channel – single phase system 2)  Single channel – multiphase system 3)  Multi channel – Single phase system

4)  Multi channel – multi phase system

Page 18: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Single channel – single phase system

n  This is a system where an entity arrives, joins a single queue, is served by one server and finally departs

Example: Supermarkets checkpoints, helpdesk print jobs etc.

Page 19: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Single channel – multiphase system

n  This is a system where an entity joins another queue following service from the first.

Some petrol stations are of this type; the driver will queue for a pump and then queue at the payment booth.

Page 20: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Multi channel – Single phase system

n  This system is where an entity joins a single queue and is served by the first available server.

Page 21: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Multi channel – multi phase system

n  This is a system where an entity joins a single queue and is served by the first available server then joins another queue for another service.

Example: the production system of a manufacturing plant e.g. a bottling plant at a brewery

Page 22: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

MODELING THE QUEUING SYSTEM

n  The study of queues determines the measures of performance of a queuing situation, including the average waiting time and the average queue length, among others. n  important information to be used to decide on an appropriate

level of service for the facility. n  A decision maker may like to know;

n  What fraction of the time is each server idle? n  What is the expected number of customers present in the queue? n  What is the expected time that a customer spends in the queue? n  What is the probability distribution of the number of customers

present in the queue? n  What is the probability distribution of a customer’s waiting time?

Page 23: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

MODELING THE QUEUING SYSTEM (2)

n  The following conditions are used to determine the performance measures of a queuing system: n  Probability distribution of arrival times n  Probability distribution of service times n  Number of serving channels

n  Queue/Line discipline

Page 24: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS

n  Queuing systems can often be characterized as having random, independent arrivals with mean arrival rate, λ. n  Random arrivals suggests that one cannot predict with certainty

the arrival of the next customer, job, etc. into the system. n  Independent arrivals implies that one arrival has nothing to do

with the next arrival. n  The assumption is an assertion that the external world is not

generating jobs in a manner that depends on the previous job. n  Assumption is valid or at least acceptable for a large number of

instances. n  Whilst we cannot specify for certain when the next arrival will

occur, we can collect statistics over the long term and estimate the mean arrival rate of jobs or customers into the system.

Page 25: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (2)

n  We also assume that the jobs or customers that enter the system come from an infinite source population, i.e. the population isn't depleted by the job server(s) that is currently operating within the system. n  In many cases, the source population is sufficiently large so

that this assumption can be made.

Page 26: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (3) n  Given the independence assumption and the average

arrival rate, one can characterize the distribution of arrivals by the Poisson process.

n  Using this distribution, we can say that, for an arrival rate (sometimes also called a rate parameter) over a time interval t, the probability that exactly n jobs or customers will have arrived in the system with a probability Pn(t) defined as:

n  Note that Pn(0) = 0; i.e. the probability of n jobs

arriving in the queue is zero if the time interval is zero.

Page 27: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (4)

n  Suppose that arrivals occur at a processor at the average rate of 6 per second. What is the probability that no arrivals, one arrival or three arrivals will occur in the next second?

n  For zero arrivals, we have:

1

Page 28: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (5)

n  The probabilities of one or three arriving in the next second are:

Page 29: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (6)

n  These could be found directly by looking up the values from the Poisson tables.

n  The values for the Poisson probability distribution for the first eleven values for this case are shown

Page 30: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

THE POISSON PROCESS (7)

n  What if we wish to obtain the probabilities of the same number of arrivals as before in the next two seconds? The formulas now become:

Page 31: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

Mean and standard Deviation of Poisson Distribution

n  Let E[x] be the mean (average) value, Var[x] the variance, and Std[x] the standard deviation of the random variable x which has a Poisson process:

n  This gives the interpretation of the constant λ , that

is the average number of arrivals per time unit. That’s why the λ is called Arrival rate.

Page 32: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Poisson Distribution (2)

Page 33: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Exponential Distribution

n  Is the most important, easiest distribution to use in queuing theory.

n  Used to model the time between events that happen at a constant average rate.

n  Inter-arrival times and services times can often be represented exactly or approximately using exponential distribution.

n  The probability distribution function of an exponential distribution is given by

Page 34: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

Exponential Distribution (2)

n  Used to model Poisson processes - situations in which an object initially in state A can change to state B with constant probability per unit time λ.

n  The time at which the state actually changes is described by an exponential random variable with parameter λ.

Page 35: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Exponential Distribution (3)

n  An Exponential (λ) random variable has the following properties:

Mean and variance n  The mean or expected value of an

exponentially distributed random variable X with rate parameter λ is given by

Page 36: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Exponential Distribution (4)

n  In light of the examples given above, this makes sense: if you receive phone calls at an average rate of 2 per hour, then you can expect to wait half an hour for every call.

n  The variance of X is given by

Page 37: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Kendall Classification of Queuing Systems

n  The Kendall classification of queuing systems [1953] exists in several modifications. The most comprehensive classification uses 6 symbols:

n  A/S/m/q/c/p where: n  A is the arrival pattern (distribution of intervals between arrivals). n  S is the service pattern (distribution of service duration). n  m is the number of servers. n  q is the queuing discipline (FIFO, LIFO, ...). Omitted for FIFO or if

not specified. n  c is the system capacity. Omitted for unlimited queues. The

parameter c includes both waiting places and service places n  p is the population size (number of possible customers). Omitted

for open systems.

Page 38: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Kendall Classification of Queuing Systems (6)

Page 39: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queues: Arrival and service patterns

n  The following symbols are used for arrival and service patterns:

n  M is the Poisson (Markovian) process with exponential distribution of arrival or service duration respectively.

n  Em is the Erlang distribution of intervals or service duration.

n  D is the symbol for deterministic (known) arrivals and constant service duration.

n  G is a general (any) distribution. n  GI is a general (any) distribution with independent

random values.

Page 40: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queues: Arrival and service patterns (2)

n  Examples of queuing systems that can be defined with this convention are:

n  M/M/1: n  This is the simplest queuing system to analyze. n  The arrival and service time are exponentially distributed

Poisson processes. n  The system consists of only one server, n  Unlimited FIFO or unspecified queue and unlimited customer

population. n  This queuing system applies mostly to a wide variety of

problems e.g. a system with a very large number of independent customers.

n  Using a Poisson process for service time however is not applicable in many applications and is only a crude approximation.

Page 41: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queues: Arrival and service patterns (3)

n  M/D/n: n  The arrival process is Poisson (Markovian) and the service time

distribution is Deterministic. n  The system has n servers. (e.g. a ticket booking counter with n

cashiers.) n  The service time can be assumed to be same for all customers. n  Unlimited FIFO or unspecified queue and unlimited customer

population.

Page 42: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Queues: Arrival and service patterns (5)

n  M/G/3/20: n  The arrival process is Poisson (Markovian), service pattern is

from any distribution (G) n  There are 3 servers in the system, n  Queue discipline is FIFO n  Maximum number of customers in system = 20, n  Unlimited customer population.

n  D/M/1/LIFO/10/50: n  Deterministic arrivals, n  Poisson (Markovian) Service pattern n  One exponential server, n  The queue is a stack (LIFO) n  Maximum size of customers in system = 10, n  Total customers population = 50.

Page 43: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system Assumptions for the model n  The arrivals are assumed to follow a Poisson distribution (arrival rate

= λ) n  Service process is Poisson (Markovian) with Service rate = μ n  One exponential server n  The queuing discipline/mechanism is FIFO n  Queue length is not limited n  Infinite population: The population from where the arrivals originate

is infinite n  No balking from the queue n  One object/item at most arrives/departs during any time interval n  The service times are assumed to follow an exponential distribution

Page 44: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (2)

n  Since both arrival and service are Poisson processes, it is possible to find probabilities of various states of the system, necessary to compute the required quantitative parameters.

n  System state: for this case, the number of customers in the system. n  It may be any non-negative integer number. n  Let Pn(t) = P[n customers in the system at time t]. n  Then these processes can be represented by a state transition

diagram as shown below:

Single Server Queue State Transition Diagram

Page 45: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (3)

n  An arrival transforms the system from its current state, n, to the next state, n+1.

n  The transition rate from a lower to a higher state (arrival rate) is therefore λ.

n  Similarly, as customers are served (by the server), the system undergoes transitions from higher states (n) to lower states (n-1), a process often referred to as a departure or a death.

n  The rate at which these departures occur is just the service rate, μ.

Page 46: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (4)

n  Focus: to determine the basic measure of performance of the system such; n  The probability that n customers are present in the system (np), n  The expected number of customers in the system (L), n  The expected number of customers in the queue (Lq), n  The average waiting time in the system (W), n  The average waiting time in queue (Wq)

n  Given the transition diagram for the M/M/1 queuing system, we can determine the performance measures.

Page 47: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (5)

n  At a steady state, what enters the system should be the same as what leaves the system.

n  Therefore if we consider state n, what enters the state should be the same as what leaves the state. That is; λpn-1 = μpn

n  For n =1, we have λp0 = μp1

p1= λ

μp 0

Page 48: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (6)

n  For n = 2, we get λp1 = μp2

continuing we obtain: where Pn= probability that there are n units in the

system.

Page 49: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (7)

n  Let , The quantity ρ is the fraction of time the server is processing jobs.

n  Then Pn = ρnp0, 0,1,2,3,… to determine the value of P0 and Pn, must satisfy the condition for probability distributions, that is the total probability is unity.

ρ=λμ

Page 50: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (8)

Page 51: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The M/M/1 Queuing system (9)

n  P = (1-ρ)ρn = 0,1,2,…. Is a Geometric distribution. n  p0 = the Proportion of time the system is idle. Then the

utilization, the proportion of time the server is busy is (1-ρ)

n  is the fraction of time the server is busy (traffic

intensity) and is called system’s utilization factor.

Page 52: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Performance Characteristics for the M/M/1 system

Points of interest n  Performance of the system: measured by the average

waiting time, n  The average delay on passing through the system, n  The average number in the queue, etc. n  Most these results for this system can be calculated

directly if we know the value of Pn.

Page 53: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The average number of entities in the system (Ls)

n  Calculating the average number of entities in the system - a parameter of concern.

n  ρn represents a distribution of a discrete random variable Number of customers in the system (probabilities of all possible random values).

n  It is possible to compute the mean value, that is the average number of customers in the system:

n  Pn = (ρ−1) ρn , n = 0,1,2,…. nρ

n  E[No. of entities in the system] = Ls

Page 54: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The average number of entities in the system (Ls) (2)

Therefore

•  This is the mean number in the system - including the entity being attended to.

•  This is sometimes referred to as the mean number in the queue - though we usually think of the queue as only those waiting. (Americans refer to this as the line. This is very sensible for queue theorists)

Page 55: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The average number of entities in the system (Ls) (3)

n  The mean number in the system is greater than 0 even if the load (measured by ρ) is small.

n  The mean number in the system tends to infinity as ρ tends to 1, even though the service rate is still greater than the arrival rate.

n  Note: that ρ must be less than 1, otherwise the number of customers in the system will grow permanently.

n  The variance of the number in the system, N can be obtained from the geometric distribution.

Page 56: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average number of entities in the queue (Lq)

n  Assume, the customer being served is not a part of the queue. n  So n customers in the system means the queue length is n-1.

Page 57: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average number of entities in the queue (Lq) (2)

Expected queue length = expected entities in the system minus those in service.

Page 58: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average time an entity spends in system

Little’s formula: n  Gives the relation between the average number of

customers in the system LS and n  The average time WS spent in the system and

between the average number of customers in the queue LQ and the average time WQ spent in the queue:

LS = λWS ,LQ = λWQ

Page 59: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average time an entity spends in system (2)

n  Mean number of entities in system = arrival rate x mean response time (average time a entity spends in the system):- n  i.e. the average number of customers in the system is the

same as number arriving per unit time times the average time each spends in the system

n  Therefore: n  Average time in the system = average number of

entities in the system times the inter-arrival time

Page 60: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average time an entity spends in system (3)

Average time in the system = expected time in the queue plus expected service time.

Average time an entity spends in queue §  The mean time in the line (queue) is the time spent

waiting before being served. §  This is the mean time in the system minus the mean service

time, thus

Page 61: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average time an entity spends in system (4)

n  Average time in the queue = Average number of entities in the queue over the arrival rate ( or times the inter-arrival rate (arrival time))

n  LQ = λWQ i.e. the average number of customers in the queue is the same as number arriving per unit time times the average time each spends in the queue)

n  Therefore n  N.B Both average time in the queue and average queue

length depends on the system utilization factor λ/μ.

Page 62: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Average time an entity spends in system (5)

Page 63: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The derivation of Pr{n or more customers are in the system}

n  For m ≥ n, we have,

Page 64: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

The derivation of Pr{n or more customers are in the system} (2)

Example A telephone attendant receives 110 calls during the busy hour. Each call takes, on average, 30 seconds to process. a)  What percentage of the attendant's time is devoted

to answering calls? b)  How long must people wait, on average, before their

call is processed? c)  How many people are in the queue, on average?

Page 65: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Solution: Example 1

1)  We know that λ = 110 calls/hr. = 1.83calls/min. and S = .5 min./call. Thus a = λS = (1.83 calls/min.)(.5 min./call) = .92.

2)  For an M/M/1 queuing system, we know that a = ρ, so the attendant is busy 92% of the time.

3)  Using the data we calculated above, we can see that the waiting time in the queue is Wq = ρS/(1-ρ), so Wq = (.92)(.5 min/call)/(1 - .92) = 2.5 min./call. People must wait an average of 2.5 minutes to interact with the operator for 30 seconds, hardly reasonable for most applications.

Page 66: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Solution: Example 1 cont’d

1)  Finally, the average number of calls in the queue can be found using Little's Formula: Lq = λWq = (1.83 call/min.)(2.5 min./call) = 4.6.

Page 67: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 1

10000 frames/hr can be expected to flow from one network to the other network. What is the average number of packets expected to flow in one second? The expected service time is the time required to transfer a packet across the network. Therefore the average time required to transmit one packets is 0.1 seconds. a) What is the mean service rate? b) This model can be considered as a single-channel,

single-phase queuing model or notated as M/M/1 model. Find the utilization of the service facility in this model.

Page 68: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 1 cont’d

a)  What is the probability that there are no frames in the network?

b)  For a M/M/1 model, find the mean number of units expected to be in the system.

c)  What is the queue length in this service model? d)  The mean time in the system? e)  The time of packet in the queue?

Page 69: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 2

Arrivals to a rail ticket office is poisson with mean of 47 an hour. The service time by the single clerk is exponential with a mean of 45 seconds. Assuming that the M/M/1 model applies, a)  Calculate the average number of passengers waiting to

be served and the average time in the queue. b)  Arrival rate = 2 per hr and service time =2 hours

Page 70: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 3

The arrival of lorries at the Strathmore construction area is random with a mean of one every twenty minutes. The time taken to unload a lorry is 15 minutes on average. With a standard deviation of 3.6 minutes. What is the average number of lorries in the queue and the time lorries spend in the system?

Page 71: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 4

A manufacturing firm has two departments, A and B, each running an NC machine; the machines are named MA and MB, respectively. Each machine can produce 25 parts per day. It is observed that an average of 20 parts per day will arrive to MA while an average of 15 parts per day will arrive to MB.

a)  For MA and MB, determine the expected length of time from submitting a job to be processed until it is completed. Carefully state your modeling assumptions.

b)  Suppose that the two machines are grouped into a pool; i.e., each machine is available to process parts from both departments. For this arrangement, determine the expected length of time from submitting a job to be processed until it is completed. Carefully state your modeling assumptions. Compare the results with those for part (a).

Page 72: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 5 and 6

Problem 5: Understanding of basic concepts. a)  What is the stability condition for the M/M/1 queue? b)  What is the stability condition for a system that

consists of two distinct M/M/1 queues arranged in tandem?

Problem 6 n  For a Poisson process X(t), define Sn as the total time

until the nth arrival occurs, where n ≥ 1. n  Compute the distribution of Sn.

Page 73: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 7

A machine produces parts in such a way that the stream of finished parts is a Poisson process with rate λ = 10 per hour. a)  What is the probability that it produces no finished part

in 1 hr? b)  What is the expected time at which the 20th finished

part is produced? c)  What is the probability that 100 parts are produced in a

shift of 8 hr, assuming that the machine works non-stop during the shift?

Page 74: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 8 A manufacturing workstation receives a continuous supply of parts and processes them at a rate of 12 parts per hour with exponentially distributed processing time. However, each part needs to be placed on a special fixture before it can be processed. There are N such fixtures available. When completed at the workstation, a fixture part will be sent to the output buffer instantaneously, and the workstation will start to process a new fixture part (if there is one waiting). One at a time, each processed part on its fixture in the output buffer is unloaded from the fixture by a worker (taking zero time), and the time it takes for the worker to load a new part on the fixture is exponentially distributed with mean 4 min. (Hint: The system can be modeled as an M/M/1/N queue)

Page 75: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 8 cont’d

a)  Determine the greatest number of fixtures such that the average waiting time of a part at the workstation is less than 6 min.

b)  Does this number of fixtures satisfy the additional requirement that the utilization of the workstation be at least 80%?

Page 76: BIF3203 - Part II Analytical Model of Queuing Systems (November 2012)

N. Maingi - November 2012

Problem 9

A machine center has unlimited waiting space. Parts arrive at a rate l and service times are exponentially distributed with mean 1/m. The machine center becomes active only when K parts are present. Once active it services one at a time until all K units, and all subsequent arrivals, are serviced. The machine center then switches to another part only when K new arrivals have occurred. a)  Define the appropriate state space and write down the

balance equations b)  What is the average time a customer spends in the

queue?


Recommended