Help PLZ

david at prometheus.com.au david at prometheus.com.au
Tue Aug 28 19:52:41 EST 2001


Martijn van Oosterhout wrote:

> > i've heard that a) the threading is really broken in NT, which would
> > explain why it's fast, and b) that linux *can* bind tasks to a
> > particular CPU. i might be imagining that, though.

Threading is broken. Full stop. Especially if your favourite programming
language is any of C, C++, or assembler. Use full processes if you want
to write multi-tasking stuff that works. The nice people at Intel and
other hardware companies put hardware memory protection in their chips
so you could write reliable multi-tasking code. Use it.
 
> I don't know about broken, but I heard that NT thread switching is slower
> than linux process switching and that's why they created these new things
> called "strings" (or something like that) which were even lighter weight
> than threads.

"fibres". They are non-pre-emptive threads. The NT programming book i
read recommended not using them for any serious new application. Their
main use is for porting MS-Win 3.1 applications that rely on this broken
sort of behaviour. Since MS-Win 95 and 98 never supported fibres, almost
every application that could have made use of them has either been fixed
properly, or has died.

> As for binding processes, I do beleive there is a patch for that but in the
> general case normal processor affinity is sufficient for 99% of people.
> Binding drivers I'm not sure about, though they were trying to push network
> stack processing onto the CPU of the process that was to receive it in the
> end.

Binding processes to CPUs and network cards is useful for going very
fast on silly networking benchmarks. I'm not so sure there are any
real-world applications for it that you would want to run on normal
desktop or server hardware.

> --
> Martijn van Oosterhout <kleptog at svana.org>
> http://svana.org/kleptog/
> > It would be nice if someone came up with a certification system that
> > actually separated those who can barely regurgitate what they crammed over
> > the last few weeks from those who command secret ninja networking powers.




More information about the linux mailing list