Yes, a process with a large number of threads will receive more processor time than its competitors. A well-known case is maven compilation, maven uses many threads that use CPU intensively, clogging the system.
But the current linux scheduler does not only consider tasks; it also considers management groups in the cpu cgu hierarchy. Thus, the processor time is divided between control groups, and then in each control group the processor time is divided between tasks.
Starting from 2.6.38, Linux automatically places taks in different cpu groups based on their session identifiers. This means that, for example, the individual tabs in the console / dwarf terminal receive their own control group. So, now your maven build is beautifully isolated and no longer starts the system. See kernelnewbies and lwn.net descriptions .
Before 2.6.38 got into most systems, Lennart Poettering showed how to do it manually in a shell script on this LKML post .
In fact, I have a system in which I run Eclipse and maven compilations, as well as switching from pre-2.6.38 to pre-2.6.38 + binding to the Lennart group (on which I put /etc/bashrc and on my splash screen Eclipse script) was just perfect. Maven no longer starts the system (you did not know that maven is being compiled if it is not for the processor load monitor), and Eclipse now just starts itself and not the rest of the system (I agree with Eclipse). Now I just need to update the kernel to a better record on a dirty page, and this system will work to work.
ninjalj
source share