FCFS Scheduling With Arrival Time

FCFS Arrival Time

FCFS scheduling algorithm simply execute the process according to their arrival time based on FIFO Queue. The process which comes first in the ready queue will get the CPU first.

For FCFS Example 1 and Example 2, Refer FCFS Scheduling Algorithm

Example: 3

Criteria: Non-Preemptive

Mode: Arrival Time

Let’s take an example of The FCFS scheduling algorithm with Arrival Time. The processes and their respective Arrival and Burst time are given in the following table.

ProcessArrival TimeBurst Time
P126
P253
P318
P403
P544

Solution

Step 1: Sort the process based on arrival time from min to max. (0,1,2,4,5) => (P4,P3,P1,P5,P2)
Step 2: Lets draw the Gantt Chart with above sorted process based on arrival time

             (Gantt chart)

ProcessArrival Time (AT)Burst Time (BT)Completion Time (CT)Turn Around Time
TAT = CT-AT
Waiting Time WT = TAT-BTResponse Time
RT = ST-AT
(Start Time-Arrival Time)
P126171599
P25324191616
P318111022
P4033300
P54421171313

  In the above table, we can find the waiting time for the process P1, P2,P3,P4 and P5.          

  Waiting Time for P1 => 9

Waiting Time for P2 => 16

Waiting Time for P3 => 2

Waiting Time for P4 => 0

Waiting Time for P5 => 13

Average Waiting Time(AWT) =(9+16+2+0+13)/5

= 40/5

= 8

Leave a Reply 0

Your email address will not be published. Required fields are marked *