Consider the 3 processes, P₁, P₂ and P₃ shown in the table. The completion…
2012
Consider the 3 processes, P₁, P₂ and P₃ 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) is:
Process | Arrival Time | Time Units Required |
|---|---|---|
P₁ | 0 | 5 |
P₂ | 1 | 7 |
P₃ | 3 | 4 |
- A.
FCFS: P₁, P₂, P₃ RR: P₁, P₂, P₃
- B.
FCFS: P₁, P₃, P₂ RR: P₁, P₃, P₂
- C.
FCFS: P₁, P₂, P₃ RR: P₁, P₃, P₂
- D.
FCFS: P₁, P₃, P₂ RR: P₁, P₂, P₃
Attempted by 28 students.
Show answer & explanation
Correct answer: C
For First-Come-First-Served (FCFS) scheduling, processes are executed in the order of their arrival times. P₁ arrives at 0, P₂ at 1, and P₃ at 3. Therefore, the completion order is P₁, P₂, P₃.
For Round Robin scheduling with a quantum of 2, the CPU is allocated in time slices. Simulation consistent with the validated answer shows completion at times P₁ (11), P₃ (13), and P₂ (16). Thus, the completion order is P₁, P₃, P₂.
Thus, the correct completion orders are FCFS: P₁, P₂, P₃ and RR: P₁, P₃, P₂.
A video solution is available for this question — log in and enroll to watch it.