9,867 views
5 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 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
Position:
Show:

Related questions

4 4 votes
1 1 answer
302
302 views
GO Classes asked Jul 18
302 views
Which of the following statements are correct?The CPU dispatcher determines the policy for which process should be run and when. With cooperative multitasking, it is poss...
3 3 votes
4 4 answers
1.5k
1.5k views
delxbydelt asked Mar 15, 2024
1,544 views
Consider a uniprocessor system with n processes in the ready queue. Round robin scheduling with time quantum x is used for process scheduling. Assume each process require...
2 2 votes
0 0 answers
599
599 views
Raviwarlord asked Nov 18, 2022
599 views
Why do we say that Longest Remaining time first is a starvation free algorithm?Let me walk through my though process, same as LRTF is Shortest Remaining time first and it...
0 0 votes
1 1 answer
2.7k
2.7k views
anupamsworld asked Jun 6, 2022
2,683 views
Lets consider one situation where,OS is scheduling processes(P1,P2,P3...Pn) with Round Robin method and current running process is P1 and next scheduled process in queue ...