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?
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community
P1 arrives at time 0 and needs 3 seconds to process.
P2 arrived at time 2 and needs 1 second to process.
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.