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



Case 1:
1 Enter new Process order : 1 2 3 4 5
Enter Burst time order wise : 2 5 8 4 6

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

Gantt Chart:
 
__________________________
| P1 | P2 | P3 | P4 | P5 |
|____|____|____|____|____|
0    2    7   15   19    25

Process  	TAT     WT  

P1  	     2      0 
P2           7       2
P3           15      7
P4           19      15
P5           25      19

Average Waiting Time : 8.000000 
Average Turn-Around Time : 13.000000

Program Code (First Come First Serve):



Output :