In the computer world, this is usually processor affinity, and refers to keeping a process bound to one cpu. Without this binding, a process may move to a different cpu when it is scheduled to run again, and this is apt to be deleterious to cpu cache.
SMP operating systems try to keep processes tied to the same cpu. This is usually referred to as "soft" affinity. Hard affinity means the kernel is required to keep the same cpu (or cpu's) for a specific process. This would be done by a system call either by the process itself or by some other supervisory process.
It can also be advantageous to bind threads to the same cpu if they will be accessing the same data. Of course that does negate the advantages that might be had from running the threads on independent processors. People who need to squeeze the last bit of performance from their programs agonize over such decisions.
Another use is for real-time systems. The time critical aspects get bound to one or more cpus, and other processes use whatever is left over.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-07-07 Tony Lawrence
Don't blame me for the fact that competent programming, as I view it as an intellectual possibility, will be too difficult for "the average programmer" — you must not fall into the trap of rejecting a surgical technique because it is beyond the capabilities of the barber in his shop around the corner. (Edsger W. Dijkstra)