0
17kviews
Use following scheduling algorithms to calculate ATAT and AWT for the following processes:

i) FCFS

ii) Pre-emptive and Non Pre-emptive priority

Process Arrival Time Burst Time Priority
P1 0 8 3
P2 1 1 1
P3 2 2 2
P4 3 3 3
P5 4 6 4

Mumbai University > Information Technology > Sem5 > Operating System

Marks: 10M

Year: Dec 14

1 Answer
0
462views

FCFS

Process Arrival Time Burst Time Priority Waiting Time Turn Around Time
P1 0 8 3 0 8
P2 1 1 1 7 8
P3 2 3 2 7 10
P4 3 2 3 9 11
P5 4 6 4 10 16

Average WT: Total Waiting Time / No of processes: 0+7+7+9+10/5 = 6.6

Average TAT: Total Turn Around Time / No of processes: 8+8+10+11+16/5 = 10.6

Gantt Chart:

enter image description here

Non Pre-emptive SJF:

Process Arrival Time Burst Time Waiting Time Turn Around Time
P1 0 8 0 8
P2 1 1 7 8
P3 2 3 9 12
P4 3 2 6 8
P5 4 6 10 16

Average WT: Total Waiting Time / No of processes = 6.4

Average TAT: Total Turn Around Time / No of processes = 10.4

Gantt Chart:

enter image description here

Pre-emptive SJF:

Process Arrival Time Burst Time Waiting Time Turn Around Time
P1 0 8 12 20
P2 1 1 0 1
P3 2 3 0 3
P4 3 2 2 4
P5 4 6 3 9

Average WT: Total Waiting Time / No of processes = 3.4

Average TAT: Total Turn Around Time / No of processes = 7.4

Gantt chart:

enter image description here

Pre-emptive Priority:

Process Arrival Time Burst Time Waiting Time Turn Around Time
P1 0 8 3 12
P2 1 1 1 1
P3 2 3 2 3
P4 3 2 3 11
P5 4 6 4 16

Average WT: Total Waiting Time/No of processes = 4.6

Average TAT: Total Turn Around Time/No of processes = 8.6

Gantt Chart :

enter image description here

Please log in to add an answer.