Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #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.

  2. #2
    Just Joined!
    Join Date
    Jan 2010
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts