开发者

How to bind a process to a particular core in freebsd/linux

Is there any way to bind a process / (or a thread) to a particular core in FreeBSD//Linux I googled could not find开发者_如何学Go an answer. But people must be doing it and I am surprised that the answer is not easily available

Thanks for any inputs


From the command line you can use taskset. From within your code you can use sched_setaffinity.

$ man taskset
$ man sched_setaffinity


For FreeBSD you can also consider its following counterparties

$ man cpuset(1)

$ man cpuset(2)

There's a somehow related topic on server fault to check

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜