News for hackers. Stuff that matters.
Re:Linux Namespaces and Go Don't Mix by _ph_ on Friday June 02, 2017 @02:04PM (#14472053)
As far as I know, Solaris threads are actually M:N threads on the system level. M:N threads are extremely efficient. A "native" thread is a heavyweight construct - e.g. by the stack space allocation. So this puts a limit on how many threads you can spawn in a program. For many tasks, this would force you to roll out your own M:N mapping system yourself. Doing it on the language level usually yields the better results.

Due to the implicit M:N mapping, Go goroutines are extremely cheap. This allows you to spawn as many, as your algorithm naturally requires. The Go runtime will automatically map them to native threads - typically one per avaliable CPU. As a consequence, a Go program that heavily uses goroutines has a pretty clean code and scales without much overhead across a large variation of number of CPU cores.

Re:Linux Namespaces and Go Don't Mix by dap on Friday June 02, 2017 @02:53PM (#14472426)
> As far as I know, Solaris threads are actually M:N threads on the system level.

Not for a long time, for all the reasons the parent mentioned (and then some).

Re:Linux Namespaces and Go Don't Mix by pjmlp on Saturday June 03, 2017 @08:57AM (#14476184)
Only until Solaris 8, Solaris 9 dropped support for the LWP model.