title: Software parallelization with OpenMP versus Affinity scheduling?
body: <p>Scenario: I have an program which can be <em>easily</em> parallelized using OpenMP, lets say the main loop of the program is a for loop and independent data within it, so paralleizing it would be trivial. However currently I <strong>don't</strong> parallelize it, and instead use affinity scheduling.</p>
  
  <p>This program performs work on some input files specified by a folder in the command line arguments. To run this program in parallel, someone can create a bat file like so:</p>
  
  <pre><code>start \affinity 1 "1" bat1
  start \affinity 2 "2" bat2
  start \affinity 3 "3" bat3
  start \affinity 4 "4" bat4
  </code></pre>
  
  <p>where bat1 - 4 is a bat file that calls <code>main.exe</code> with a different input folder for each bat file. So in this case there would be 4 instances of <code>main.exe</code> running on <code>input_folder1, input_folder2, input_folder3, input_folder4</code> respectively.</p>
  
  <p><strong>What would be the benefits of using a library like OpenMP be instead of affinity scheduling</strong>? I figure</p>
  
  <ul>
  <li>Less memory usage, single stack and heap for a single program instance as opposed to <code>n</code> instances of a program for <code>n</code> cores</li>
  <li>Better scaling</li>
  </ul>
  
  <p>But would I expect to actually see a performance boost? Why if so?</p>