Let us suppose a scenario where we are given three processes :-
P1 -> (CPU burst = 3ms , arrival time = 0ms) ,
P2 -> (CPU burst = 4ms , arrival time = 0ms), and
P3 -> (CPU burst = 5ms , arrival time = 1.5ms)
Now I need to schedule these processes by round robin scheduling with time quantum = 2ms. Also it is given that I/O operation for each process takes 0.5ms .
So now if P1 gets blocked for an I/O request after 1ms , Will the CPU start executing next process from the ready queue or it will wait till P1 returns from I/O wait as the time quanta is for 2ms and it can still execute for 0.5ms more ?
Also when P3 will arrive at 1.5ms and assuming that CPU has started execution the next process when P1 got blocked due to I/O and now after 0.5ms of I/O operation completion P1 has come to ready queue .....Which among P1 and P3 will be placed first in the ready queue ?