Threads don't scale, processes do - Fibers
Sean Kelly
sean at invisibleduck.org
Sat Aug 30 08:58:40 PDT 2008
Oliver Dathe wrote:
>> I find the concept of userland scheduling and green threads
>> interesting and would work on this with you if you wish.
>
> I'd really like to follow up on this, in collaboration even better!
> Unfortunately I'm very busy until some time in October.
>
> However, feel free to do what you like and I'd enjoy dicussing. Have you
> had any similar plans before?
>
>> Interpreted languages such as Erlang can pause their green threads /
>> green processes easily; not so with natively compiled code. This may
>> be one of the largest issues with scheduling native fibers. You might
>> be able to get around it with enough hacks, though some would have to
>> involve your OS's kernel, I have no doubt.
>
> Yes, preemptive greenthreading would fit into this even better! But its
> no prerequisite, so I chose the collaborative way with Fibers for this.
> Not sure if the preemptive way could get accomplished with help of
> signal handling in a safe way.
Solaris does preemptive greenthreading automatically, so you get it for
free if you use pthreads on that system. It's a pretty cool setup.
Sean
More information about the Digitalmars-d
mailing list