Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > A simple question on multithreading

Reply
Thread Tools

A simple question on multithreading

 
 
Alexander Dong Back Kim
Guest
Posts: n/a
 
      03-19-2008
Hi all,

I'm having a fun with multi threading programming. My target machine
has 8 Intel Xeon CPUs. Working environment is Linux based and using g+
+. Boost library is being used for my fun.

My question is is there any possible way to bind a thread to a
specific CPU among 8 CPUs? If it is possible would you please let me
know where I have to start digging? +)

Cheers,
Alex
 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      03-19-2008
Alexander Dong Back Kim wrote:
> Hi all,
>
> I'm having a fun with multi threading programming. My target machine
> has 8 Intel Xeon CPUs. Working environment is Linux based and using g+
> +. Boost library is being used for my fun.
>
> My question is is there any possible way to bind a thread to a
> specific CPU among 8 CPUs? If it is possible would you please let me
> know where I have to start digging? +)
>

A linux group would be good place to start!

--
Ian Collins.
 
Reply With Quote
 
 
 
 
Chris Thomasson
Guest
Posts: n/a
 
      03-19-2008
"Alexander Dong Back Kim" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I'm having a fun with multi threading programming. My target machine
> has 8 Intel Xeon CPUs. Working environment is Linux based and using g+
> +. Boost library is being used for my fun.
>
> My question is is there any possible way to bind a thread to a
> specific CPU among 8 CPUs? If it is possible would you please let me
> know where I have to start digging? +)


Check out the 'pthread_getaffinity_np()' and 'pthread_setaffinity_np()'
functions.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multithreading question PJ6 ASP .Net 1 11-29-2009 12:30 AM
Multithreading question facugaich C Programming 9 10-10-2006 05:27 PM
Multithreading tkinter question Mark English Python 3 12-17-2004 08:48 AM
multithreading question Rob ASP .Net 4 09-09-2004 04:30 PM
question on multithreading, pipes Jean-Yves Nief Python 1 12-24-2003 03:52 PM



Advertisments