but are they OS threads?
-
-
Replying to @tweets_so_fresh
Yes, and that’s fine. Linux scales quite well to tons of OS threads.
1 reply 1 retweet 0 likes -
Replying to @pcwalton
right. iiuc, it's really about how much memory you have to keep adding threads vs a cheaper things like a green thread/goroutine due to the difference in stack sizes.
1 reply 0 retweets 4 likes -
Replying to @tweets_so_fresh @pcwalton
at any rate, i think that's why i really like the cheap threading model + scheduler. it lets you get away with modeling lots of independent state without having to worry about memory pressure as much.
1 reply 0 retweets 3 likes -
Replying to @tweets_so_fresh
Stack sizes and green thread/OS thread are orthogonal concerns. You could have OS threads with very small stacks too. Small stacks are a property of GC, not of the threading model.
2 replies 0 retweets 7 likes -
Replying to @pcwalton
is it realistic to have OS threads with stack sizes as small as goroutines, which i think start at somewhere like 2-4KB?
1 reply 0 retweets 1 like -
Replying to @tweets_so_fresh
Yes, if you had a GC. The kernel stack size is 8kB, which is pretty small. Add 2kB for the userland size and you’re at 10kB. I don’t think the difference between 2kB and 10kB per thread matters for most apps, which often have to grow that size anyway.
5 replies 1 retweet 7 likes -
Replying to @pcwalton @tweets_so_fresh
Funny how few people have ever configured and/or measured this
1 reply 0 retweets 2 likes -
Replying to @bascule @tweets_so_fresh
Measurement is sorely lacking here. When we measured the performance of green threads in Rust, the results were not what we expected! 1:1 threads were surprisingly fast.
1 reply 1 retweet 7 likes -
what, in your opinion, is the best argument you've heard for an M:N scheduler?
3 replies 0 retweets 0 likes
Context switching can be faster when you have a custom scheduler. See performance numbers in https://blog.linuxplumbersconf.org/2013/ocw/system/presentations/1653/original/LPC%20-%20User%20Threading.pdf … Though it’s important to realize that this benefit doesn’t need M:N per se—Windows UMS gives you 1:1 with the benefits of M:N.
-
-
UMS is really clever. Tbh you could do lots of cool stuff with the primitives without needing a user space scheduler
0 replies 0 retweets 2 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.