有什么方法可以将进程/(或线程)绑定(bind)到 FreeBSD//Linux 中的特定内核
我用谷歌搜索找不到答案。但人们一定在做,我很惊讶答案不容易获得
感谢您的任何输入
最佳答案
从命令行你可以使用 taskset
.在您的代码中,您可以使用 sched_setaffinity
.
$ man taskset
$ man sched_setaffinity
关于multicore - 如何将进程绑定(bind)到 freebsd/linux 中的特定内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4661344/