0% found this document useful (0 votes)
43 views3 pages

Lesson7 Os

This document provides an example of calculating average waiting time using round robin CPU scheduling. It includes a diagram showing the burst times of 7 processes (P1-P7) over multiple time quantums of 5 units each. It then shows the solutions and calculations for determining the waiting time of each individual process. Finally, it sums the total waiting times and divides by the number of processes to determine the average waiting time is 152.71 milliseconds.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views3 pages

Lesson7 Os

This document provides an example of calculating average waiting time using round robin CPU scheduling. It includes a diagram showing the burst times of 7 processes (P1-P7) over multiple time quantums of 5 units each. It then shows the solutions and calculations for determining the waiting time of each individual process. Finally, it sums the total waiting times and divides by the number of processes to determine the average waiting time is 152.71 milliseconds.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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