The reason behind setting an affinity for an application is that, times are there, when some functions, memories or remnants of a program are there in a processor or a cache, that was running on a processor at an earlier time. One may ask why is there a need to choose a processor for an application.
By this technology we can pin a certain application to a specific processor and then every time that application runs, it will run on the specified processor. Processor Affinity is a technology which is also known as CPU pinning.