Proses
|
Arrival Time
|
Burs time
|
P1
|
0
|
10
|
P2
|
4
|
6
|
P3
|
6
|
4
|
P4
|
8
|
8
|
JAWAB :
A. ALGORITMA
FCFS
Gant Chart
P1
|
P2
|
P3
|
P4
|
0 10 16 20 28
Awt=( 0+10+16+20)/4=46/4=11,5 ms
B. ALGORITMA
SJF-NON PREMPTIVE
Gant chart
P1
|
P3
|
P2
|
P4
|
0 10 14 20 28
P1= 0-0=0
P2=14-4=10
P3=10-6=4
P4=20-8=12
AWT = (0+10+4+12)/4=26/4=6.5 ms
C . ALGORITMA
SJF-PREEMPTIVE
Gant chart
P1
|
P2
|
P3
|
P4
|
P3
|
P2
|
P1
|
0 4
6 8
16 18
22 28
P1=0 + (27-4)-0 =18
P2=4+(18-6)-4=12
P3=6+(16-8)-6=8
P4=8-8=0
AWT= (18+12+8+0)/4=38/4=9.5 Ms
D. ALGORITMA
ROUND-ROBIN (QT-2 ms)
Gant chart
P1
|
P2
|
P3
|
P4
|
P1
|
P2
|
P3
|
P4
|
P1
|
P2
|
P4
|
P1
|
P4
|
P1
|
0 2
4 6 8
10 12 14
16 18 20
22 24 26
28
P1=0+(8+16+22+26-2)=0+70=70
P2=2+(10+18-2)=2+26=28
P3=4+(12-6)=4+6=10
P4=6+(16+22+26-8)=6+56=61
AWT=(70+28+10+61)/4=169/4=42,25
Ms
E. ALGORITMA
PRIORITY DENGAN PRIORITAS MASING-MASING (P1=3,P2=2,P3=1,P4=4)
Gant chart
P3
|
P2
|
P1
|
P4
|
0 4 10 20 28
AWT=(0+4+10+20)/4=34/4=8.5 Ms
06.17
0 komentar:
Posting Komentar