CFS question ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi i'm reading Linux Kernel Development 3rd edition and i'm at the chapter where it explains CFS. Generally i got it how it works but i have some questions about details ?

In the book on pages 48-49 it explains the algorithm how it works. In the book it says that :

"Each process runs for a timeslice proportional to its weight divided by the total weight of all runnable threads". The algorithm sets a targeted latency and it shares that process time among the processes according to their priorities. That is clear , but what is not clear is the example at the same paragraph :

He says if we have 2 processes and have 20ms to share between them each will run 10 ms "Regardless of their priority". Doesnt that explanation conflicts with one above ?

Also another example the author gives is not very clear again:

At the end of the page 49 he gives 2 examples :

The latency is 20ms , there are 2 processes 0 and 5 (nice valued) and each have 15 and 5 ms.
The second example is 2 processes at nice values 10 and 15 and they got again 15 and 5 ms.

Can someone explain me the math above , i couldnt explain myself how that process time is divided among those processes.

Thanks in advance ....



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux