Question: Consider the following preemptive priority-scheduling algorithm based on dynamically changing priorities. Larger numbers imply higher priority. Tasks are preempted whenever there is a higher priority

Consider the following preemptive priority-scheduling algorithm based on dynamically changing priorities. Larger numbers imply higher priority. Tasks are preempted whenever there is a higher priority task. When a task is waiting for CPU (in the ready queue, but not running), its priority changes at a rate of a:

P(t) = P0 + a (t - t0)

where t0 is the time at which the task joins the ready queue and P0 is its initial priority, assigned when the task enters the ready queue or is preempted. Similarly, when it is running, the tasks priority changes at a rate b. The parameters a, b and P0 can be used to obtain many different scheduling algorithms.

a. What is the algorithm that results from P0 = 0 and b > a > 0?

b. What is the algorithm that results from P0 = 0 and a < b < 0?

c. Suppose tasks are assigned a priority 0 when they arrive, but they retain their priority when they are preempted. What happens if two tasks arrive at nearly the same time and a > 0 > b?

d. How should we adjust the algorithm to eliminate this pathology?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!