Which one of the following CPU scheduling algorithms cannot be preemptive?
View worked solution
Answer: B
To determine which scheduling algorithm cannot be preemptive, let's understand the difference between preemptive and non-preemptive scheduling:
- Preemptive Scheduling: The operating system can interrupt a currently running process and allocate the CPU to another process (e.g., due to a time-slice expiration or the arrival of a higher-priority process).
- Non-preemptive Scheduling: Once a process is allocated the CPU, it holds it until it voluntarily relinquishes control (either by terminating or by blocking for an I/O operation).
Let's analyze the given options:
- A. Shortest Remaining Time First (SRTF): This is the preemptive version of the Shortest Job First (SJF) algorithm. If a new process arrives with a shorter remaining CPU burst time than the currently running process, the current process is preempted.
- B. First Come First Serve (FCFS): Under FCFS, processes are dispatched in the order of their arrival. Once a process gets the CPU, it runs to completion of its current burst. There is no mechanism to preempt a running process just because another process arrived. Thus, FCFS is strictly non-preemptive.
- C. Round Robin (RR): This algorithm is designed specifically for time-sharing systems and is inherently preemptive. Processes are preempted after a fixed time quantum.
- D. Priority Scheduling: This can be implemented as either preemptive or non-preemptive. In preemptive priority scheduling, a newly arrived process with a higher priority will preempt a running process with a lower priority.
Therefore, First Come First Serve (FCFS) is the only scheduling algorithm among the choices that cannot be preemptive.
Free practice · Your answers on this page are not saved.
