You are on page 1of 3

TUBIO, JESUSA KIM A.

1ST YEAR –
BSIT

LESSON 7 ROUND ROBIN

Instructions:
Compute the Average Waiting Time Using Round Robin CPU Scheduling.

DIAGRAM SOLUTION
P1 P2 P3 P4 P5 P6 P7 P1 P2 P3 P4 P5 P6 P7 P1 P2 P3 P4 P6 P7
0 8 16 24 32 40 48 56 64 72 80 88 96 104 11 120 128 13 144 152 160
2 6
P1 P2 P3 P4 P6 P7 P2 P6 P7 P6 P7 P7 P7 P7 P7
162 170 177 180 188 196 198 206 214 222 230 238 246 254 260

PROCESS BURST TIME


P1 29-5 = 24-5 = 19-5 = 14-5 = 9-5 = 4 – 4 = 0

P2 8- 5 = 3 – 3 = 0

P3 36 – 5 = 31 5 =26 – 5 = 21 – 5 16 – 5 = 11 -5 = 6 – 5 = 1 – 1 = 0

TI 5
P1 Solution P4 Solution P7 Solution
(64 – 8) 56 (88 – 32) 56 (122 – 56) 56
(120 – 64) 56 (144 – 88) 56 (160 – 122) 48
(162 – 120) 42 (180 – 144) 36 (196 – 160) 36
TOTAL: 154 TOTAL: 148 (214 – 196) 18
(230 – 214) 16
(238 – 230) 8
P2 Solution
(246 – 238) 8
(72 – 16) 56
(254 – 246) 8
(128 – 72) 56 P5 Solution (260 – 254) 4
(170 – 128) 42 (96 – 40) 56 TOTAL: 202
(198 – 170) 28 TOTAL: 56
TOTAL: 182 AWT Solution
P1 154
P3 Solution P2 182
P6 Solution P3 153
(80 – 24) 56
(104 – 48) 56 P4 148
(136 – 80) 56
(152 – 104) 48 P5 56
(177 – 136) 41
(188 – 152) 36 P6 174
TOTAL: 153
(206 – 188) 18 P7 202
(222– 206) 16 SUM / DIV 1069 / 7
ANSWER: TOTAL: 174 AWT 152.71 ms
152.71 ms or millisecond
Example Program to Compute Average Waiting Time Using Round Robin

You might also like