We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

How to redirect threads to specific Processor in MP Enviroment

mike_air
mike_air asked
on
Medium Priority
304 Views
Last Modified: 2010-05-18
Hi,
I would like to know if it is possible to manage processes/threads to be proceeded by a specific processor in Multi-Core or Multiple Processor enviroment.

The main idea behind is :
I am using diversified programming (A Code and B Code for the same function).
In order to control possible faults in CPU, I would like to let these two
different functions to be proceeeded in two CPUs.

Eg:
Processors:
-----------
Processor A
Processor B


Threads:
-----------
Thread 1   =-------------->Processor A
Thread 2   =-------------->Processor B
Thread 3   =-------------->Processor A
Thread 4   =-------------->Processor B
Thread 5   =-------------->Processor A
      .                                     .
      .                                     .
      .                                     .

Is that possible to practice that kind of programming.


Regards,
Cem IMRE
Comment
Watch Question

Top Expert 2005
Commented:
man sched_setaffinity

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Here you have some links with more detailed information about setting the cpu affinity, with examples:

http://www.linuxjournal.com/article/6799
http://cs.haifa.ac.il/courses/AdvancedOS/ParallelScheduling.pdf

Also, there are CPUSETS; perhaps you could use them too.

http://lwn.net/Articles/127936/
http://www.bullopensource.org/cpuset/


I'm sure you can find more if these aren't enough.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.