taskset -c [0,7] ./example ***
通过top看,设置的-c 0, 则在cpu0上运行
转载于:https://www.cnblogs.com/yanghangjunHobot/p/8565780.html