title: Allocate a full CPU to a specific thread in order to maximize performance and avoid context switch
body: <p>I have a task <strong>not parallelizable</strong> that I want to process as fast as possible.
  This task performs pure computation, no I/O.</p>
  
  <p>Of course this task runs on a multi-core system and many other processes are simultaneously doing "things" that also also require CPU usage.</p>
  
  <p>Today, my task is optimized as far as possible (let's say it's perfect :-P), my idea to boost it once again would be to allocate a full CPU for its thread.</p>
  
  <p>In these conditions, no other threads would share the CPU with it, and so, no context switch would interrupt my task; doing that should to speed it a little bit once again with almost no effort.
  (of course, this would be done to the detriment of other processes but this is not a problem at all: the highest priority is given to <strong>my</strong> task!)</p>
  
  <p>But how can I do what I want? I know how to set the affinity of the thread of my task in order to assign it to a given CPU but this CPU will potentially be shared with other threads; my problem is not solved</p>
  
  <p>Thank you for your help</p>