FCFS scheduling

First Come First Serve(FCFS) Scheduling

  • Jobs are executed on first come, first serve basis.
  • Easy to understand and implement.
  • Poor in performance as average wait time is high.

First Come First Serve(FCFS) Scheduling

Contributor's Info

Created:
0Comment
First Come First Serve (FCFS) Scheduling Algorithm

First Come First Serve (FCFS) scheduling algorithm: FCFS is implemented using Queue and works as first come first serve manner. Processes executes based on their order of arrivals. FCFS algorithm is simple to implement but it causes Convoy Effect. If first process has too long burst time, so other shorter process has more waiting time to execute, this effect called as Convoy Effect.

Example: Consider the following table:

 

Process no.

Arrival Time

Burst Time

P1

0

6

P2

2

1

P3

4

4

P4

5

3

Find the average waiting time and average turn arround time using FCFS algorithm?

Solution:

 Using FCFS process scheduling algorithm, gantt chart is:

 

19.jpg

 

Therefore,
 

Waiting Time

Turn Around Time

Completion Time

Process No.

Arrival Time

Burst Time

6 - 6 = 0

6 - 0 = 6

6

P1

0

6

5 - 1 = 4

7 - 2 = 5

7

P2

2

1

7 - 4 = 3

11 - 4 = 7

11

P3

4

4

9 - 3 = 6

14 - 5 = 9

14

P4

5

3

 

Average Turn Arround Time = (6 + 5 + 7 + 9) / 4 = 6.75

Average Waiting Time = (0 + 4  + 3 + 6) / 4 = 3.25

 

Contributor's Info

Created:
0Comment