pin/bind a pthread to a processor?

David Xu davidxu at freebsd.org
Fri Sep 8 17:33:22 PDT 2006


On Saturday 09 September 2006 04:18, John Giacomoni wrote:
> Is it possible to bind a pthread to a processor in 5.5 or 6.1?
>
> I currently have a code base that uses libpthread with multiple
> threads, mutexes and condition variables.
> The problem I'm having is that I seem to be suffering wall-clock
> timing aberrations that I believe are introduced by the scheduler.
>
> Thanks,
>
> John G
>
> --
>
> John.Giacomoni at colorado.edu
> University of Colorado at Boulder
> Department of Computer Science
> Engineering Center, ECCR 1B50
> 430 UCB
> Boulder, CO 80303-0430
> USA

I don't think we have such API allowing you to bind a thread to
a specific CPU, I had implemented such an API for DragonFlyBSD, but
its 1:1 threading is not mature yet.

David Xu


More information about the freebsd-hackers mailing list