[parsec-users] how to bind threads to processors

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


Francesco,

 

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
you.

 

.         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:
http://info.borland.com/devsupport/bes/faq/all_versions/perf/cpu_scaling.htm
l

 

.         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
Panicucci
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?


thanks
Francesco

-------------- 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