Module 4 -- Queueing Theory
Index
- What is Queueing Theory?
- Case 1 M/M/1 (∞ / FIFO) Poisson Queueing Model.
- Example 1 (Infinite capacity)
- Example 2 (Infinite capacity)
- Case 2 M/M/1(N/FIFO)-- finite capacity queueing model
- Key symbols/reminder
- Two cases
- Example 1
case. (finite capacity) - Example 1
case. (finite capacity) - M/M/1 (∞) vs M/M/1 (N) — Formula Comparison Table
What is Queueing Theory?
Queueing theory is all about understanding systems where “customers” arrive, wait, get served, and leave.
Customers can be people, packets, jobs, tasks — anything that “queues”.
Now we all know what a queue is.
A queue is a linear data structure that follows the First-In, First-Out (FIFO) principle, meaning the first item added to the queue is the first one to be removed. Items are added to the rear of the queue (called enqueue) and removed from the front (called dequeue), much like people waiting in a line for a service.

So, what's with the new stuff then? Queueing Models, Poisson,
Case 1: M/M/1 (∞ / FIFO) Poisson Queueing Model.
Step 1: The need for Queueing Models
Think of queues in real life.
Are arrivals perfectly regular?
❌ No — people don’t arrive at exactly one every 10 seconds.
They come randomly: sometimes 2 people at once, sometimes no one for a minute.
Queueing Theory models random arrivals and random service times.
To describe randomness mathematically, we use a standard tool:
Poisson process → a way to model random arrivals.
And it uses one simple symbol:
(lambda) -- the average arrival rate
- If
on average, 10 customers arrive every hour. - Not exactly every 6 minutes — but on average.
That’s it. No magic.
Step 2: Service time is also random
You cannot serve every customer in exactly 5 minutes.
Sometimes 4, sometimes 7, etc.
So, we define:
-- the average service rate
If
Again — nothing complicated.
Step 3: Why do we need utilization?
This is the most intuitive part.
Utilization just means:
How busy is the server?
This is answered by this formula:
Example:
arrivals/hour services/hour
Thus,
Now,
If
So the only condition for a working queue is:
(server must be faster than arrivals)
Step 4: The M/M/1 Queueing Model
M/M/1 literally means:
- M → arrivals follow a Markovian (Poisson) process
- M → service times are Markovian (exponential distribution)
- 1 → one server
You do not need to study distributions deeply.
All you need to accept is:
Poisson arrivals + exponential service = simplest realistic queue model.
Step 5: Important Terminologies
These are just average quantities:
- L = average number of customers in the whole system
(waiting + being served) = average number waiting in the queue - W = average time a customer spends in the system
= average time spent waiting in the queue
They are connected by the famous but simple:
Little's law
If more customers arrive per hour, L increases.
If each customer spends more time in the system, L increases.
Simple.
Formula set for M/M/1 (∞ / FIFO)
Let
- Stability condition:
- Utilization:
- Probability that the system is empty:
- Probability of
customers in system: - Average number of customers in the system
- Average number of customers waiting in queue:
- Average time in system:
- Average waiting time in queue:
Whoops. Too many formulae? Hell nah I myself am not memorizing all that, so let's simplify all this with the core formulae that we can use to build all these.
We need to remember 3 rules and 2 definitions.
Definition 1:
Definition 2:
Rule 1: The utilization of the server is given by the ratio of the arrival rate to the service rate of the customers per hour. (Or the average number of customers that are being served.)
Just “how busy the server is”.
Thus:
Now, for the probability that the system is empty, we can just get the value by subtracting it from 1:
Then, the probability of
Rule 2: Average number of customers in the system (This means the people waiting in the queue plus the one person that is being served (if there is one)). This one formula unlocks everything else.
Intuition:
If the server is almost full most of the time, L becomes large.
If server is fast compared to arrivals, L stays small.
Rule 3: Little's Law!
From here we can get the average time in system
or:
Now, for the average number of customers waiting in queue (
We go back to the definition of L first:
L is the average number of customers in the system (This means the people waiting in the queue plus the one person that is being served (if there is one))
So,:
or:
Fair so far. We are halfway there.
Now, for the average customers that is in service.
We know that the average number of customers that are being served is defined by
But why, a probability? Why
In an M/M/1 queue, the number of customers being served is either:
- 0 (server idle) (Let's take is as
) - 1 (server busy) (
)
There is no other possibility.
So, the average number of customers in service become:
So, there we have
So,
Plugging this back into our earlier structure:
Finally:
Lastly, for the average waiting time in queue
This one is very symmetrical to
Substituting
Finally:
Example 1
Given arrival rate
Find:
- Utilization rate of the server.
- Probability that the server is empty.
- Probability of 1 customer in the system.
- Average number of customers in the system.
- Average waiting time per customer in the queue.
- Average time spent in system.
- Average waiting time in the queue.
Solution:
(a) The utilization:
(b) Probability that the server is empty (not being utilized):
(c) Probability of 1 customer in the system
(d) Average number of customers in the system:
(e) Average waiting time of customers in the queue:
(f) Average time spent in the system:
From Little's law
(g) Average waiting time in the queue:
Short interpretation: server busy 66.7% of the time; on average 2 customers in system (1.333 waiting + 0.666 being served); each customer spends 15 min total, waiting 10 min.
Example 2
Given average waiting time in queue
Find:
- Arrival rate of customers.
- Utilization rate of the server.
- Probability that the server is empty.
- Average number of customers in the system.
- Average waiting time per customer in the queue.
- Average time spent in system.
(a) The arrival rate of customers:
From:
and:
(b) Utilization rate:
(c) Probability that the server is empty:
(d) Average number of customers in the system:
(e) Average waiting time of customers in the queue:
(f) Average time spent in the system:
From:
Interpretation: with those numbers, arrivals are half the service rate; average one customer in system (0.5 waiting, 0.5 in service); customers wait 10 minutes on average and spend 20 minutes total.
Case 2: M/M/1(N/FIFO)-- finite capacity queueing model
Short plain-English first: now the system can hold at most N customers (including the one in service).
If an arrival finds
Key symbols/reminder
= offered arrival rate = service rate - Utilization,
= system capacity (max customers including one in service) = steady-state probability of customers in the system ( ) = accepted arrival rate (use this in Little’s Law for times)
Two cases
, arrivals exactly equal to service
For the infinite M/M/1 queue, we reject ρ≥1 because the queue would blow up.
For the finite case, the queue cannot blow up, it's capped at
So, when
All probabilities become equal.
But we still need them to sum to 1:
That's:
And for
Numerical solving.
Alright now since I am pressed for time, I will stop with the theoretical explanations here and skip ahead to how to solve numericals of the finite case using only 4 formulae.
One master formula:
Utilization for
One arrival formula:
Effective arrival:
One average formula
Average number of customers in the system
Little's law (same as infinite queue case)
and:
and:
Example 1: case.
Given arrival rate = 3 customers per hour, service rate = 5 customers per hour and max system capacity = 4 customers.
Find:
- Utilization
- Utilization for all customers ranging from none (system empty) to the max system capacity (
) - The effective arrival
- Average number of customers in the system
- Average waiting time of customers in the queue
- Average time spent in the system
- Average time spent in the queue
So, we have:
(a) Utilization:
(b) Utilization for all customers ranging from none (system empty) to the max system capacity (
From:
Computing the denominator first:
So,
The blocking probability is
(c) Effective arrival
(d) Average number of customers in the system:
Here
So,
(d) Average time spent waiting by customers in the queue:
(e) Average time spent in the system:
(f) Average time spent in the queue:
Example 2: case
Given arrival rate = 4 customers per hour, service rate = 4 customers per hour and max system capacity = 3 customers.
Find:
- Utilization
- Utilization for all customers ranging from none (system empty) to the max system capacity (
) - The effective arrival
- Average number of customers in the system
- Average waiting time of customers in the queue
- Average time spent in the system
- Average time spent in the queue
So, we have:
(a) Utilization:
(b) Utilization for all customers ranging from none (system empty) to the max system capacity (
From:
Computing the denominator first:
So,
The blocking probability is
(c) Effective arrival
(d) Average number of customers in the system:
Here
So,
(d) Average time spent waiting by customers in the queue:
(e) Average time spent in the system:
(f) Average time spent in the queue:
M/M/1 (∞) vs M/M/1 (N) — Formula Comparison Table
Just as a final summary.
| Concept | M/M/1 (Infinite capacity) | M/M/1 (Finite capacity, max = N) |
|---|---|---|
| Utilization | ||
| State probabilities | ||
| Probability of empty system | ||
| Blocking probability | Not applicable (no blocking) | |
| Effective arrival rate | ||
| Avg. number in system | ||
| Avg. number in queue | ||
| Avg. time in system | ||
| Avg. waiting time in queue | ||
| Stability requirement | Always stable (capacity finite) | |
| Little’s Law | $L = \lambda_{\text{eff}} W $, $ L_q = \lambda_{\text{eff}} W_q$ |