Why do the CFS chase fairness?

Parmenides mobile.parmenides at gmail.com
Tue Sep 20 07:11:41 EDT 2011


Hi,

I have gotten clearer idea of fairness between processes. Thanks for
your explanation with enough patience. :-)

2011/9/20 Mulyadi Santosa <mulyadi.santosa at gmail.com>:
> Hi .....
>
> I am reaching my virtual limit here, so beg me pardon :)
>
> On Mon, Sep 19, 2011 at 23:26, Parmenides
>> Hmm..., does that mean timeslice weighting introduce unfainess? If we
>> think fairness relies on each task not fetching more timeslice than
>> other tasks, the eaiest way to achieve fairness is to give every task
>> the same timeslice.
>
> At the extreme theoritical side, yes, ....but again that is if all are
> CPU bound.... the complication comes since in reality most processes
> are mixture of CPU and I/O bound...or sometimes I/O bound only.
>
>> Can I understand like this: each task advance its progress tinier than
>> traditional timeslice, which makes C has more chances to be selected
>> to preempt A or B owing to its higher priority? Higer priority makes
>> C's virtual time smaller than A and B.
>>
>
> in non preemptive kernel i.e cooperative scheduling, your above
> suggested idea is the right way to achieve fairness in such situation.
> However, since user space (and now kernel space too) implements
> preemptive, adjusting time slice is not really necessary to make C
> kicks back into run queue.
>
> What the scheduler needs perhaps at this point is good priority
> recalculation is C could run ASAP. If not, even though C is in run
> queue, it still can beat the other processes in the competition of CPU
> time.
>
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
>



More information about the Kernelnewbies mailing list