Consider a system running under two types of workloads: (a) CPU-intensive jobs, (b) I/O-intensive jobs. Which of the following statements about the relative performance of Interrupt-driven I/O and Programmed I/O is correct?
Step-by-step Solution:
\[ \textbf{Question: } \text{Consider a system running under two types of workloads: } (a) \text{ CPU-intensive jobs, } (b) \text{ I/O-intensive jobs.} \] \[ \text{Which of the following statements about the relative performance of Interrupt-driven I/O and Programmed I/O is correct?} \] \[ \begin{array}{ll} \textbf{A.} & \text{Programmed I/O performs better in both CPU-intensive and I/O-intensive workloads because it gives the CPU full control.} \\[6pt] \textbf{B.} & \text{Programmed I/O performs better for CPU-intensive jobs, while interrupt-driven I/O performs better for I/O-intensive jobs.} \\[6pt] \textbf{C.} & \text{Interrupt-driven I/O performs better for CPU-intensive jobs by freeing the CPU, while programmed I/O performs better for I/O-intensive jobs due to tighter control.} \\[6pt] \textbf{D.} & \text{Interrupt-driven I/O performs better in both CPU-intensive and I/O-intensive workloads because it always reduces CPU involvement.} \end{array} \] --- \[ \textbf{Analysis:} \] $$ \text{CPU-intensive jobs: Programmed I/O wastes CPU cycles in busy waiting, while interrupt-driven I/O allows the CPU to continue computation until an I/O completes → interrupt-driven is better.} $$ $$ \text{ I/O-intensive jobs: Programmed I/O still wastes CPU time, but interrupt-driven I/O reduces CPU overhead, making it more efficient here as well. } $$ Thus, interrupt-driven I/O is better in both workloads. --- \[ \boxed{\text{Correct Answer: D. Interrupt-driven I/O performs better in both CPU-intensive and I/O-intensive workloads.}} \]