Fiber is better than go's goroutine?
Brad Anderson via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 27 15:59:49 PDT 2014
On Monday, 27 October 2014 at 21:43:47 UTC, Sean Kelly wrote:
> On Monday, 27 October 2014 at 20:54:38 UTC, Brad Anderson wrote:
>>
>> Just out of curiosity, what's the goal of MultiScheduler? Is
>> it intended to be an M:N scheduler?
>
> Yep. Every logical thread is a Fiber executed in a round-robin
> manner by a pool of kernel threads. Pooled threads are spun up
> on demand (to a set upper limit) and terminate when there are
> no fibers waiting to execute. It should make for a good
> "millions of threads" baseline scheduler.
Again, just out of curiosity, have you ever looked at Windows
user-mode scheduling or Google's user-level threads[1][2] (under
200ns context-switch times)? I first heard of them from a post on
the Rust forum[3] which suggested M:N may be a dead end. I
believe Rust decided to try to make sure either 1:1 or M:N could
be used but I don't actively follow Rust's development so I may
be mistaken.
M:N is certainly a step up from our current situation in any case.
1. Talk: https://www.youtube.com/watch?v=KXuZi9aeGTw
2. Slides:
http://www.linuxplumbersconf.org/2013/ocw//system/presentations/1653/original/LPC%20-%20User%20Threading.pdf
3.
https://mail.mozilla.org/pipermail/rust-dev/2013-November/006550.html
More information about the Digitalmars-d
mailing list