I was interested in how Hyper-Threading awareness impacts the scheduling of threads onto logical and physical cores, e.g., does it co-locate threads from the same process to benefit from cache sharing, does it separate threads that it somehow knows will contend a lot for core resources, does it combine computationally-intense threads with I/O-intense threads, etc.
I googled how-does-scheduler-treat-logical-core. I didn't ask for an AI answer, but the Google results led with the AI answer that a Hyper-Threading-unaware scheduler treats logical cores the same as physical cores. In a multi-core CPU, if there are hypothetically only two threads to run, the lack of Hyper-Threading awareness could cause the scheduling of both threads onto the same physical core. This makes the one core too busy and delays the completion of the thread tasks.
However, that's just Google's AI. If it is to have any credibility, then it needs corroboration. The AI response seems to imply that the a Hyper-Threading-aware scheduler would prefer to spread threads out onto different physical processors and only double them up when there are no more physical processors. Is this actually true? Where can I find this information?
There is a reason why I wonder about the veracity of this Hyper-Threading-aware preference to spread threads out onto different physical cores. On a typical computer, there are thousands of threads waiting to run. This is greater than the number of logical and physical processors by many fold, if not orders of magnitude. This isn't just an AI answer, so it seems that outside of very specific scientific computing applications, it's quite plausible that there is no advantage to avoid doubling up threads onto physical cores. Is this correct, or am I missing something?
Ultimately, I'm trying to get an idea of how Hyper-Threading awareness improves scheduling. Based on what I have been able to find thus far, it's quite possible that it doesn't. However, I am not a computer scientist -- I merely had to learn about multithreading to make my software component thread-safe since the host application does use hyperthreading.
P.S. I've been perusing Hyper-Threading pages online for days, so I'm not really asking about the basics of multithreading, SMT, what Hyper-Threading is, superscalar, or that kind of background.