7,780 views
5 votes
5 votes
Consider the following preemptive priority-scheduling algorithm based on dynamically changing priorities. Larger priority numbers imply higher priority. When a process is waiting for the CPU (in the ready queue but not running), its priority changes at a rate X when it is running, its priority changes at a rate Y. All processes are given a priority of 0 when they enter the ready queue. The parameters and can be set to give many different scheduling algorithms. What is the algorithm that results from Y>X>0?

a. LIFO

b. FCFS

c. Round Robin

d. None of the above

2 Answers

Best answer
7 votes
7 votes

It should be FCFS. Although I'[m ASSUMING that -  when question says priority is changing, it implies the change is positive - i.e. priority is increasing.

Consider that a process is running and its priority is increasing at rate of Y . Now another process arrives and waits in a queue at time t0. 

At time t1, priority of process which is running would be (t1-t0) * Y while the one which is waiting would be (t1-t0) * X. 

Since Y > X, running process will always have a higher priority. SO the process in queue continues to wait .

So the best answer would be FCFS.

 

 

 

selected by

Related questions