A simple question on multithreading

Discussion in 'C++' started by Alexander Dong Back Kim, Mar 19, 2008.

  1. 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
     
    Alexander Dong Back Kim, Mar 19, 2008
    #1
    1. Advertising

  2. Alexander Dong Back Kim

    Ian Collins Guest

    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.
     
    Ian Collins, Mar 19, 2008
    #2
    1. Advertising

  3. "Alexander Dong Back Kim" <> wrote in message
    news:...
    > 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.
     
    Chris Thomasson, Mar 19, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Rob

    multithreading question

    Rob, Sep 8, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    373
  2. Jean-Yves Nief

    question on multithreading, pipes

    Jean-Yves Nief, Dec 15, 2003, in forum: Python
    Replies:
    1
    Views:
    347
  3. Mark English

    Multithreading tkinter question

    Mark English, Dec 15, 2004, in forum: Python
    Replies:
    3
    Views:
    628
    Eric Brunel
    Dec 17, 2004
  4. facugaich

    Multithreading question

    facugaich, Oct 10, 2006, in forum: C Programming
    Replies:
    9
    Views:
    311
    facugaich
    Oct 10, 2006
  5. PJ6

    multithreading question

    PJ6, Nov 29, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    308
Loading...

Share This Page