Professional Documents
Culture Documents
RR
RR
processes requesting the processor. It is designed especially for time-sharing systems. It run process for one time quantum or time slice, then move to back of queue. Each process gets equal share of the CPU. The performance of the RR algorithm depends heavily on the size of the time quantum.
Context-Switch: Changing the processor from running one task (or process) to another. Implies changing memory. Processor-Sharing: Use of a small quantum such that each process runs frequently at speed 1/n.
P1 P2 P3
24 3 3
0 0 0
0 4 8
30 7 10
6 4 7
30 7 10
Average Waiting Time: (6+4+7) / 3 = 5.66 milliseconds Average Turnaround Time: (30+7+10) / 3 = 15.67 milliseconds
P1
0 4
P2
7
P3
10
P1
14
P1
18
P1
22
P1
26
P1
30
Turnaround time also depends on the size of the time quantum. The average turnaround time can be improved if most processes finish their next CPU burst in a single time quantum.