I'm already almost convinced on the NPT way of doing threading.
But still: the timeslice is per process (and kernel thread).
You still have other processes running.
With 1:1 on "hitting" a blocking condition the kernel will
switch to a different beast (yes, a thread gets a bonus for
using the same MM and the same cpu).
But on M:N the "user process" makes some more progress in its
timeslice (does it get even punished for eating up its
timeslice?) I would think that it tends to cause less context
switches but tends to do more syscalls :-(
I already had a closer look at NGPT before reading Ulrich's
comments on the phil-list and on his website. I already thought
"puh, that's a complicated beast", and as I saw the
fcntl(GETFL);fcntl(O_NONBLOCK);write();fcntl(oldflags); thingy..
Well, with an O(1) scheduler, faster thread creation and exit
NPT has good chances to perform faster.
Now I'm just curious about the argument about context switch
times. Is Linux really that much faster than Solaris, Irix etc.?
Do you have numbers (or a hint) on comparable (ideal: identical)
hardware? Is LMbench a good starting point?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/