Consider the 3 processes, P1, P2 and P3 shown in the table. Process Arrival time Time unit Required P1 0 5 P2 1 7 P3 3 4 The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are
Consider the 3 processes, P1, P2 and P3 shown in the table. Process Arrival time Time unit Required P1 0 5 P2 1 7 P3 3 4 The completion order of the 3 processes under the policies FCFS and RR2 (round robin scheduling with CPU quantum of 2 time units) are Correct Answer <strong>FCFS:</strong> P1, P2, P3 <strong>RR2:</strong> P1, P3, P2
The correct answer is "option 3".
CONCEPT:
FCFS is a scheduling algorithm in which the process that scheduled first will execute first completely.
FCFS stands for First Come First Serve.
Round Robin is a scheduling algorithm in which the process executes for a fixed CPU quantum time then the next process gets executed then the next process and goes on.
CALCULATION:
The GANTT chart for the FCFS scheduling algorithm is:
[ alt="F1 Raju S 19.5.21 Pallavi D7" src="//storage.googleapis.com/tb-img/production/21/05/F1_Raju%20S_19.5.21_Pallavi_D7.png" style="width: 283px; height: 55px;">
The completion order for the FCFS scheduling algorithm is: P1 P2 P3
The GANTT chart for the RR scheduling algorithm is:
[ alt="F1 Raju S 19.5.21 Pallavi D8" src="//storage.googleapis.com/tb-img/production/21/05/F1_Raju%20S_19.5.21_Pallavi_D8.png" style="width: 409px; height: 63px;">
The completion order for the RR scheduling algorithm is: P1 P3 P2
Hence, the correct answer is "option 3".