1
votes

We know that priority scheduling can be pre-emptive or non-preemptive. Which among these two will have least average waiting time in general?? Will their performance change depending upon the test case??

1
In my opinion the whole scheduling thing in desktop and mobile Operating Systems is arranged so that end user's subjectively perceived waiting time is smallest. As @shekhar-suman suggests, while the non-preemptive scheduling can give the most of CPU execution quantum to 1 process in the least time, the end user's waiting time experience may be totally different. What are you trying to find out (your follow-up actions) with your answer?xmojmr
Waiting time for what? Any process that requires I/O performance other than 'abysmally bad' will run better on a premeptive scheduler.Martin James

1 Answers

1
votes

In general,non-preemptive priority scheduling would have least average waiting time because no other processes with higher priority would be interfering in the execution of other lower priority process while the execution in its time bound!

Say,Process B is runing in its own time bound,so no other process would be interfering in between and hence the process would finish by scheduled time! Had it been preemptive priority scheduling,the process might have always swept off by some regular high priority process and thereby it'd not have got proper execution time and hence,it'd result in waiting for its own turn!

next,this is only a generality and hence,the performance is not governed by a particular formula and SO the performance will depend upon the test cases. But,the concept that priority scheduling would perform better if it is non-preemptive,else,the sweeping away of other process might result to long waiting and in-efficiency!

BUT, I'D LIKE TO MAKE YOU AWARE THAT NO SUCH PURE CONCEPT IS USED IN ACTUAL IMPLEMENTATION, AND THERE IS WHOLE HYBRID CONCEPT IMPLEMENTED IN EVEN PREEMPTIVE PRIORITY SCHEDULING,LIKE TIMELY CHECKING FOR LAST EXECUTION TIME FOR EACH PROCESS,ETC. SO THAT LOWER PRIORITY PROCESS ARE NOT SWEPT AWAY!