Results 1 to 2 of 2
Hi all,
I am using sched_set_affinity() in a C program to assign each thread to a specific processor. Is it safe to assume that the processor ID used in cpu_mask ...
- 12-28-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 1
Is processor ID static
Hi all,
I am using sched_set_affinity() in a C program to assign each thread to a specific processor. Is it safe to assume that the processor ID used in cpu_mask stay the same, even after system reboots ?
Thank you very much in advanced for any input.
- 01-04-2010 #2Just Joined!
- Join Date
- Jan 2010
- Location
- Montreal
- Posts
- 10
Hello ;
processor ID should always be static.
As the processor ID should have a direct hardware mapping to the cores of the CPU.
Although I do not recommend you to assign specific processors for tiny programs that have tiny computations.
Depending on what you want to run ;
the code will need to be alot more complicated as you will need to write redundancy code in case specified processor can not compute the task in order to reassign task to diffrent processors.
Gluck ;
Mohammed Al-Mehdar
Systems and Telecom Engineer


Reply With Quote
