[parsec-users] how to bind threads to processors

Christian Bienia cbienia at CS.Princeton.EDU
Fri Jan 16 10:29:16 EST 2009



I know three ways to bind processes / threads to a CPU on Solaris:


.         You can use the processor_bind syscall in the source code to do it
automatically when you create a thread. This is probably the best method for


.         If you don't want to modify the source code then have a look
whether the `psrset' command line tool of Solaris does what you want. You
can find a great explanation here:


.         Some versions of pthread also support a `pthread_setaffinity_np'
command that sets the affinity of a thread in the source code.


I hope that helps.


- Chris



From: parsec-users-bounces at lists.cs.princeton.edu
[mailto:parsec-users-bounces at lists.cs.princeton.edu] On Behalf Of Francesco
Sent: Friday, January 16, 2009 7:16 AM
To: parsec-users at lists.cs.princeton.edu
Subject: [parsec-users] how to bind threads to processors


Hi all,

I started to use Parsec on a sparc/solaris system emulated on Simics and I
need to bind each thread to a specific processor during the simulation.
How can I do that?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/parsec-users/attachments/20090116/7e6baf85/attachment.html>

More information about the parsec-users mailing list