I am learning operating systems. I have a doubt. For example if scheduling policy for some set of process(set 1) is SCHED_RR and scheduling policy for some other set of processes(set 2) is SCHED_FIFO .

Now when kernel has to pick some process from these 2 sets, which scheduling policy does Linux uses?

Is it possible to change that policy? If so how to do that?

1 Answer 1


man sched

Conceptually, the scheduler maintains a list of runnable threads for each possible sched_priority value. In order to determine which thread runs next, the scheduler looks for the nonempty list with the highest static priority and selects the thread at the head of this list.

A thread's scheduling policy determines where it will be inserted into the list of threads with equal static priority and how it will move inside this list.

although there is one more real-time policy, where the priority is not (at all?) significant

In order to fulfil the guarantees that are made when a thread is admit‐ ted to the SCHED_DEADLINE policy, SCHED_DEADLINE threads are the high‐ est priority (user controllable) threads in the system; if any SCHED_DEADLINE thread is runnable, it will preempt any thread scheduled under one of the other policies.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .