Write a program to implement first come first serve algorithm (FCFS) with considering arrival time.



Enter new Process order : 1 2 3 4 5

Enter Arrival time order wise: 2 4 6 1 3
Enter Burst time order wise : 5 7 3 4 2

Calculating Average Waiting Time and Turn-Around Time using Ghantt Chart:

Gantt Chart:
__________________________
| P4 | P1 | P5 | P2 | P3 |
|____|____|____|____|____|
0    0    5    10   12    19

Average Waiting Time : 3.600000
Average Turn-Around Time : 7.200000

Program Code (First Come First Serve):



Output :