In a multi-processor system, each processor has a respective hard affinity
queue and soft affinity queue. For execution of a thread, a queue loader
places an instance of the thread upon the hard or soft affinity queue of
a selected processor. The selection may use an affinity attribute,
processor attribute, accessor function, or a respective program of code
threads for each processor. A thread instance on a processor's hard
affinity queue is executed only by that processor. A thread instance on a
processor's soft affinity queue is executed by that processor unless
another processor has a soft affinity queue empty of thread instances
ready for execution. Each processor alternates service priority between
its hard and soft affinity queues. When a thread has a soft affinity it
is initially bound to the processor it is started from. It will, then, be
bound to the last processor it has been run on.