Consider the statements given below: I) There are two queues for accommodating processes...
Qualcomm technical mcq question, verified with a worked answer. Free to practise - no sign-up.
Consider the statements given below:
I) There are two queues for accommodating processes named as NEW and ACCEPTED.
II) The CPU time slice is only available to the processes in the ACCEPTED queue.
III) A limit is mandatory for the number of processes which can be present in the process queue at a time.
Which one of the scheduling algorithms given in options does the information given in the statements points to?
Show answer & explanation
The Selfish Round Robin (SRR) algorithm maintains separate queues: a NEW queue for arriving processes and an ACCEPTED queue for processes receiving CPU time slices. This matches statements I and II exactly. Statement III reflects SRR's admission control policy, which limits how many processes can transition from NEW to ACCEPTED at any time to prevent resource exhaustion. The other algorithms either use a single queue (standard Round Robin), don't distinguish between NEW/ACCEPTED states (Skip RR), or lack the specific admission limit characteristic (Multilevel Queue Scheduling).
Step-by-step Derivation:
Analyze each statement against the scheduling algorithms:
Statement I: Two queues (NEW and ACCEPTED) - Selfish RR has this structure to separate new arrivals from admitted processes.
Statement II: CPU time slice only for ACCEPTED queue - This is a defining characteristic of Selfish RR; the NEW queue holds processes awaiting admission.
Statement III: Mandatory limit on queue size - Selfish RR implements an admission control threshold to manage the number of processes in the ACCEPTED queue, preventing unbounded growth.
Matchup:
- Round Robin (C): Uses a single queue, no NEW/ACCEPTED distinction.
- Skip Round Robin (B): Skips processes that have completed I/O, but doesn't enforce a strict two-queue model with admission control.
- Multilevel Queue Scheduling (D): Has multiple queues but for priority levels, not NEW/ACCEPTED separation with admission limits.
- Selfish Round Robin (A): Precisely matches all three statements with its NEW queue (admission control), ACCEPTED queue (CPU time allocation), and admission limit policy.