(C) is the correct option.
Two things you need to know before answering this –
- Context Switch – It is the process of storing the state of a process or thread so that it can be restored and resume execution at a later point, and then restoring a different, previously saved, state.
- Pre-emption – It is the act of temporarily interrupting an executing task, with the intention of resuming it at a later time. This interrupt is done by an external scheduler with no assistance or cooperation from the task.
Pre-emption happens only after storing the state of the current process.
Now, what happens in Round-Robin algorithm, is as soon as the time quanta for a process expires that process is pre-empted and “context switched” (note the definition of context switch above), and stored in the selection queue. This happens irrespective of the number of processes stored in the queue. The algorithm at the end of each time quanta does the above and then chooses the front-most element from the queue.
The algorithm has no idea if that queue has one or more processes stored, it follows the same step for any possible scenario.
Here is a small paragraph from Galvin (Page 272) supporting the above claim-
Another image (Galvin Page 272) showing how context switch happens irrespective of the process ID,