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

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

PROCESS ARRIVAL TIME BURST TIME PRIORITY

P1 1 8 2
P2 4 3 1
P3 0 4 5
P4 5 6 4
P5 2 2 3

FCFS
0 4 12 14 17 23 process waiting time
P1 12 – 8 – 1 = 3
P3 P1 P5 P2 P4
P2 17 – 3 – 4 = 10
P3 4-4-0=0
P4 23 – 6 – 5 = 12
P5 14 - 2- 2 = 10
average waiting 7
time

Preemptive sjf

0 2 4 6 9 15 23 process waiting time


P1 15 – 0 – 1 = 14
P3 P5 P3 P2 P4 P1 P2 6-0-4=2
P3 4–2–0=2
P4 9-0-5 = 4
P5 2-0-2=0
average waiting 4.4
time
process waiting Time
Non preemptive sjf P1 15 – 1 = 14
P2 6-4=2
0 4 6 9 15 23 P3 0–0=0
P4 9-5=4
P3 P5 P2 P4 P1 P5 4–2=2
average waiting 4.4
time

You might also like