Affinity- operating system

ssssssss

n00b
Joined
Sep 14, 2021
Messages
10
What is Affinity_? Please explain it with a small example , please do not answer with this ( ask google), there are lots of resources on Google and all them are un-understandable and not for nOObs :)
 

Nobu

Supreme [H]ardness
Joined
Jun 7, 2007
Messages
6,718
Talking about a process's thread affinity?

It is the logical core or thread(s) that the process runs on. This can be automatically chosen by the OS based on load, resources, and CPU time used by the process, or manually defined by the user or the program itself.
 

ssssssss

n00b
Joined
Sep 14, 2021
Messages
10
Talking about a process's thread affinity?

It is the logical core or thread(s) that the process runs on. This can be automatically chosen by the OS based on load, resources, and CPU time used by the process, or manually defined by the user or the program itself.
Im talking about affinity scheduling, in order to compare between CPU-pinning VS CPU affinity in scheduling
 

Dan_D

Extremely [H]
Joined
Feb 9, 2002
Messages
58,948
Im talking about affinity scheduling, in order to compare between CPU-pinning VS CPU affinity in scheduling
I'm not sure what you are getting at. For most applications, there is no need to set affinity manually. The scheduler is more than capable of handling this. The scheduler is one thing that gets better in each iteration of Windows, especially as it relates to newer processor architectures. In the early days of SMP and multi-core Windows based systems, we had to set the affinity only when an application wasn't capable of dealing with or supporting SMT in any way shape or form. Today, it's something that's primarily there for legacy applications.
 

OFaceSIG

2[H]4U
Joined
Aug 31, 2009
Messages
2,902
I'm not sure what you are getting at. For most applications, there is no need to set affinity manually. The scheduler is more than capable of handling this. The scheduler is one thing that gets better in each iteration of Windows, especially as it relates to newer processor architectures. In the early days of SMP and multi-core Windows based systems, we had to set the affinity only when an application wasn't capable of dealing with or supporting SMT in any way shape or form. Today, it's something that's primarily there for legacy applications.
Yep, last time I had to do this was when Half Life 2 first released and freaked out on my dual core Athlon.
 

Dan_D

Extremely [H]
Joined
Feb 9, 2002
Messages
58,948
Yep, last time I had to do this was when Half Life 2 first released and freaked out on my dual core Athlon.
I had to do this more often than most as prior to multi-core CPU's, I had run dual processor based systems such as a dual processor Pentium Pro on an Intel PR440FX motherboard. I also had a quad core rather early and later on, two quad cores for a total of eight on my Skulltrail setup. I don't think I've had to do it since my Core i7 980X setup though. Even prior to that it was a rarity. You had to run some pretty eclectic software to have to mess with this too much. Primarily older games, specialized software or legacy versions of productivity products.
 
Top