1. Priority Scheduling
Proses | Burst Time (ms) | Prioritas |
P1 | 7 | 3 |
P2 | 2 | 4 |
P3 | 3 | 3 |
P4 | 2 | 1 |
P5 | 10 | 2 |
Gant Chart
P4 | P5 | P1 | P3 | P2 |
0 2 12 19 22 24
Proses | Waiting Time |
P1 | 12 |
P2 | 22 |
P3 | 19 |
P4 | 0 |
P5 | 2 |
AWT = 12 + 22 + 19 + 0 + 2 / 5 = 11 ms
2. Round Robin, dengan Q = 3
Gant Chart
Proses | Burst Time (ms) |
P1 | 23 |
P2 | 6 |
P3 | 6 |
P1 | P2 | P3 | P1 | P2 | P3 | P1 | P1 | P1 | P1 | P1 | P1 |
0 3 6 9 12 15 18 21 24 27 30 33 35
Proses | Waiting Time (ms) |
P1 | 0+(9-3)+(18-12) = 12 |
P2 | 3+(12-6) = 9 |
P3 | 6+(15-9) = 12 |
AWT = 12 + 9 + 12 / 3 = 11 ms
AWT = (0+23+29)/3 = 17,33 ms
3. FCFS
Proses | Burst time (ms) |
P1 | 23 |
P2 | 6 |
P3 | 6 |
Gant chart:
Proses | Waiting Time (ms) |
P1 | 0 |
P2 | 23 |
P3 | 29 |
4. SRF
Proses | Arrival Time (ms) | Burst Time (ms) |
P1 | 0 | 8 |
P2 | 3 | 4 |
P3 | 4 | 9 |
P4 | 7 | 5 |
Gant Chart
P1 | P2 | P1 | P4 | P3 |
0 3 7 12 17 26
Proses | Waiting Time (ms) |
P1 | 0+(7-3) = 4 |
P2 | 3-3=0 |
P3 | 17-4=13 |
P4 | 12-7=5 |
AWT = 4+0+13+5/4=5.5 ms
0 komentar:
Posting Komentar