Question A scheduler attempts to share the CPU between multiple processes. Two processes, P1 and P2, are running. P1 does many I/O operation, while P2 does very few.
Explain what happens if a simple ‘round robin’ pre-emptive scheduling algorithm is used to schedule P1 and P2.
My Attempt From my understanding, a scheduler is said to be pre-emptive when it has the ability to be invoked by an interrupt and move a process from running state to another and then moving another process to the running state. Round-robin means that each process, P1 and P2, would get an equal time with the CPU but if P1 is performing many I/O operations while P2 performs fewer, wouldn't P1 get more time on with the CPU as it has many more operations? If each Process was given for example 1 second, if P1 had to perform 50 I/O operations (each taking 1 second, for simplicity) while P2 had to perform 3 I/O operations, would I be correct in assuming that the order would go: P1,P2,P1,P2,P1,P2,P1,P1 (continuing with P1 till the operations are complete).
That is my understanding hopefully some of you guys can provide more insight. Thank You.