2.
Texas Instruments technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Keeping the CPU and the I/O devices busy**
Which of these techniques can be used to keep both the CPU and the I/O devices busy simultaneously in an operating system?
Show answer & explanation
To maximize system throughput and resource utilization, the OS must ensure that the CPU does not remain idle while I/O operations are occurring. Preemptive scheduling, multiprogramming, and spooling are all mechanisms that allow the CPU to switch tasks or manage data buffers so that it can process one job while another is waiting for or performing I/O.
Step-by-step Derivation:
Step 1: Analyze Multiprogramming. Multiprogramming allows multiple programs to reside in memory. When the current process initiates an I/O request and must wait, the OS switches the CPU to another ready process. This keeps the CPU busy while the I/O device is active.
Step 2: Analyze Preemptive Scheduling. This allows the OS to interrupt a currently running process to allocate the CPU to another process (e.g., based on priority or time slices). This ensures that high-priority tasks or I/O-bound tasks can be serviced quickly, preventing the CPU from idling during long-running computations or waiting for slow I/O.
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 'print' a file to the disk at high speed and then move on to other tasks, while the I/O device reads from the disk independently, keeping both busy simultaneously.
Step 4: Conclusion. Since all three techniques contribute to the goal of overlapping CPU processing with I/O operations to increase efficiency, Option D is the correct choice.