分配一个线程特定的CPU核心 [英] Assigning a thread to specific CPU core
问题描述
AFAIK,有可能给一个线程分配给在Linux中CPU核心。 (见<一href=\"http://stackoverflow.com/questions/1854709/can-i-programmatically-pick-and-choose-which-core-of-a-multi-core-cpu-my-thread-s\">this).不过,我的问题是使用我能实现这个功能的推动,如果有可能,那么如何?请,也没有这个操作系统可以决定哪些是对我好,但是假设我想控制这个行为在我的设计。
AFAIK, it is possible to assign a thread to a CPU core in Linux. (see this). But, my question is can I achieve this functionality using boost and if it is possible, then how? Please, also not that OS can decide which is better for me, but assume that I want to control this behavior in my design.
推荐答案
升压,就是要一个的跨平台库的,而你挂点朝问题上的 OS具体实施这在我的知识是做你所要求的唯一途径。
Boost is meant to be a cross platform library while the question you linked to points toward a OS specific implementation which to my knowledge is the only way to do what you are asking.
这篇关于分配一个线程特定的CPU核心的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!