0
1.3kviews
consider the following snapshot of the process to be executed .Draw the Gantt chart and determine the average waiting time and average turn around time for FCFS, SJF(pre-emptive),SJF(non pre-emptive)
PROCESS ARRIVAL TIME BURST TIME
P1 0 7
P2 1 4
P3 3 3
P4 5 1
P5 7 5

Subject: Operating System

Topic: PROCESS MANAGEMENT

Difficulty: Hard

1 Answer
2
11views

First Come First Serve

Gantt chart:

   A     B      C      D    E
0     7     11     14    15    20
Job Arrival Time Burst Time Finish Time Turnaround time Waiting time
A 0 7 7 7 0
B 1 4 11 10 6
C 3 3 14 11 8
D 5 1 15 10 9
E 7 5 20 13 8
Average 51 / 5 = 10.2 31 / 5 = 6.2

Shortest Job First( Non-preemptive)

Gantt chart:

   A    D    C    B    E
0    7    8    11    15    20
Job Arrival Time Burst Time Finish Time Turnaround Time Waiting Time
A 0 7 7 7 0
B 1 4 15 14 10
C 3 3 11 8 5
D 5 1 8 3 2
E 7 5 20 13 8
Average 45 / 5 = 9 25 / 5 = 5

Shortest job first (preemptive):

Gantt chart:

  A    B    D    C    E    A
0    1    5    6    9    14    20
Job Arrival Time Burst Time Finish Time Turnaround Time Waiting Time
A 0 7 20 20 13
B 1 4 5 4 0
C 3 3 9 6 3
D 5 1 6 1 0
E 7 5 14 7 2
Average 38 / 5 = 7.6 18 / 5 = 3.6
Please log in to add an answer.