views:

734

answers:

1

This Linux Magazine article http://www.linux-mag.com/id/792 explains the difference in the way threads are implemented in Linux as compared to commercial Unixs such as Solaris. In summary, Linux uses a 1-to-1 mapping of user threads to kernel threads, while Solaris uses a many to many mapping. The article implies that this might give Solaris a performance edge, especially when switching between threads. Before I spend the time to test this, has anyone already done it?

+7  A: 

People used to think that M:N threading was a good idea, but everyone has been moving to 1:1 threading; it has lower overheads and works better in an SMP environment. Solaris moved from M:N threading to 1:1 threading in Solaris 9, I believe. That article you linked to seems to be from 2001, so it's a bit outdated (it's subscriber only, so I couldn't read it).

Brian Campbell
bugmenot.com is you friend for sites like linux-mag.com
Tom
I am not a subscriber to Linux Magazine, and I was able to see the article. Thanks for the Solaris 9 information. Do you have a reference?
bobmcn
@bobmcn I edited my answer and linked to a whitepaper on Solaris 9 threading, that mentions that MxN scheduling is gone and replaced with 1:1 threading.
Brian Campbell