title: python multiprocessing and number of cores
body: <p>I have a mac , and it has 2 physical cores and 4 logical cores. I am trying to figure out the python multiprocessing . 
  As far as I know, each process in the processing uses one core in the computer, so I believe the number of processes in a python script can not exceed the number of the core of computer. Is this correct ? </p>
  
  <p>But if I execute the following code (it has 8 functions ) , it runs same time with the version that has 4 functions. </p>
  
  <pre><code>from multiprocessing import Process
  import time 
  def func1():
    for i in range(0,500):
      print "11111"
      time.sleep(0.1)
  
  
  def func2():
    for i in range(500,1000):
      print "22222"
      time.sleep(0.1)
  
  def func3():
    for i in range(1000,1500):
      print "33333"
      time.sleep(0.1)
  
  
  def func4():
     for i in range(1500,2000):
      print "444444"
      time.sleep(0.1)
  
  def func5():
     for i in range(2000,2500):
      print "555555"
      time.sleep(0.1)
  
  
  def func6():
     for i in range(2500,3000):
      print "666666666"
      time.sleep(0.1)
  
  
  def func7():
    for i in range(3500,4000):
      print "7777777777"
      time.sleep(0.1)
  
  def func8():
    for i in range(4500,5000):
      print "8888888888 "
      time.sleep(0.1)
  
  if __name__=='__main__':
    start_time = time.time()
    p1 = Process(target = func1)
    p1.start()
    p2 = Process(target = func2)
    p2.start()
    p3 = Process(target = func3)
    p3.start()
    p4 = Process(target = func4)
    p4.start()
    p5 = Process(target = func5)
    p5.start()
    p6 = Process(target = func6)
    p6.start()
    p7 = Process(target = func7)
    p7.start()
    p8 = Process(target = func8)
    p8.start()
    p1.join()
    p2.join()
    p3.join()
    p4.join()
    p5.join()
    p6.join()
    p7.join()
    p8.join()
    print "done"
    print("--- %s seconds ---" % (time.time() - start_time))
  </code></pre>
  
  <p>If I run this code with 4 functions or 8 functions, the execution time is same, but the number of cores is 4, so I think the 8 functions version should take longer, but it did not. I am missing something here ? </p>
  
  <p>Thank you ! </p>