LATIHAN MANAJEMEN PROSES
1. Hitunglah AWT dari penjadwalan berikut :
A. Priority Scheduling :
Proses | Burst Time (ms) | Prioritas |
P1 | 7 | 3 |
P2 | 2 | 4 |
P3 | 3 | 3 |
P4 | 2 | 1 |
P5 | 10 | 2 |
Gant chart
P2 | P3 | P4 | P1 | P4 |
0 2 12 19 22 24
Proses | Writing Time (ms) |
P1 | 12 |
P2 | 22 |
P3 | 19 |
P4 | 0 |
P5 | 2 |
AWT = 12 + 22 + 19 + 9 / 5 = 12,4 ms
B. FCFS & Round Robin, dengan Q = 3
FCFS (First Come First Served)
Proses | Burst Time (ms) |
P1 | 23 |
P2 | 6 |
P3 | 6 |
Gant Chart
P2 | P3 | P4 |
0 23 29 35
Proses | Writing Time (ms) |
P1 | 0 |
P2 | 23 |
P3 | 29 |
AWT = 0 + 23 + 29 / 3 = 1,33 ms
RR (Round Robin) dengan Q = 3
Proses | Burst Time (ms) |
P1 | 23 |
P2 | 6 |
P3 | 6 |
Gant Chart
P2 | P3 | P4 | P1 | P4 | P2 | P3 | P4 | P1 | P4 | P1 | P4 |
0 3 6 9 12 15 18 21 24 27 30 33 35
Proses | Writing 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
C. SRF (Shortest Remaining First Sceduling)
Proses | Arrival Time | Burst Time (ms) |
P1 | 0 | 8 |
P2 | 3 | 4 |
P3 | 4 | 9 |
P4 | 7 | 5 |
Gant Chart
P2 | P3 | P4 | P1 | P4 |
0 3 7 12 17 26
Proses | Writing Time (ms) |
P1 | 0 + (7-3) = 4 |
P2 | 3 – 3 = 0 |
P3 | 17 – 4 = 13 |
P4 | 12 – 7 = 5 |
Tidak ada komentar:
Posting Komentar