由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 如何强制thread和cpu绑定?
相关主题
一直没有很好理解thread join itself,哪位解惑一下 (转载)how to debug multi-thread program?
Windows Thread API怎么 kill 一个 thread 啊
关于valgrind 的一个问题关于thread的stack
重复利用threads的问题[合集] 为什么多个线程生成的随机数是一样的?
pthread and C++why do we need to map user threads to kernel threads?
Linux thread和NPTL thread什么关系? (转载)how many ways in C++ to release a mutex?
有专门介绍multithreading编程的书吗pthread on windows?
多线程 编程,process 和 thread 的一些问题。C++11 native thread问题
相关话题的讨论汇总
话题: cpu话题: thread话题: 绑定话题: 调度
进入Programming版参与讨论
1 (共1页)
f*******y
发帖数: 988
1
我知道linux下面对process可以设定CPU mask从而达到绑定在某几个CPU上面的
但是没有找到对于thread的类似功能;我希望有thread group 1可以占某2个CPU,不要
调度到别的CPU上面去, related的data太多,怕cache performance下降
其他的几百个thread是group 2,可以分享剩下的2个CPU,随便怎么调度都可以
希望达人指点一下,有什么system call么 ( linux , PTHREAD, G++ )
h****e
发帖数: 2125
2
google "CPU affinity"

【在 f*******y 的大作中提到】
: 我知道linux下面对process可以设定CPU mask从而达到绑定在某几个CPU上面的
: 但是没有找到对于thread的类似功能;我希望有thread group 1可以占某2个CPU,不要
: 调度到别的CPU上面去, related的data太多,怕cache performance下降
: 其他的几百个thread是group 2,可以分享剩下的2个CPU,随便怎么调度都可以
: 希望达人指点一下,有什么system call么 ( linux , PTHREAD, G++ )

f*******y
发帖数: 988
3
看了,都是说process的
问题是这玩意对thread来说存在么

【在 h****e 的大作中提到】
: google "CPU affinity"
z***e
发帖数: 5393
4
SetThreadAffinity(...)
1 (共1页)
进入Programming版参与讨论
相关主题
C++11 native thread问题pthread and C++
请问,什么叫Understanding of multi-threaded development environments?Linux thread和NPTL thread什么关系? (转载)
c++11 std thread类 怎么样,大家用过么有专门介绍multithreading编程的书吗
Node.js 是有 multiple-threading 支持的?多线程 编程,process 和 thread 的一些问题。
一直没有很好理解thread join itself,哪位解惑一下 (转载)how to debug multi-thread program?
Windows Thread API怎么 kill 一个 thread 啊
关于valgrind 的一个问题关于thread的stack
重复利用threads的问题[合集] 为什么多个线程生成的随机数是一样的?
相关话题的讨论汇总
话题: cpu话题: thread话题: 绑定话题: 调度