title: Clarification regarding python Pool.map function used for python parallelism
body: <p>I have a couple of questions regarding the functioning of the following code fragment.</p>
  
  <pre><code> def f(x):
      return x*x
  
  if __name__ == '__main__':
      pool = Pool(processes=10)             # start 10 worker processes
      result = pool.apply_async(f, [10])    # evaluate "f(10)" asynchronously
      print result.get(timeout=1)           
      print pool.map(f, range(10))          # prints "[0, 1, 4,..., 81]"
  </code></pre>
  
  <ol>
  <li><p>In the line <code>pool  = Pool(processes=10)</code>, does it even make a difference if i'm running on 4 processor architecture (quad-core) and instantiate more than 4 worker processes since only up to 4 processes can execute at any point in time?</p></li>
  <li><p>In the<code>pool.map(f,range(10))</code> function, if I instantiate 10 worker processes, and have maybe 50 mappers does python take care of assigning mappers to processes as they complete execution or am I supposed to figure out how many mappers are created and instantiate that many number of processes in the line <code>pool = Pool(processes=number_of_mappers)</code> ?.</p></li>
  </ol>
  
  <p>This is my first attempt at parallelizing anything and I am thoroughly confused. so any help would be much appreciated.</p>
  
  <p>Thanks in advance!   </p>