Question #150: Priority Scheduling is an algorithm where scheduler assigns priority to the processes, and the highest priority process is the next one to get CPU attention. Priority scheduling can be preemptive (such that if a higher priority process enters the queue while a lower priority process is running, the lower priority process gets preempted) or it can be non-preemptive.
Which of the following is true?
Options:
- Starvation of a low priority process may occur if preemption is used but will not happen when processes are non-preemptive.
- Starvation of a low priority process may occur if non preemption is used but will not happen when processes are preemptive.
- If static priorities are assigned (meaning, once assigned, priority of a process will not be changed) then starvation can happen with or without preemption. Starvation can be avoided if priorities are dynamically adjusted.
- Priority scheduling will always suffer from starvation.
Solution: 3rd option is the correct one. Priority scheduling can prevent starvation by using aging which dynamically changes process’s priority.