Which of the following scheduling algorithms selects the process that has been…
2025
Which of the following scheduling algorithms selects the process that has been waiting the longest?
Answer: C. First-Come, First-Served (FCFS) — First-Come, First-Served (FCFS) is a non-preemptive CPU scheduling algorithm whose only selection rule is queue position: at every scheduling decision, the…
- A.
Shortest Job First (SJF)
- B.
Round Robin (RR)
- C.
First-Come, First-Served (FCFS)
- D.
Priority Scheduling
Attempted by 462 students.
Show answer & explanation
Correct answer: C
First-Come, First-Served (FCFS) is a non-preemptive CPU scheduling algorithm whose only selection rule is queue position: at every scheduling decision, the CPU is handed to whichever ready process has been sitting in the ready queue the longest -- that is, the process that entered the queue earliest among those still waiting -- regardless of its burst time, priority, or any other attribute.
Apply this to a concrete arrival sequence: P1 arrives at time 0 with burst time 99, P2 arrives at time 1 with burst time 1, and P3 arrives at time 2 with burst time 1.
At time 0, P1 is the only process in the ready queue, so the scheduler dispatches P1.
P2 and P3 arrive at t = 1 and t = 2, but must wait, because FCFS is non-preemptive and never interrupts a running process.
When P1 finishes at t = 99, the scheduler looks at who has been waiting in the queue the longest -- P2, waiting since t = 1 -- and dispatches P2 next, then P3.
The execution order is P1 -> P2 -> P3, decided purely by queue-entry (arrival) order -- even though P1 has the longest burst time, it is P1's arrival order, not its burst time, that gets it scheduled first.
Contrast this with the other listed algorithms, each of which uses a different selection rule:
Shortest Job First dispatches by the process's own predicted burst time -- the process needing the least CPU time next runs first -- so how long a process has already waited plays no role.
Round Robin cycles every ready process through a fixed time quantum in rotation; the next process to run is whichever is next in the rotation, not whichever has accumulated the most waiting time.
Priority Scheduling dispatches by an assigned priority level, so a process can be chosen purely because of its priority value even if other processes have waited far longer.
Only First-Come, First-Served defines its dispatch rule purely in terms of time already spent waiting in the ready queue, which is exactly the criterion the question describes.