Convoy effect : SJF


  • 0
    M

    We know that FCFS suffers from the convoy effect but Question : Does SJF (Shortest Job First) suffer from the convoy effect and if yes then how ?


  • 3
    B

    There are 2 version of SJF

    1. Shortest Job first (SJF) which is Non preemptive mode , This will suffer from convoy effect as if the very first process which came is Ready state is having a large burst time . So it will be scheduled on CPU as it is the only process. Then soon after other processes came which have small burst time but 1st process will keep on executing as SJF is Non Preemptive Mode. This will affect the Avg. waiting time of the processes which will led to Convoy Effect.

    2. Shortest Remaining Time First Preemptive version of SJF. This will never suffer from Convoy effect.


  • 0
    M

    @maheshtolani
    YES.

    explanation : criteria in SJF is (arrival time + burst time) , so a job with shorter burst time wont arrive then we cant take it and in this case if it is non preemptive then SJF will also suffer from the convoy effect , you can take an example and check it


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.