0
3.5kviews
Assume following processes arrive for execution at the indiacted and length of cpu burst time in ms.
Process Burst Time Arrival time Priority
P1 10 0 5
P2 6 0 2
P3 7 1 4
P4 4 1 1
P5 5 2 3

Find AWT, ATAT for FCFS, SJF (mon - preemptive) and round robin (Quantum -3ms)

1 Answer
1
160views

First come First Serve:

Gant chart:

  A     B     C     D     E
0   10    16    23    27    32
Job Arrival Time Burst Time Finish Time Turnaround Time Waiting Time
A 0 10 10 10 0
B 0 6 16 16 10
C 1 7 23 22 15
D 1 4 27 26 22
E 2 5 32 30 25
Average 104 / 5 = 20.8 72 / 5 = 14.4

Shortest Job First (non-premptive)

Gant chart:

    B    D    E    C    A
0    6    10    15    22    32
Job Arrival Time Burst Time Finish Time Turnaround Time Waiting Time
A 0 10 32 32 22
B 0 6 6 6 0
C 1 7 22 21 14
D 1 4 10 9 5
E 2 5 15 13 8
Average 81 / 5 = 16.2 49 / 5 = 9.8

Round Robin time quantum = 3

Gant chart:

   A    B    C    D    E     A      B    C     D     E     A     C     A
0    3    6    9    12    15    18    21    24    25    27    30    31    32
Job Arrival Time Burst Time Finish Time Turnaround Time Waiting Time
A 0 10 32 32 22
B 0 6 21 21 15
C 1 7 31 30 23
D 1 4 25 24 20
E 2 5 27 25 20
Average 132 / 5 = 26.4 100 / 5 = 20
Please log in to add an answer.