OA. free
Free
Texas Instruments Core Cs & Systems Core Computer Science Medium

Which of these techniques can be used to keep both the CPU and the I/O devices busy...

Texas Instruments technical mcq question, verified with a worked answer. Free to practise - no sign-up.

Which of these techniques can be used to keep both the CPU and the I/O devices busy simultaneously in an operating system?

Choose one option.
Show answer & explanation
Answer: D. All of the given options

To maximize system throughput, the OS must prevent the CPU from idling while I/O operations occur. Multiprogramming allows switching to another task, preemptive scheduling ensures high-priority tasks can take over the CPU, and spooling decouples slow I/O devices from the fast CPU.

Step-by-step Derivation:
Step 1: Analyze Multiprogramming. In a multiprogramming environment, the OS keeps multiple processes in memory. When the current process initiates an I/O request and enters a waiting state, the OS switches the CPU to another ready process. This ensures the CPU remains busy while the I/O device is operating.

Step 2: Analyze Preemptive Scheduling. Preemptive scheduling allows the OS to interrupt a running process to allocate the CPU to another process (e.g., based on priority or time-slice). This prevents a single CPU-bound process from blocking others and allows the system to respond quickly to I/O completion interrupts, thereby keeping both CPU and I/O active.

Step 3: Analyze Spooling (Simultaneous Peripheral Operations On-Line). Spooling uses a disk as an intermediate buffer between a fast CPU and a slow I/O device (like a printer). The CPU can write data to the spool file at high speed and then move on to other tasks, while the I/O device reads from the spool independently. This allows the CPU and I/O device to operate concurrently without the CPU waiting for the physical device to finish.

Step 4: Conclusion. Since all three techniques (Multiprogramming, Preemptive Scheduling, and Spooling) contribute to the goal of simultaneous CPU and I/O utilization, Option D is the correct choice.