What is Round Robin's behavior when a process comes at the same time that the old process is swapped out? Let's say there are two processes: p1 and p2, their arrival time and service time are 0,2 and 3,1 respectively.  The time quantum is 2s.

After excuting for two seconds, will the processor excute p2 or continue excuting p1?
P1 arrives at time 0 and needs 3 seconds to process. 

P2 arrived at time 2 and needs 1 second to process.

Processing

P1 arrives first and will process 2 second because time quantum is 2s. 1s left. 

After processing P1 (2 seconds later), P2 will arrive.

It will completely process it and then return back to P1. 

1 second later both processes are processed.