Anyone have any modern resources on why green threads are considered "better" than OS threads? Presumably the answer has to be deeper than just allocating stack? I would expect that the OS scheduler is generally better at this than the VM (if not why haven't we fixed this?)
This is focused on the cost of context switching, which is entirely costs that live at the scheduler, right? Is there a reason we can't just improve OS/CPU schedulers in the same way?
-
-
I get that it's faster, but I'm unclear on *why* it's faster, and why we aren't able to make OS threads as fast
-
My understanding is that system threads offer a lot of promises and features that you might not need, but are very expensive to implement. Green threads can implement only the features you need while being much more efficient.
- 1 more reply
New conversation -
-
-
I don’t know the answer myself. I think that something like Windows UMS or that switchto patch may be the best approach.
-
Fair enough. Thanks for the link to those slides at least. <3
End of conversation
New conversation -
-
-
The cost of switching OS contexts (kerneland / userland) is not only code, it's CPU registers which will trash the Instruction cache and data cache, move the MMU boundaries, etc. See http://wiki.osdev.org/Context_Switching … and http://wiki.osdev.org/Multitasking_Systems …
-
That isn’t the problem here. switchto does a CPU level context switch as well, and look at the graph in the LPC presentation.
End of conversation
New conversation -
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.