User Tools

Site Tools


realtime:documentation:howto:tools:cpu_affinity

This is an old revision of the document!


In a SMP system the property that binds processes to one or more processors by the OS scheduler is know as CPU affinity, the capability to override how the processes are assigned to a particular set of processors by the scheduler is a feature available in several OS. The idea is to say “always run this process on processor one” or “run these processes on all processors but processor zero”. The scheduler then obeys the order, and the process runs only on the allowed processors.

In the Linux case we have a couple of ways to set the CPU affinity in user space

Using the sched_getaffinity() system call to set processor affinity

realtime/documentation/howto/tools/cpu_affinity.1493841306.txt.gz · Last modified: 2017/05/03 19:55 by srodrig1