2 – SJF ( Shortest Job First ) Or SPN ( Short Process Next)
process
|
Burst Time
|
P1
|
10
|
P2
|
5
|
P3
|
20
|
P4
|
10
|
SJF P2 p1
p4 p3
CPU
|-----------|-----------|-----------|-----------|
0
5
15
25
45
TA = Time End Process – 0 (Arrival Time)
TA1=
15 – 0 = 15
TA2=
5 – 0 = 5
TA Average è 90/4 = 18.75
TA3=
45 – 0 = 45
TA4=
25 – 0 = 25
WT = Wait Time Process – 0 (Arrival Time)
WT1
= 5 – 0 = 5
WT2
= 0 – 0 = 0
WTAverage è 45/4 = 11.25
WT3
= 25 – 0 = 25
WT4
= 15 – 0 = 15
No comments:
Post a Comment