5
$\begingroup$

In books, I have read that FCFS suffers from convoy effect. I think that even SJF and priority(both preemptive and non preemptive) can suffer from convoy effect.

In SJF, if a process with large burst time arrives first then no other process can preempt it causing convoy effect.

In preemptive and non preemptive priority, if all processes arrive at time 0 and if a high priority process has very large burst time, it can lead to convoy effect as no other process can preempt this process because they all have lesser priority.

Am I correct?

$\endgroup$

2 Answers 2

0
$\begingroup$

Cant comment but here is some clarification. Using the preemptive sjf, a process with a smaller burst can remove a process with a bigger burst that is currently occupying the cpu, this eliminates the convoy effect but can create a starvation effect whereby shorter procesess keep cutting off long and old processes. A priority based sheduling is efficient if it keeps in account how long a process has been waiting in the wait-queue and also its cpu-burst, a good example is the HRRN method, where the priority of a process is calculated taking in account the afore mentioned criterias. So if the priority

$\endgroup$
1
  • 5
    $\begingroup$ Welcome to CS.SE! It seems like your answer was cut off. Would you like to edit your answer to finish your thought? $\endgroup$
    – D.W.
    Oct 10, 2017 at 15:11
0
$\begingroup$

Yes, in SJF and non-preemptive Priority algorithms, convoy effect can occur but only for a relatively small instant (i.e. the burst time of the first process). After that, there is no possibility of convoy effect. So, convoy effect doesn't affect the performance of these algorithms to a great extent. But, in FCFS, convoy effect can occur any number of times and hence, affects the performance greatly. That is why FCFS is said to be "suffering" from convoy effect whereas others are not. Also, in any preemptive algorithm (like SRTF or preemptive Priority algoritm), there is absolutely no chance of convoy effect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.