Previous | Next --- Slide 17 of 79
Back to Lecture Thumbnails
bAAn

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.