force scheduler to allocate thread to specific processor
问题 Consider a case where we have multiple processor/cores and two threads. Is it possible to force the linux scheduler to always schedule the specific thread(both) to a specific processor at every instance of its execution. Is setting processor affinity to the threads, while creation, sufficient for this purpose 回答1: If you look at the man page for taskset you can see the following statement: The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs.