How to know a particular thread is running on which core of the processor? And how can I change the cpu core to execution of particular process in Linux?
and here is the system calls to know how many cores are there in current cpu in linux:
sysconf(_SC_NPROCESSORS_ONLN);