Consider the 3 processes, and shown in the table. The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
GATE CSE 2012Operating System › CPU SchedulingVerified
GATE CSE 2012 PYQ: Consider the 3 3 3 processes, P 1 , P 2 P1, P2 P 1 , P 2 and P 3 P3 P 3 shown in the table. Process Arrival…
- AFCFS: RR2:
- BFCFS: RR2:
- CFCFS: RR2:Correct answer
- DFCFS: RR2:
Answer
(C) FCFS : P 1 , P 2 , P 3 P1, P2, P3 P 1 , P 2 , P 3 RR2 : P 1 , P 3 , P 2 P1, P3, P2 P 1 , P 3 , P 2
Approach
Simulate FCFS using arrival order, then simulate RR2 by tracking the ready queue and completion times with a quantum of 2 time units.
Simulating both algorithms shows FCFS completes processes in the order P1, P2, P3, whereas RR2 completes them in the order P1, P3, P2. Since these orders are different, option C is correct.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.