Look at the below table for example :
Look at the Non-Preemptive SJF table
Suppose if the burst time of process $P_1$ was a very large number compared to $7$, the processes $P_3,P_2$ and $P_4$ have to wait for a large amount of time till $P_1$ frees the CPU.
No book or article that I've read mentions of SJF being a subject to convoy effect?
Why not?
Asked By : Siddharth Thevaril
Answered By : Wandering Logic
I think you're not using the same terminology as the books and articles you're reading. Non-preemptive schedulers suffer from priority inversion, not convoy effects.
Most scheduling disciplines (FIFO, SJF, LJF, Nearest-deadline-first, ...) can be reframed as highest priority first schedulers, where what changes from discipline to discipline is the priorities assigned to the jobs. So first-in-first-out (FIFO) scheduling assigns priorities according to their order of arrival. 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. In non-preemptive shortest-job-first scheduling if a short job arrives after a longer job already starts, then the scheduler will be running the lower priority job instead of the high priority job for a while.
A convoy effect is a different problem where jobs that need many different kinds of service get clumped up together because of decisions you have made elsewhere in the system. It applies to things like schedulers that deal with jobs that have more than one burst (separated by time when those jobs are waiting for i/o, or when jobs are waiting for a lock). For the lock case there's a wikipedia article: http://en.wikipedia.org/wiki/Lock_convoy.
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/35723
Got some wonderful knowledge from this post shift work scheduling program uk. I got some great information from this blog. Your blog is very amazing. I like the way of making your blog. Thanks to you for posting this blog.
ReplyDelete