In a parallel programming library, we pin each process to a different core. However, we overlooked the fact that a given core might already be busy and have another CPU-intensive process already pinned to it. Is it possible to ask the Linux (and OS X) kernel to list all the cores which don't have a process pinned? I know how to pin a process to a core (sched_setaffinity on Linux). But, in a multi-user system, I'd like the kernel to tell me if it is a good idea to pin to that core. Or, even better, let the kernel decide to which core this process should be pinned to. Thanks!
Asked
Active
Viewed 183 times
0
htop
can show which core is busy, and it remains the same one for several seconds. Do you have any measurements that indicates that it can be done better? – Ole Tange Nov 30 '17 at 08:51