1,946 views
2 votes
2 votes

Consider the following preemptive priority scheduling algorithms based on dynamically changing priorities. Large priority numbers imply higher priority. When the process is waiting for the CPU in ready queue, its priority changes at a rate ‘α’; when its running, its priority changes at a rate ‘β’. All processes are given a priority, when they enter the ready queue. Which one of the CPU scheduling algorithm results from α > β > 0 ?

  • Round Robin Algorithm
  • Shortest Job First Algorithm
  • First Come First Serve Algorithm
  • Last-In-First-Out

1 Answer

6 votes
6 votes

i think round robin should be answer.

if u consider a case where there are 3 processes and all have same priority and let that priority be x

Let alpha be 'a' and beta be 'b'

assume P1 will be executed first and in case of equal priority lower index process will be executed first

Process t=0 t=1 t=2 t=3 t=4 t=5
P1 x x+b x+b+a x+b+a+a x+b+a+a+b x+b+a+a+b+a
P2 x x+a x+a+b x+a+b+a x+b+a+a+a x+b+a+a+a+b
P3 x x+a x+a+a x+a+a+b x+a+a+b+a x+a+a+b+a+a

Now from above table I have bold the priority which is higher at a particular time

From the above table we also found that the processes are getting executed in RR fashion

Also if we go optionwise C) and D) will never be the answer becoz they are not preemptive scheduling algo

Also when a process is getting executed it's running time gonna decrease. So we should keep executing that process. But according to questing we are increasing the priority of running process by 'b' and ready process by 'a'. Also a>b, so after some time priority of one of the ready process will become greater than running process, as a result even though the running process has shorter remaining time it will get preempted

Related questions

528
views
1 answers
1 votes
574
views
0 answers
0 votes
Sunnidhya Roy asked Dec 27, 2022
574 views
Q: Consider a system having 22 resources of same type. These resources are shared by 4 processes P,Q,R and S having peak demands of 3, 6, a and b. How many ... a-1 or b-1 will become -1 which will impact the inequality. So is this valid?
1.1k
views
1 answers
0 votes
viral8702 asked Oct 12, 2022
1,050 views
When a process create a child, which of the following is/are correct possibility/situation?A) Parent process can execute parallely with children.B) Parent ... process.D) Child process can only loaded with program other than parent program.
612
views
1 answers
3 votes
viral8702 asked Oct 12, 2022
612 views
Consider a system using many-to-one pure user-level thread model in which Kernel is not aware of any user-level thread. Which of the following situations/states is/are ... .D)P is in ready state and a thread of P is in running state..