FCFS(FIRST COME FIRST SERVED) question

Here are 30 questions on FCFS(FIRST COME FIRST SERVED) process scheduling algorithms. Each question is presented in a table format, followed by the solution with Gantt charts, average turnaround time (TAT), and average waiting time (WT).

Question 1

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 4
P2 2 3
P3 4 2

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 4 4 4 0
P2 2 3 7 5 2
P3 4 2 9 5 3

Formulas:

Average Turn Around Time = (4 + 5 + 5) / 3 = 14 / 3 = 4.67 units

Average Waiting Time = (0 + 2 + 3) / 3 = 5 / 3 = 1.67 units

Question 2

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 1 5
P2 2 3
P3 3 6

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 1 5 6 5 0
P2 2 3 9 7 4
P3 3 6 15 12 6

Formulas:

Average Turn Around Time = (5 + 7 + 12) / 3 = 24 / 3 = 8 units

Average Waiting Time = (0 + 4 + 6) / 3 = 10 / 3 = 3.33 units

Question 3

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 1 2
P2 3 4
P3 5 3
P4 6 2

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 1 2 3 2 0
P2 3 4 7 4 0
P3 5 3 10 5 2
P4 6 2 12 6 4

Formulas:

Average Turn Around Time = (2 + 4 + 5 + 6) / 4 = 17 / 4 = 4.25 units

Average Waiting Time = (0 + 0 + 2 + 4) / 4 = 6 / 4 = 1.5 units

Question 4

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 4
P2 1 3
P3 2 1
P4 3 2

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 4 4 4 0
P2 1 3 7 6 3
P3 2 1 8 6 5
P4 3 2 10 7 5

Formulas:

Average Turn Around Time = (4 + 6 + 6 + 7) / 4 = 23 / 4 = 5.75 units

Average Waiting Time = (0 + 3 + 5 + 5) / 4 = 13 / 4 = 3.25 units

Question 5

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 2 3
P2 4 1
P3 6 2
P4 7 4

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 2 3 5 3 0
P2 4 1 6 2 1
P3 6 2 8 2 0
P4 7 4 12 5 1

Formulas:

Average Turn Around Time = (3 + 2 + 2 + 5) / 4 = 12 / 4 = 3 units

Average Waiting Time = (0 + 1 + 0 + 1) / 4 = 2 / 4 = 0.5 units

Question 6

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 6
P2 2 3
P3 4 5
P4 6 2

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 6 6 6 0
P2 2 3 9 7 4
P3 4 5 14 10 5
P4 6 2 16 10 8

Formulas:

Average Turn Around Time = (6 + 7 + 10 + 10) / 4 = 33 / 4 = 8.25 units

Average Waiting Time = (0 + 4 + 5 + 8) / 4 = 17 / 4 = 4.25 units

Question 7

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 7
P2 1 5
P3 2 3

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 7 7 7 0
P2 1 5 12 11 6
P3 2 3 15 13 10

Formulas:

Average Turn Around Time = (7 + 11 + 13) / 3 = 31 / 3 = 10.33 units

Average Waiting Time = (0 + 6 + 10) / 3 = 16 / 3 = 5.33 units

Question 8

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 3 2
P2 5 4
P3 7 3
P4 9 1

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 3 2 5 2 0
P2 5 4 9 4 0
P3 7 3 12 5 2
P4 9 1 13 4 3

Formulas:

Average Turn Around Time = (2 + 4 + 5 + 4) / 4 = 15 / 4 = 3.75 units

Average Waiting Time = (0 + 0 + 2 + 3) / 4 = 5 / 4 = 1.25 units

Question 9

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 4
P2 1 5
P3 3 3
P4 5 2

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 4 4 4 0
P2 1 5 9 8 3
P3 3 3 12 9 6
P4 5 2 14 9 7

Formulas:

Average Turn Around Time = (4 + 8 + 9 + 9) / 4 = 30 / 4 = 7.5 units

Average Waiting Time = (0 + 3 + 6 + 7) / 4 = 16 / 4 = 4 units

Question 10

find the average Turn Around Time and Waiting Time of following processes using FCFS(FIRST COME FIRST SERVED) process scheduling algorithm?

Process Arrival Time Burst Time
P1 0 2
P2 2 4
P3 4 3
P4 5 1

Solution

Formulas:

Gantt Chart


Process Arrival Time Burst Time Completion Time Turn Around Time Waiting Time
P1 0 2 2 2 0
P2 2 4 6 4 0
P3 4 3 9 5 2
P4 5 1 10 5 4

Formulas:

Average Turn Around Time = (2 + 4 + 5 + 5) / 4 = 16 / 4 = 4 units

Average Waiting Time = (0 + 0 + 2 + 4) / 4 = 6 / 4 = 1.5 units