View Single Post

   
  #2 (permalink)  
Old 05-02-2008, 05:03 AM
Marc Espie
 
Posts: n/a
Default Re: Are OpenBSD threads (pthreads) using more than one core of multicoreCPUs?

In article <d4cfbe5e-5c1c-4cad-a9eb-6f13d16ee689@e39g2000hsf.googlegroups.com>,
<ttsiodras@gmail.com> wrote:
>When I tried the same test using pthreads, however, I found out that
>both threads were allocated on the same core. It appears that threads
>are not "dispersed" amongst different cores, and are thus not getting
>any benefit from my dual core CPU.


That is correct.

>What am I doing wrong?


You don't understand things, that's all.

pthreads is a purely userland threads library, there's no way it can
distribute threads among different processors because the kernel doesn't
even know about those threads.
Reply With Quote