Numerical Solved by FCFS

Q5. Consider the set of process P1,P2,P3,P4 and P5 having burst time as 10,1,2,1 and 5 ms and priority 5,1,3,4 and 2. The processes are assumed to have arrived at time 0, then draw Gantt Chart and calculate average turnaround and waiting time using First Come First Serve Scheduling Algorithm.

Ans. Solving by FCFS  

Process                Burst Time           Priority Time

P1                        10                        5

P2                        1                           1

P3                        2                           3

P4                        1                           4

P5                        5                           2

Gantt Chart:

P1 P2 P3 P4 P5

0                               10                             11                   13          14                                  19

P1’s waiting time=0

P2’s waiting time=10

P3’s waiting time=11

P4’s waiting time=13

P5’s waiting time=14

 

Waiting Time

=(0+10+11+13+14)/5

=48/5

=9.6 ms

 

Turnaround Time

P1=10

P2=11

P3=13

P4=14

P5=19

 

Average Turnaround Time

=(10+11+13+14+19)/5

=67/5

=13.6 MS

 

Leave a Reply

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

473 Views
%d bloggers like this: