title: set thread affinity in python and java
body: <p>When I create a thread with Java or Python I can't find the <code>pid</code> among the operating system threads. In fact <code>get_ident()</code> in Python gives me a very large number that can't be the PID.</p>
  
  <p>In fact I need to set the process affinity of all other threads to the first processor core then I want to dedicate the other cores to my specific threads run in a program to create a real time environment. The threads will be less than remaining processor cores.</p>
  
  <p>As I have read in stackoverflow it is not possible in Java and there will be the esigence of native calls. Can it be done in Python or I must use C/C++?</p>
  
  <p>The program will be installed in a Linux machine.</p>