Gantt Chart Round Robin Scheduling for Process arriving at different Time

What will be the gantt chart for round robin scheduling with time quantum ?

Click here for, Process Details

Process Arrival Time Burst Time
P1 0 3
P2 1 3
P3 2 3

Time quantum : 1 units

According to me, following should be the gantt chart. Please verify.

Gantt Chart Image

Doubt :

  • What happens if P1 ( scheduled) and P2 (new Process) arrives at the same Time T. Which of these will be scheduled next ?

    eg. P1 is scheduled from Time T0 to T1. P2 arrives at Time T1. Now at Time T1 both P1 and P2 is present to be scheduled. Which one will execute next ?

  • I read that Process is always inserted at the end of Waiting Queue ?

  • According to these points what should be the correct answer ?

    Please help me in understanding the Algorithm.

    Thanks


    Following gantt chart depicts the process to be allocated to CPU at each time instant.

    Gantt Chart

    It may be seen that at time instant 1, two processes are available P1 (just allocated to CPU but with remaining burst time) and P2 (just arrived). P2 will be added to the ready queue followed by P1 at the tail. Same explanation holds whenever there is a conflict giving preference to newly arrived process to be added to tail followed by process which has been just allocated to CPU with remaining burst time.

    链接地址: http://www.djcxy.com/p/84868.html

    上一篇: 循环调度,具有到达时间和优先级

    下一篇: 甘特图循环调度程序到达不同的时间