Queueing theory preview: the M/M/1 queue
Queueing theory studies congestion and waiting in service systems: bank tellers, call centers, routers,
checkout lines, hospital triage, and more. The simplest and most famous model is the M/M/1 queue:
arrivals form a Poisson process, service times are exponential, and there is a single server.
1) What “M/M/1” means
- M (Markovian arrivals): interarrival times are exponential → arrival count is Poisson with rate \(\lambda\).
- M (Markovian service): service times are exponential with rate \(\mu\) (mean service time \(1/\mu\)).
- 1: one server processes customers one at a time.
2) Stability and utilization
Define the utilization (busy fraction):
\[
\rho=\frac{\lambda}{\mu}.
\]
A steady-state equilibrium exists only if:
\[
\lambda<\mu \quad (\rho<1).
\]
Intuition: if arrivals outpace service on average, the line grows without bound and “long-run averages” diverge.
3) Core M/M/1 formulas (system vs. queue)
Let \(W\) be the mean time a customer spends in the system (waiting + service),
and \(L\) be the mean number of customers in the system (waiting + in service). For M/M/1:
\[
W=\frac{1}{\mu-\lambda},
\qquad
L=\frac{\lambda}{\mu-\lambda}.
\]
Queue-only metrics (excluding the customer in service) are:
\[
W_q=W-\frac{1}{\mu}=\frac{\lambda}{\mu(\mu-\lambda)},
\qquad
L_q=\lambda W_q.
\]
4) Little’s law (the universal identity)
Little’s law holds extremely broadly (not just M/M/1): in steady state,
\[
L=\lambda W.
\]
This is why M/M/1 formulas are consistent: once you know \(W\), multiply by \(\lambda\) to get \(L\).
5) “Bank teller” example
If \(\lambda=4/\text{hour}\) and \(\mu=5/\text{hour}\), the system is stable (\(4<5\)).
Then:
\[
W=\frac{1}{5-4}=1\ \text{hour},
\qquad
L=\lambda W=4\cdot 1=4.
\]
6) Simulation view (what the animation shows)
The animated graph in this calculator generates a sample path using:
- Exponential interarrival times with rate \(\lambda\).
- Exponential service times with rate \(\mu\).
From the event timeline (arrivals and departures), the tool draws the queue length curve \(Q(t)\)
and estimates time averages such as:
\[
\overline{Q}=\frac{1}{T}\int_0^T Q(t)\,dt.
\]
Longer horizons \(T\) tend to give simulated averages closer to the theoretical steady-state values (when \(\rho<1\)).
7) University extension: M/M/c (multi-server)
With \(c\) parallel servers (e.g., \(c\) bank tellers), a basic stability condition is:
\[
\lambda < c\mu.
\]
Exact steady-state performance uses the Erlang C formula (probability of waiting). This calculator includes
a simulation preview for M/M/c and reports utilization \(\rho=\lambda/(c\mu)\).