Re: Linux scheduler (scheduling) questions vs threads

From: Bill Davidsen
Date: Sat Jul 03 2004 - 08:54:12 EST


Chris Siebenmann wrote:
You write:
| Ingo Molnar wrote:
[...]
| > so the normal Linux scheduling policy applies to 'threads' too. [...]
[...]
| On a multi-user machine this may result in undesirable behaviour, since | each thread seems to compete for resources and the machine may get VERY | slow if someone deos something anti-social.

This is nothing unique to threads; the same problem appears if a
program (or a user) uses a bunch of CPU-eating processes. I imagine
that any real solution will have to be per-user 'beancounting' and
limits, which have yet to make it into the Linux kernel.

Actually, yes it is. While students can be warned about the results of fork bombing a system, both in terms of what happens to the system and to their access, it's far less obvious that starting a program which does a lot of threads is equally bad behaviour.

The desirability for per-user scheduling is also shown by the student who build a large project with "-j4" as a make option and "-pipe" as a compile option. Yes, it makes the program complete sooner, and it generally is done with no malice.

Hopefully some form of this will appear in the 2.7 kernel, although past discussions in several places have resulted in more heat than light on the topic.


--
bill davidsen <davidsen@xxxxxxx>
CTO TMR Associates, Inc
Doing interesting things with small computers since 1979
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/