Upload
fahmida-afrin
View
4.087
Download
0
Embed Size (px)
Citation preview
OPEN AND CLOSED QUEUING NETWORK
Introduction to Queues
and Queuing Theory
QUEUE
• Queue is a waiting Line for any service.
• Real Life Example :
Waiting Line for Bus
• In computer science, queuing refers
to lining up jobs for a computer or device.
QUEUING THEORY
• Queuing Theory is the mathematical study of waiting lines, or queues. Queuing
Theory enables mathematical analysis of several related processes, including the
following:
On average, how many will arrive at the (back of
the line) queue?
On average, how long will one wait in the queue?
On average, how long will one wait until being served at the front of the queue?
HISTORY
• Queuing theory started with research by Agner
Krarup Erlang, a Danish engineer who worked for the
Copenhagen Telephone Exchange, published the first
paper on what would now be called queuing theory in
1909.
• The Ideas have since seen applications including
telecommunications, traffic engineering, computing and
the design of factories, shops, offices .
EXAMPLE OF QUEUEING
EXAMPLES OF REAL WORLD QUEUING
• Commercial Queuing Systems
• Commercial organizations serving external customers
• Ex. Dentist, bank, ATM, gas stations, plumber, garage …
• Transportation service systems
• Vehicles are customers or servers
• Ex. Vehicles waiting at toll stations and traffic lights, trucks or ships waiting to be loaded, taxi cabs, fire engines, elevators, buses …
• Business-internal service systems
• Customers receiving service are internal to the organization providing the service
• Ex. Inspection stations, conveyor belts, computer support …
• Social service systems
• Ex. Judicial process, the ER at a hospital, waiting lists for organ transplants or student dorm rooms …
Queuing Network
QUEUING NETWORK
• A network is the interconnection of several devices by the ware or Wi-Fi .
Queuing network is the inter connections of several queues.
• Networks of queues are systems which contain an arbitrary, but finite, m
number
of queues. Customers, sometimes of different classes, travel through the network
and
are served at the nodes.
QUEUING NETWORK (CONT.)
Examples:
• Customers go form one queue to another in post office, bank, supermarket etc.
• Data packets traverse a network moving from a queue in a router to the queue in
another router
Classification
CLASSIFICATION OF QUEUING NETWORK
Related Terms Concepts
SINGLE SERVER QUEUE
• Customers arrive at the service centre, wait in the queue if necessary,
receive service from the server, and depart.
MULTIPLE SERVER QUEUE
• a more realistic model in which each system resource is represented by a
separate service centre.
Open Queuing Network
OPEN QUEUEING NETWORK
• Open networks receive customers from an external source and send them to an
external destination.
• external arrivals and departures
• Number of jobs in the system varies with time
• Throughput = arrival rate
• Goal: To characterize the distribution of number of jobs in the system.
OPEN QUEUING NETWORK
EXAMPLE
• The yellow circle B, represents an external source of customers.
• There are three inter-connected service centres and an external destination C.
• Each service centre has a mean service time. When a customer leaves a service
centre there may be more than one possible destination.
• It is therefore necessary to define routing probabilities.
EXAMPLE (CONT.)
• This is done by attaching a weighting to each possible destination.
• For example customer leaving queue 2, there are two possible destinations - queue
1 and queue 0. If both of these destinations had weight 1 then there would be an
equal probability of a departing customer going to either queue.
EXAMPLE(CONT.)
• However, if queue1 had weight 1 and queue 0 had weight 2, then, on average,
one in three customers would go to queue1 and two in three customers would go
to queue 0.
Closed Queuing Network
CLOSED QUEUING NETWORK
• Closed networks have a fixed population that moves between the queues but never
leaves the system.
• No external arrivals or departures
• Total number of jobs in the system is constant
• “OUT” is connected back to “IN”
• Throughput = flow of jobs in the OUT-to-IN link
• Number of jobs is given, determine the throughput
CLOSED QUEUING NETWORK
EXAMPLE
• Closed queuing networks do not have a source or sink.
• An example of a closed network is shown.
• The service centres perform as in the open network case and routing probabilities
are defined in the same way.
EXAMPLE(CONT.)
• When one builds a closed network it is necessary to define the number of customers
which are initially in each of the service centres.
• These customers can then travel around the network but cannot leave it.
Analysis
TRAFFIC EQUATIONS
• The traffic equations are used to determine the throughput/effective arrival rate of
each of the queues in a network.
• Here we will look at the traffic equations of a simple open network.
• The ideas are easily extended to more complex open networks and to closed
networks.
TRAFFIC EQUATION
• We consider each queue in turn and write an equation for its throughput.
• Queue 0: The only input to queue 0 is the source so its throughput is just the arrival
rate from the source i.e. 1/20. So the first traffic equation is: X0 = 1/20.
• Queue 1: This queue has no direct input from the source and thus we can only
express its throughput in terms of the throughput of those queues which lead into it
i.e. X1 = X0 + X2.
TRAFFIC EQUATIONS
• Queue 2: This has input from only one queue, namely queue 1. It only gets 2/3 of
the customers that leave queue 1 so we can write this as X2 = 2/3.X1.
• So we have three equations in three unknowns which can be solved using standard
linear algebra techniques. For this example we get: X0 = 0.05, X1 = 0.15, X2 = 0.1.
MEAN VALUE ANALYSIS
• This method uses a number of fundamental queuing relationships to determine the
mean values of throughput, delay and queue size for closed queuing networks
which have 'product form'.
• Suppose we have a queuing network with M queues and N customers and that
the ith queue has service rate ui.
• Let ti be the average delay that a customer experiences at the ith queue. Then ti has
two parts - the time spent waiting in the queue and the time taken to be served:
ti = 1/ui + 1/ui (mean number of customers present upon arrival).
MEAN VALUE ANALYSIS (CONT.)
• It is the mean number of customers at that queue when there is one less customer
in the network ie N-1 customers. Let ni(N) be the mean number of customers at
the ith queue when there are N customers in the network. Then we can write:
ti = 1/ui + (ni(N-1))/ui
• Little's Law states that X=N/W where X = throughput of the network and
W = mean time spent in the network by a job = t1(N) + t2(N) + ... + tm(N).
MEAN VALUE ANALYSIS (CONT.)
• Let X(N) be the throughput of the network when there are N customers present.
Then substituting into Little's law for the entire network gives us:
N = X(N)(t1(N) + t2(N) + ... +tm(N)).
• And applying to an individual queue gives:
X(N).ti(N) = ni(N)
MEAN VALUE ANALYSIS (CONT.)
• Rearranging these equations and adding in routing probabilities oi gives us the
following system of equations which can be repeatedly solved to calculate measures
for the required number of customers.
ni(0) = 0 i = 1,2,...,M
ti(N) = 1/ui + ni(N-1)/ui i = 1,2,...,M
X(N) = N/(o1t1(N) + o2t2(N) + ... + oMtM(N))
Note: this is the throughput of the reference queue
ni(N) = X(N)oiti(N)
Jackson’s Theorem
JACKSON’S THEOREM
• Jackson’s Theorem is applicable to a Jackson Network.
• Jackson’s Theorem states that provided the arrival rate at each queue is such that
equilibrium exists, the probability of the overall system rate (n1..............nk) for k
queues will be given by the product from expression
JACKSON’S THEOREM (ATTRIBUTE)
In Jackson’s network:
- Only one servers (M/M/1)
- queue discipline “FCFS”
- infinite waiting capacity
- Poisson input (Queue i behaves as if the arrival stream λi were Poissonian.
)
- Open networks
EXAMPLE (CONT.)
THANK YOU!