Professional Documents
Culture Documents
Sosina M.
AAiT
Introduction
Queues occur whenever there is competition for limited resources
The entities that queue for service are called customers/users/ jobs
Arrivals
The units from the population that enter the system seeking service
Queue
The line that houses the units that are awaiting their turn to be serviced
Service facilities
The place where the units are processed
Departures
The units that have completed their service and leave the system
Simulation modeling
Often used to analyze the complex queuing systems in which analytical methods
become intractable
Infinite-population models
The arrival process usually characterized in terms of inter-arrival times of successive
customers
Arrivals can be deterministic or random
Random arrivals
Interarrival times are usually characterized by a probability distribution
Customers may arrive one at a time or in batches
The batch may be of constant size or of random size
The most common model- Poisson model or exponential inter-arrival time
Computer system modeling and simulation 11
Characteristics of queueing models
Infinite-population models
Scheduled (deterministic) arrivals
Interarrival times could be either constant or constant plus or minus a small
random amount
There are M machines that are subject to breakdown and a single repairman to
fix them. Each machine operates independently of the other machines and its
time to failure is governed by an exponential distribution with parameter 𝜆.
Thus each machine fails at rate 𝜆 per unit time. The single repair man requires
1
𝜇 times units to repair a failed machine and again the repair process is
independent of the failure process and has an exponential distribution.
Common algorithms
First come first out (FIFO)
Last in first out (LIFO)
Service in random order (SIRO)
Shortest processing time first (SPT)
Service according to priority (PR)
Can be either preemptive or non-preemptive
Service times of successive arrivals {S1, S2, S3, …} are usually characterized as a
sequence of IID random variables
The first machine makes and wraps, the second packs 50 pieces in box, the third
machines seals and wraps the box
The long run average time spent in system (w) and in the queue (wQ) per
customer
1 ∞ 1 𝑇
𝐿= 𝑖=0 𝑖𝑇𝑖 = 𝐿 𝑡 𝑑𝑡
𝑇 𝑇 0
1 ∞ 𝑄 1 𝑇
𝐿𝑄 = 𝑖𝑇
𝑖=0 𝑖 = 𝐿 𝑡 𝑑𝑡
𝑇 𝑇 0 𝑄
1 ∞
𝑊= 𝑖=0 𝑊𝑖
𝑁
1 ∞ 𝑄
𝑊𝑄 = 𝑊
𝑖=0 𝑖
𝑁
Then, 𝐿 = λ 𝑊
Proof
𝑁 𝑇
𝑖=1 𝑊𝑖 = 0
𝐿 𝑡 𝑑𝑡
1 𝑇 𝑁1
𝑖=1 𝑊𝑖 =λ𝑊
𝑁
𝐿= 𝐿 𝑡 𝑑𝑡=
𝑇 0 𝑇𝑁
λ
𝜌=𝐸 𝑠 λ=
𝜇
λ
𝜌=𝐸 𝑠 λ=
𝑐𝜇
If an arrival occurs when the system is full, that arrival is turned away and
doesn’t enter the system
The effective arrival rate (λ 𝑒 ) – the mean number of arrivals per time unit
who enter and remain in the system
λ 𝑒< λ
λ 𝑒 =λ 1 − 𝑃𝑁 1 − 𝑃𝑁 =the probability that a customer upon arrival will find space and be able to
Poisson (λ) μ1
1. The original system
μ1
2. A second (faster) server is added to the system
Poisson (λ)
μ2
μ1
4- A separate queue for each server
Poisson (λ)
μ2
Open networks – customers may arrive from (depart to) places outside the
network
b) A multi-server system
The overall arrival rate into queue j, λ 𝑗 , is the sum of the arrival rate from all sources
𝛌 𝐣 = 𝐚𝐣 + 𝐚𝐥𝐥 𝐢 𝛌 𝐢 𝐏𝐢𝐣
If queue j has cj parallel servers, each working at rate 𝜇𝑗 , the long run utilization of each
𝝀𝒋
server is 𝝆𝒋 =
𝒄𝒋 𝝁𝒋
Computer system modeling and simulation 34
Example
Considering that the input arrival processes from outside of the network are independent
and Poisson with mean rates shown in the Fig. The message transmission times are
exponentially distributed with mean rates for the different queues shown in Fig.
Determine the mean delay experienced by a message from input to output of the network
𝑚 𝜌𝑖
𝐿= 𝑖=1 1−𝜌
𝑖
1 𝜌𝑖
𝑊 = 𝑚
where λ=the total average load on the network
λ 𝑖=1 1−𝜌
𝑖
The packets are transmitted over a communication link with a capacity of 100Mb/s and
the packet length distribution follows an exponential distribution with a mean 25Mb.
The packets arrive to the system according to a Poisson process at an average rate λ =
2 packet/s. The probability that an arriving packet belongs to a high priority class is 0.3.
A suitable queuing model should be envisaged for this system in order to determine
the mean delay experienced by a message to cross the node.
Banks, J., CARSON II, J.S. and Barry, L., 2005. Discrete-event system simulation,
fourth edition.