Hi
It seems like confussion is the name of the game for me here. I have a problem with Round Robin, I don't know how it is calculated. I do understand its definition that it has quantime time which is a small unit of time and preemptive which enables the system to switch between the processes. But for calculations take for instance the following question (taken from the net).
5.4 Consider the following set of processes, with the length of the CPU-burst time given in
milliseconds:
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a
nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1)
scheduling.
And the answer is :
FCFS: P1 (0-10) P2 (10-11) P3 (11-13) P4 (13-14) P5 (14-19)
SJF: P2 (0-1) P4 (1-2) P3 (2-4) P5 (4-9) P1 (9-19)
Priority: P2 (0-1) P5 (1-6) P1 (6-16) ) P3 (16-18) P4 (18-19)
RR: P1 (0-1) P2 (1-2) P3 (2-3) P4 (3-4) P5 (4-5)
P1 (5-6) P3 (6-7) P5 (7-8)
P1 (8-9) P5 (9-10)
P1 (10-11) P5 (11-12)
P1 (12-13) P5 (13-14)
P1 (14-15) P1 (15-16) P1 (16-17) P1 (17-18) P1 (18-19)
Focussing on RR I understand that a 1 is added on each process which I think its the quantum time. I understand it in the first row but the problem starts on the second row, how are processes picked.
Please rescue me!!