Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Processor affinity
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Assignment of a task to a given core of a CPU}} {{more sources|date=June 2021}} In [[computer science]], '''processor affinity''', also called '''CPU pinning''' or '''cache affinity''', enables the binding and unbinding of a [[Process (computing)|process]] or a [[Thread (computing)|thread]] to a [[central processing unit]] (CPU) or a range of CPUs, so that the process or thread will execute only on the designated CPU or CPUs rather than any CPU. This can be viewed as a modification of the native central queue [[scheduling algorithm]] in a [[symmetric multiprocessing]] operating system. Each item in the queue has a tag indicating its kin [[central processing unit|processor]]. At the time of resource allocation, each task is allocated to its kin processor in preference to others. Processor affinity takes advantage of the fact that remnants of a process that was run on a given processor may remain in that processor's state (for example, data in the [[CPU cache|cache memory]]) after another process was run on that processor. 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 miss]]es, but may slow down ordinary programs because they would need to wait for that CPU to become available again.<ref>{{cite web|url=https://www.ibm.com/docs/en/aix/7.2?topic=architecture-processor-affinity-binding|title=Processor affinity and binding|website=[[IBM]] |access-date=2021-06-08}}</ref> A practical example of processor affinity is executing multiple instances of a non-threaded application, such as some graphics-rendering software. {{citation needed|date=June 2021}} Scheduling-algorithm implementations vary in adherence to processor affinity. Under certain circumstances, some implementations will allow a task to change to another processor if it results in higher efficiency. For example, when two processor-intensive tasks (A and B) have affinity to one processor while another processor remains unused, many schedulers will shift task B to the second processor in order to maximize processor use. Task B will then acquire affinity with the second processor, while task A will continue to have affinity with the original processor.{{citation needed|date=June 2021}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)