Shortest Remaining Time First Query

If they are two processes with the following Data, How should the Gantt Chart be?(SRTF scheduling)

Process Arrival Burst P1 0 17 P2 1 16

So will the process P1 be completed first and then P2 will start executing..or P1 will have to wait for 16 milli seconds?


I feel the conflict can be resolved either by choosing the process which came earlier or by the process which has the longest burst. In this case, on choosing either of the approaches, P1 will be completed first.


It's going to choose P1 because at the time P2 didn't exist

P1 AT =0 thus will start first

next step they will be equal but as the processor is working already on p1 it will prefer to keep working on it until interruption or termination

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

上一篇: 多级反馈队列抢先

下一篇: 最短剩余时间第一查询