When using pthreads, what is responsible for scheduling each thread to a particular core? Specifically, how do we know/control whether 8 created threads use all 8 cores available in a CPU?
bpr
@bAAn, By default, the OS is responsible for scheduling. You can use APIs, such as pthread_setaffinity_np() to influence the scheduling decisions.
When using pthreads, what is responsible for scheduling each thread to a particular core? Specifically, how do we know/control whether 8 created threads use all 8 cores available in a CPU?
@bAAn, By default, the OS is responsible for scheduling. You can use APIs, such as pthread_setaffinity_np() to influence the scheduling decisions.