Linux与Solaris上的线程性能 [英] thread performance on Linux vs. Solaris

查看:65
本文介绍了Linux与Solaris上的线程性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此Linux杂志文章 http://www.linux-mag.com/id/792解释了与商用Unix(如Solaris)相比,Linux中实现线程的方式有所不同.总之,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?

推荐答案

人们以前认为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).

这篇关于Linux与Solaris上的线程性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆