in Operating System edited by
1,578 views
5 votes
5 votes
Which of the following CPU scheduling leads to convey effect?
i) SJF
ii) Priority
iii) FCFS

the answer is all .

is it true ?

Also , i read somewhere .. that for SJF convoy effect is usually confused with priority inversion .

kindly clear this doubt .
in Operating System edited by
1.6k views

2 Comments

I dont think answer will be all. Answer should be SJF only. @Bikram Sir can you please verify?
0
0

Yes.. all three CPU scheduling algo leads to convey effect . 

All these 3 cpu scheduling algo are known as highest priority first schedulers .. so all 3 cases convoy effect can happen.

1
1

1 Answer

5 votes
5 votes
Best answer

Convoy effect is like you are going through road by car and suddenly you have to stop and wait for few minutes because minister have to pass through that road .  This is convoy effect ..where a high burst time cpu bound process is executing and low burst time I/O bound process waiting in ready queue ..

all these given scheduling algo - FCFS, Priority and SJF are Highest priority First Scheduling algorithm  means high priority process execute first then low priority process can execute.. so low priority process is starving .

FCFS is non preemptive, FCFS  assigns priorities according to their order of arrival or arrival time.  Non preemptive Shortest-job-first (SJF) assigns priorities according to the burst time. In preemptive shortest-job-first the scheduler is always running the job with the highest priority. hence in all 3 cases convoy effect possible.

selected by

4 Comments

By that logic every algorithm would have convoy effect. Won't it? Because all the algorithms prioritize a process based on one or other criteria like arrival time, priority or  burst time.
0
0
Round Robin don't have convoy effect.

Convoy effect mainly deals with FCFS.
0
0
But convoy effect results in unnecessary increase in average waiting time which isn't a case in SJF. How could SJF lead to convoy effect?

As far as I remember SJF is literally the solution to avoid the convoy effect.
0
0

In SJF, if a process with large burst time arrives first then no other process can preempt it causing convoy effect. see the Non preemptive example https://stackoverflow.com/questions/27679120/can-shortest-job-first-scheduling-be-subject-to-convoy-effect

In 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.

1
1