title: How to protect critical sections of processes executing in different cores?
body: <p>I have assigned the processes I create to different cores by using <strong>sched_setaffinity()</strong> and created mutex as process shared:</p>
  
  <pre><code>pthread_mutexattr_setpshared(&amp;psharedm,PTHREAD_PROCESS_SHARED);
  </code></pre>
  
  <p>This mutex is stored in a file location accessed by all the processes. It works fine for processes in the same core but the processes in different cores are executing as if there are no critical sections. They are executing in parallel like a normal case. So basically, <strong>How to synchronize processes in multi-core system?</strong></p>