This can be viewed as a modification of the native central queue scheduling algorithm in a symmetric multiprocessing operating system.
Scheduling a CPU-intensive process that has few interrupts to execute on the same processor may improve its performance by reducing degrading events such as cache misses, but may slow down ordinary programs because they would need to wait for that CPU to become available again.
[1] A practical example of processor affinity is executing multiple instances of a non-threaded application, such as some graphics-rendering software.
However, the two virtual CPUs compete for essentially all computing, cache, and memory resources.
[citation needed] On Linux, the CPU affinity of a process can be altered with the taskset(1) program[3] and the sched_setaffinity(2) system call.
[4] On DragonFly BSD 1.9 (2007) and later versions, usched_set system call can be used to control the affinity of a process.
In DragonFly BSD 3.1 (2012) and later, usched utility can be used for assigning processes to a certain CPU set.