title: How pthreads does cross-threading and scheduling
body: <p>I was wondering, how does pthreads-win32 (windows implementation of pthreads) implement cross-threading? Is it written exclusively with windows API? I checked some of the sources and it seems that most is indeed written with windows API, tho i was wondering if it uses windows scheduler to switch between threads (and cores) as well or does it implement its own? Specifically, most processors these days implement their own scheduler (i've read about itanium arch for example, the hardwired logic supports two threads per core and it even automatically switches between them with hw logic, so evidently OS support for multiple cores is not necessarily needed), so if i have an obsolete OS like windows 32-bit or something, which doesn't support multi-core processors, would a program written with pthreads-win32 still run on more than one processor core or would only one core be used?</p>
  
  <p>How about pthreads implementations (untainted posix threads)? Do they support multi-core processors even if the OS on which they are running doesn't?</p>
  
  <p>I am guessing the answer is no, for both windows and posix versions, only one core is in use if the OS doesn't support for multiple cores. Tho this is just an educated guess and i would like to confirm it, so pls leave a comment.</p>
  
  <p>On a side request, can you pls recommend a lib that DOES support for muli-core thread execution, even if the OS on which the program is running DOESN'T. If any exist ofc.</p>
  
  <p>Also, is there a way to ensure two threads written with pthreads are being executed on different cores, or does the OS (or the processor, or pthreads lib) do the assignment automatically? Does pthreads guarantee execution on different cores if they are available?</p>
  
  <p>Cheers, Val</p>
  
  <p>EDIT:
  I know most of these questions are implementation specific, so i was referring to this implementation of pthreads for windows <a href="http://sourceware.org/pthreads-win32/" rel="nofollow">http://sourceware.org/pthreads-win32/</a>. I didn't specifically mention it before, because as far as i know, this is the most popular and widely used implementation of pthreads for windows.</p>