Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

AICT004-4-2-OS Operating Systems Process Control Management

Tutorial 6
RR-Round Robin

Answer these questions

Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

Process CPU burst time in milliseconds


P1 10
P2 9
P3 12
P4 11
P5 15

Note: Time slice: 3 ms

a) Draw a Gantt chart illustrating the execution of these processes using RR (Round Robin )
P1 P2 P3 P4 P5 P1 P2 P3 P4 P5 P1 P2 P3 P4 P5 P1 P3 P4 P5 P5

0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 46 49 51 54 57
45

b) What is the average waiting time for these processes?


WT(P1) = 0+12+12+12 = 36
WT(P2) = 3+12+12 = 27
WT(P3) = 6 +12+12+7 = 37
WT(P4) = 9+12+12+7 = 40
WT(P5) = 12+12+12+6 = 42
WT(average) = 182 / 5 = 36.4 m.s

Diploma Asia Pacific University of Technology & Innovation Page 1 of 1


AICT004-4-2-OS Operating Systems Process Control Management

c) What is the average turnaround time for these processes?

TT(P1) = 36+10 = 46
TT(P2) = 27+9 = 36
TT(P3) = 37+12 = 49
TT(P4) = 40+11 = 51
TT(P5) = 42+15 =57

TT(average) = 239 / 5 = 47.8m.s

Diploma Asia Pacific University of Technology & Innovation Page 1 of 1

You might also like