Attempt #2: The Priority Boost
In this lesson, you will learn how to handle the problem of starvation that was discussed in the previous lesson by boosting the priority of all the jobs in the system.
We'll cover the following...
Preventing starvation
Let’s try to change the rules and see if we can avoid the problem of starvation. What could we do in order to guarantee that CPU-bound jobs will make some progress (even if it is not much?).
The simple idea here is to periodically boost the priority of all the jobs in the system. There are many ways to achieve this, but let’s just do something simple: throw them all in the topmost queue; hence, a new rule:
- Rule 5: After some time period S, move all the jobs in the system to the topmost
Access this course and 1400+ top-rated courses and projects.