Suppose each thread's affinity is all the processors. Whenever a thread becomes ready, will the kernel attempt to find an idle processor to run it?
The kernel's process scheduler does not wait for cores to become idle, it actually decides what gets processing slices on each core sequentially based on
When the thread is sleeping or waiting on I/O, it will simply get skipped until the next time the scheduler loops back to it in its processing queue.
Understanding this in more details requires reading the source code. Be warned that it is the most complex part of the kernel.