Linux 与 Solaris 上的线程性能
这篇 Linux 杂志文章 http://www.linux-mag.com/id/792 解释了 Linux 中线程实现方式与 Solaris 等商业 Unix 之间的差异。 总之,Linux 使用用户线程到内核线程的一对一映射,而 Solaris 使用多对多映射。 该文章暗示这可能会给 Solaris 带来性能优势,尤其是在线程之间切换时。 在我花时间测试这个之前,有人已经做过了吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
人们过去认为 M:N 线程是个好主意,但大家都在转向 1:1 线程; 它的开销较低,并且在 SMP 环境中工作得更好。 Solaris 在 Solaris 9,我相信。 你链接到的那篇文章似乎是 2001 年的,所以它有点过时了(它只是订阅者,所以我无法阅读它)。
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).