RE: [ANN] Userspace M-on-N threading model implementation. Alpha release.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Evgeniy Polyakov <johnpol@...>, Chris Friesen <cfriesen@...>
Cc: <linux-kernel@...>, <libc-hacker@...>, <libc-alpha@...>
Date: Tuesday, January 30, 2007 - 5:16 pm

Evgeniy Polyakov wrote:

M:N threading is an unnecessary performance hack that's needed by people
who are living in a C or C++ exile away from some language that has
lexical closures, generators or first-class continuations. Not having
these niceties, they resort to emulating them with threads. The proper
thing to do is to rewrite the code to use state machines which can be
driven by any available thread. Or else, write yourself a
source-to-source transformer that will give C the lexical closure,
generator, or continuation features that you need to express the
solution that way.

There is no need to retain any vestiges of a user space threading
implementation when you have the real thing.

Programs which appear to benefit from that model are badly optimized or
badly designed. A smartly written program uses an available thread to do
as much work as possible, until that thread happens to block or its time
slice burns up.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
RE: [ANN] Userspace M-on-N threading model implementation. A..., Kaz Kylheku, (Tue Jan 30, 5:16 pm)