Professional Documents
Culture Documents
1
CHAPTER 8
QUEUING ANALYSIS
Source: High Speed Networks and Internet, William Stallings
2
Queuing Model and Analysis
• Queuing theory deals with Q1
modeling and analyzing systems
with queues of items and servers
that process the items.
Q2
Q3
3
Goals of Queuing Analysis
● Typically used in analysis of networking system; examples,
Increase in rate of arrival of packets, processes
Increase in disc access time
Increase in process load
● Especially useful of analysis of performance when either the load on a system is expected to
increase or a design change is contemplated.
● While it is a popular method in network analysis, it has gained popularity within a system
esp. with the advent of multi-core processors.
4
Contd..
5
Contd..
6
Analysis methods
● After the fact analysis: let the system run some n number times, collect the “real” data and
analyze – problems?
● Predict some simple trends /projections based on experience – problems?
● Develop analytical model based on queuing theory – problems?
● Run simulation (not real systems) and collect data to analyze –problems?
7
Contd..
8
Single server queue
queue departures
Dispatching
arrivals discipline
server
λ= arrival rate
9
Contd..
10
Parameters
● Items arrive at the facility at some average rate (items arriving per second) l.
● At any given time, a certain number of items will be waiting in the queue (zero or more);
● The average number waiting is w, and the mean time that an item must wait is Tw.
● The server handles incoming items with an average service time Ts;
11
More parameters
● Utilization, ρ, is the fraction of time that the server is busy, measured over some interval of
time.
● Finally, two parameters apply to the system as a whole.
● The average number of items resident in the system, including the item being served (if
any) and the items waiting (if any), is r;
● The average time that an item spends in the system, waiting and being served, is Tr; we
refer to this as the mean residence time
12
Analysis
● As the arrival rate, which is the rate of traffic passing through the system increases, the
utilization increases and with it, congestion. The queue becomes longer, increasing waiting
time. At ρ = 1, the server becomes saturated, working 100% of the time.
● Thus, the theoretical maximum input rate that can be handled by the system is:
λmax = 1/Ts
● However, queues become very large near system saturation, growing without bound when
ρ= 1. Practical considerations, such as response time requirements or buffer sizes, usually
limit the input rate for a single server to 70-90% of the theoretical maximum.
● For multi server queue for N servers:
λmax = N/Ts
13
Model Characteristics
● Before deriving any analytic equations for the queuing model, certain key characteristics of
the model must be chosen.
● The following are the typical choices, usually reasonable in a data communications context:
Item population
Queue size
Dispatching discipline
14
Contd..
15
Multiserver Queue
16
Little’s Law
● Very simple law that works from a Case Western Reserve University professor Dr. Little
● Average number of customers in a system = average arrival rate * average time spent in the
system
● r = Tr * λ
● w = Tw * λ
● Tr = Tw + Ts
● Extend it to the M/M/1 queuing model
17
Some Basic Queuing Relationships
18
Example
● Suppose the arrival rate of vehicles in a toll booth is 3,600 vehicles per hour, with 120
vehicles being serviced every hour, and the expected number of vehicles in the system are
20. Compute the following based on Queuing theory.
1. Maximum utilization of the system.
2. Average time spent by the vehicle in the queuing booth
3. Mean time between arrival
4. Mean service time.
● Arrival rate (lamda) = 3600 /hr Service rate (nu) = 120/hr Expected number of vehicles in system (n)= 20
● 1. Utilization (rho)= lamda/nu = 3600/120 = 30
● 2. n= lamda * T
Average response time (T)= n/lamda =20/3,600h=20s or 0.0055 hr
● 3. E=1/lamda =1/3600/hr= 3600/3600 seconds= 1sec or 0.000277 hr
● 4. 1/nu= 1/120/hr= 3600/120 = 30 sec or 0.00833 hr
19
Specific Metrics
● The fundamental task of a queuing analysis is as follows: Given the following information
as input:
Arrival rate
Service time
● Provide as output information concerning:
Items waiting
Waiting time
Items in residence
Residence time.
● We would like to know their average values (w, Tw, r, Tr) and the respective variability the
σ’s
● We are also interested in some probabilities: what is probability that items waiting in line <
M is 0.99?
20
Contd..
● Queue Length: The number of packets in a queue at any time.
● Serving Time: Time taken for serving one unit (packet) of the queue.
● Mean arrival rate: The number of expected packets in one unit of time is known as mean
arrival rate and it is denoted by λ
● Mean serving rate: The number of expected packets completed the service in one unit time
is called Mean serving rate and it is denoted by µ
● Idle period: The time interval between the completion of the service and the new arrival is
called the idle period.
● Traffic intensity (ρ) = (Mean arrival rate / Mean Service rate) = λ / µ => Single server
ρ = λ * Ts Ts = 1/ µ
● Multi-server ρ = λ / Nµ ρ = (λ * Ts)/N
21
Example-2
● The time spent by repairmen on their jobs has exponentially distribution with a mean 30
minutes. If he repairs sets in the order in which they can come in, and if arrival offset
approximately possion with an average rate of 10/8 hours a day. Find the traffic intensity
(utilization ρ)
23
Contd..
There are two key points
● Arrival rate λ - Poisson Distribution
● Service rate µ - Exponential
24
Contd..
● Average number of packets in the system Ls = (Utilization rate / Idle rate)
Ls = = = =
● Average number of packets in the queue Lq (length of queue) = Ls – Utilization rate
Lq = - = ( - ) = () = = * = * Ls
● Average waiting time for a packet in the system Ws
Ws= (Average number of packets in the system) / (Arrival rate)
Ws = = * = =
25
Contd..
● Average waiting time for a packet in the queue Wq
Wq= (Average number of packets in the queue) / (Arriving rate)
Wq = = * * = = * = Ws *
26
Contd..
27
Example-1
● Students arrive at the head office of Universal Teacher Publications according to a Poisson
input process with a mean rate of 40 per hour. The time required to serve a student has an
exponential distribution with a mean of 50 per hour. Assume that the students are served by
a single individual, find the average waiting time of a student.
28
Example 2
New Delhi Railway Station has a single ticket counter. During the rush hours, customers
arrive at the rate of 10 per hour. The average number of customers that can be served is 12 per
hour. Find out the following:
• Probability that the ticket counter is free.
• Average number of customers in the queue.
29
Example-3
At Bharat petrol pump, customers arrive according to a Poisson process with an average time
of 5 minutes between arrivals. The service time is exponentially distributed with mean time =
2 minutes. On the basis of this information, find out
● What would be the average queue length?
● What would be the average number of customers in the queuing system?
● What is the average time spent by a car in the petrol pump?
● What is the average waiting time of a car before receiving petrol?
30
Contd..
31
Example -4
● Universal Bank is considering opening a drive in window for customer service.
Management estimates that customers will arrive at the rate of 15 per hour. The teller whom
it is considering to staff the window can service customers at the rate of one every three
minutes.
Assuming Poisson arrivals and exponential service find
1.Average number in the waiting line.
2.Average number in the system.
3.Average waiting time in line.
4.Average waiting time in the system.
32
Contd..
● Given λ = 15/hour, μ = 1/3 min or 20/hour
33
Contd..
Chhabra Saree Emporium has a single cashier. During the rush hours, customers arrive at the
rate of 10 per hour. The average number of customers that can be processed by the cashier is
12 per hour. On the basis of this information, find the following:
• Probability that the cashier is idle
• Average number of customers in the queuing system
• Average time a customer spends in the system
• Average number of customers in the queue
• Average time a customer spends in the queue
34
Contd..
● Given λ = 10/hour, μ = 12/hour
35
Optical Links
https://nptel.ac.in/courses/115/107/115107095/
Contd..
https://nptel.ac.in/courses/115/107/115107095/
History of Fiber Optics
● John Tyndall demonstrated in 1870
● Total Internal reflection is the basic idea of fiber optic
Total internal reflection
● Optical fibers work on the principle of total internal reflection
● With light, the refractive index is listed
● The angle of refraction at the interface between two media is governed by Snell’s law:
n1 sin 1 n2 sin 2
● Is a formula used to describe the relationship between the angles of incidence and
refraction, when referring to light or other waves passing through a boundary between two
different isotropic media, such as water, glass, or air.
Optical Transmission
Advantages of optical transmission:
● Longer distance (noise resistance and less attenuation)
● Higher data rate (more bandwidth)
● Lower cost/bit
Optical
Electrical Electrical
Optical signal Optical
signal signal
Fibre Fibre
Transmission Transmission
System System
Optical Network Architecture
● A passive optical network (PON) is a system that brings optical fiber cabling and signals all
or most of the way to the end user.
SONET
Metro Metro
Network Network
Transport network
PON
Access Access Access Access
Network Network Network Network
Bandwidth
Optical Fiber
● An optical fiber is made of three sections:
The core carries the light signals
Core Cladding
The cladding keeps the light in the core
The coating protects the glass
Coating
Optical Fiber (cont.)
● Single-mode fiber
Carries light pulses by laser along single path
● Multimode fiber
Many pulses of light generated by LED travel at different angles
61
Fiber Installation
● Don’t squeeze support straps too tight.
● Pull cables by hand, no jerking, even hand pressure.
● Avoid splices.
● Make sure the fiber is dark when working with it.
● Broken pieces of fiber VERY DANGEROUS!! Do not ingest!
Bandwidth in Optical Fiber
• Bandwidth refers to the data-carrying capacity of a communication channel, often measured
in Hertz (Hz) or Gigahertz (GHz). It indicates the range of frequencies or the rate at which
data can be transmitted through the channel.
• Bandwidth is a crucial factor in determining the data-carrying capacity and speed of a
communication medium. In optical fiber communication, a higher bandwidth means the
fiber can transmit more data at faster speeds.
Given Bandwidth of 25000GHz (25 THz)
• The specified bandwidth of 25000GHz (25 THz) indicates an incredibly high data-carrying
capacity for the optical fiber.
• This immense bandwidth enables the fiber to handle a vast amount of data simultaneously
and transmit it at extremely high speeds.
• The optical fiber becomes capable of supporting a multitude of applications, including high-
definition video streaming, real-time gaming, cloud computing, and more.
63
Optical Transmission Effects
Attenuation
Distortion
Loss of Energy
Optical Amplifier
Shape Distortion
Dispersion Compensation Unit (DCU)
Phase Variation
Optical
source
Contd..
• Data Transmission Process: Input data in the form of electrical signals is first converted
into light signals using a transmitter.
• Modulation Techniques:
• On-Off Keying (OOK): In this modulation technique, the presence of a signal is represented by one
level (e.g., light on), and the absence of a signal is represented by another level (e.g., light off). It's a
fundamental modulation scheme used to encode data into optical signals.
• Sub Carrier Multiple Access (SCM): SCM involves dividing the available bandwidth into multiple sub-
carriers, each of which carries its own set of data. This technique allows multiple signals to be transmitted
simultaneously over the optical fiber, optimizing the utilization of the bandwidth.
• These light signals travel through the optical fiber, carrying data over long distances.
• At the receiving end, the light signals are converted back into electrical signals by a receiver
for interpretation and processing.
68
Contd..
Optical Links
Contd..
● A link is characterized by (B,L) where
B: bitrate (bps)
L: Max. Distance for which BER <10^(-12)
● To build a communication system that can transmit BT bps over a distance LT kms using
(B,L) optical links, we need BT/B parallel systems each with LT/L links in series.
● Thus we need (BT X LT) / (B x L) optical links.
Transmitter - A Light Sources
● where h is Planck's constant, and c is the speed of light. The energy Wg depends on the material of
the laser diode.
● Light amplification is achieved as photons move back and forth between two parallel mirrors,
triggering forced or stimulated emission.
● Ideal laser light is formed when group of photons are coherent.
● Amplification and coherence create Laser’s highly directional beam.
● Intensity of light can be varied by modulation.
● Transmitter’s limitations are determined by Power of light Source (PT), its Coherence, and its
Modulation bandwidth.
Transmitter
● Laser diodes have output power of 10mW and modulation bandwidth of 3GHz.
● A fiber optic transmitter is a device which includes a LED or laser source and signal
conditioning electronics that is used to inject a signal into fiber.
● Information is sent from a source to a transmitter by means of an electrical signal. The
transmitter then takes that binary data and transfers it to a light signal.
● A transceiver is a device which combines the functions of both the transmitter and receiver.
Receiver
● Modulated light from the transmitter is launched into the fiber.
● At the distant end of the fiber the receiver converts the optical signal into an electrical
signal and demodulates it to recover the modulating signal—the input data at the
transmitter.
● To determine whether a 1 or 0 is transmitted during a specific bit time requires several
operations: photo detection, amplification, filtering, and decision.
Photo detection is done by a photodiode, which converts the received optical signal into electric
photocurrent.
The amplifier converts the photocurrent into a voltage signal at a usable level.
The low-pass filter reduces the noise introduced by the amplifier by cutting off frequencies beyond the
bandwidth of the input data signal.
The decision circuitry includes an equalizer to restore the data pulse shape and a timing extractor, and it
compares the processed signal with a threshold to decide whether a 1 or 0 bit is received.
76
Contd..
● The voltage signal on which this decision is based is corrupted by three noise sources: the
photodetector shot noise, the photodetector dark current, and the amplifier thermal noise.
The photocurrent is not a deterministic process, but a shot noise process. It is the sum of a sequence of
impulses that coincide with the random arrival times of the photons that constitute the optical signal. (The
arrival times have a Poisson distribution.)
The dark current is the photocurrent produced even when no external light is impinging on the photodiode.
Dark current is caused by the spontaneous thermal excitation of electrons in the photodiode. Typical values
of dark current range between 1 and 5 nA (nanoamps).
The thermal noise is a white noise process produced by the amplifier. Its power is proportional to the
bandwidth of the low-pass filter and hence to the bit rate B.
● The three noise sources are independent, and so their effect is additive:
{i2} total = (i2)shot + (i2)dark + (i2) thermal,
77
Contd..
78
Contd..
● Because of the noise, the receiver makes errors in detecting the signal. Errors are measured
by the bit error rate (BER), which is a function of the signal-to-noise ratio
80
Contd..
● How to calculate power (in dBm) for the given watts?
81
Contd..
● How to calculate watts for the given power (in dBm)?
82
Attenuation
● Expressed in dB/km.
● To explain why these units are appropriate, we first show that attenuation is exponential in
the fiber length. Consider an optical fiber propagating a beam of light.
● Suppose the power of the beam launched into the fiber is Ρ T. As the beam travels along the
fiber, some of its power is dissipated.
● Suppose that after travelling l km of fiber, the power in the beam is P(l). Ρ (l) is
proportional to PT.
● We denote the attenuation factor by a(l), that is, P(l) = a(l)ΡT
● The power in the beam after l1+ l2 is P(l1+ l2 ), which may be expressed in different ways,
Contd..
● The first equality follows directly from the definition of a(l). The second expression is obtained by
writing P(11 + l2 ) as the power P(l2) attenuated by l1 km of fiber. We conclude that
● We can determine the maximum usable length of an optical fiber from its attenuation
coefficient A if we know the transmitted power Ρτ and the receiver sensitivity PR.
87
Maximum Usable Length of an optical fiber
● Tb determine that maximum length, we use the formula expressing the received power P(L)
after L km in which we set P(L) = Pr and we solve for L.
L = (10/A) log 10(Pt/Pr)
P (dBm) = 10 log10(P In Watts/ 1mW)
● Assume that Pt=1mW (0dBm), Pr = -45dBm at the rate of 1Gbps and BER = 10 -12 with
A = 0.2dB/Km.
● Calculate L L = 225Km => (BxL) = 225Gbps X Km
● To utilize this bandwidth, however, requires modulating the laser transmitter at very high
speeds. Today's electronics limit the speed to 2.5 Gbps.
● The limit is likely to increase to 10 Gbps.
● A much better approach to utilizing the bandwidth is offered by wave-division multiplexing
(WDM),
Dispersion
● Suppose transmitter transmits 1 for ‘T’ seconds (on) and 0 for ‘T’ seconds (off light).
(T = 1/B is bit time and B is bit rate in bps)
● Receiver can see the 0 between two 1’s if the pulse spread is less than T/4.
● If pulse spread is given as αL and if the condition is to be satisfied, then
αL < 1/ (4B) => B x L < 1/ (4α)
● Hence dispersion limits bandwidth distance
product.
Subcarrier Multiplexing
● N analog or digital baseband signals modulate different oscillators at different RF
subcarrier frequencies.
● Electrical signal obtained by adding modulated subcarriers now modulates a single laser.
● At receiver, direct detection is followed by down converting to intermediate frequency.
● Combine Cable TV, telephone and
data networks : Fiber to the curb
Wavelength Division Multiplexer (WDM)
Contd..
● WDM divides the window into N channels.
● Light of each wavelength is generated by separate laser and modulated independently.
● They are then combined and transmitted over same fiber.
● At receiver, the filter selects desired channel, and the signal is demodulated.
● WDM offers protocol transparency since each wavelength is modulated independently.
● Hence one wavelength may carry Analog TV signals, other can carry IP packets.
● Connecting WDM links without electrical signal conversion needs Optical cross connects.
λ1 λ1
T R
T R
λn MUX DEMUX λn
Advantages of WDM
● Lesser number of channels to transmit and receive data.
● Immune to amplitude nonlinearity.
Optical cross connects (OXC)
● Also called frequency or wavelength selective switch.
● Each of N input fibers carries n WDM channels.
● After demultiplexing the nN channels are switched to nN X nN space- division switch.
● The switch permutes the channels
● The nN output channels are then re-multiplexed into N output fibers.
Contd..
● Some channels may terminate locally, and local channels may be substituted.
● The switch may not be reconfigurable.
● So we need ADMs.
● Two light paths that share a common fiber link should not be assigned the same
wavelength.
● So we need Wavelength conversion. This may be based on
Optical Gating
Wave-mixing.
Add drop multiplexing
● Optical cross connects permits wavelength routing
● A virtual light path must be created that spans several links joined by cross connects.
● A light path must carry same wavelength. This is called wavelength continuity requirement.