Consider the cyclic queueing model of a computer system shown in Figure 5.7.1 below. It represents a computer system with a constant multiprogramming level of $N$ jobs (programs) sharing the main memory. Server 1 is assumed to be the CPU and server 2 represents the $I / O$ system. ${ }^{17}$ Servers 1 and 2 provide exponential service with rates $\mu$ and $\lambda$, respectively. At the end of a CPU service (burst) a job requests $I / O$ with probability $q$ or leaves the system with its service complete with probability $p=1-q$. When a job completes service and leaves the system, it is immediately replaced by another job with identical statistics to keep the multiprogramming level at a constant $N, N$ is called the multiprogramming level, abbreviated MPL. We consider the system to be a birth-and-death process with the state determined by the number of jobs (programs) at the CPU, either receiving service or in the queue. Thus, the system can be in state $i$ for $i=0,1, \ldots, N$. The birth-and-death coefficients are $\lambda_i=\lambda$ for $i=0,1, \ldots, N-1$, and $\mu_i=\mu q$ for $i=1,2, \ldots, N$. The state transition rate diagram is given in Figure 5.7 .2 below. Let $p_n$ be the probability that there are $n$ customers at the CPU, that is, that the system is in state $n$. Let
$$
\rho=\frac{\lambda}{\mu q} .
$$
Use Equation (4.29) of Chapter 4 to show that
$$
p_n=\rho^n p_0
$$
where
$$
p_0=\frac{1}{\sum_{n=0}^N \rho^n}
$$
so that
$$
p_0= \begin{cases}\frac{1-\rho}{1-\rho^{N+1}} & \text { for } \rho \neq 1 \\ \frac{1}{N+1} & \text { if } \rho=1 .\end{cases}
$$
The CPU utilization, $\rho_1$, is given by $\rho_1=1-p_0$ and the $I / O$ utilization by $\rho_2=1-p_N$. To use this model to calculate mean throughput, $\lambda$, and mean turnaround time, $W$, we assume that each job starts with a CPU burst, that is followed by an $I / O$ burst, after which it rejoins the CPU queue for another CPU burst, etc. After an average of $m$ CPU bursts ( $m$ need not be an integer), it exits the system to be immediately replaced by another job; this keeps the multiprogramming level at $N$. Thus, each job, on the average, passes through the CPU system $m$ times and the $I / O$ system $m-1$ times. The probability, $p$, that a job leaves the system after a CPU burst is given by $p=1 / m$. To calculate the throughput, $\lambda$, that is the average rate at which jobs enter and depart the computer system, we reason that the departure rate is $\mu p$ when the CPU is busy and zero otherwise, so that
$$
\begin{aligned}
\lambda & =\mu p\left(1-p_0\right)+0 \times p_0 \\
& =\mu p \rho_1 .
\end{aligned}
$$
By Little's law, we calculate
$$
W=\frac{N}{\lambda}
$$
(Figure can't copy)
Since the average number of visits a job makes to the CPU is $m$, the average CPU time used per job is
$$
\frac{m}{\mu}=\frac{1}{p \mu} .
$$
Similarly, since, on the average, a job makes $m-1$ visits to the $I / O$ facility, the average job $I / O$ time is
$$
\frac{m-1}{\lambda}=\frac{(m-1)}{m} \frac{m}{\lambda}=\frac{q}{p \lambda} .
$$
Hence, the ratio of average CPU time per job to average $I / O$ time per job is
$$
\frac{\frac{1}{p \mu}}{\frac{q}{p \lambda}}=\frac{\lambda}{q \mu}=\rho .
$$
Therefore, $\rho$ provides a measure of the relative importance of CPU service and $I / O$ service for jobs. If $\rho<1$, the system is said to be $I / O$ bound; if $\rho>1$, the system is said to be $C P U$ bound. Of course, if $\rho \approx 1$, the system is said to be balanced.