[RC5] Does Intel hyperthreading help?

Ryan Malayter rmalayter at bai.org
Wed Aug 20 12:16:00 EDT 2003


From: bdragon at distributed.net [mailto:bdragon at distributed.net] 
> > Can you even define for us "process scheduling efficiency"? 

> I'm speaking of how much cpu time is spent determining which 
> process should gain access to the cpu at any given point. 
> Having a second apparent processor makes such scheduling 
> issues ease up until you have one more process seeking cpu 
> resources than you have cpus.

Don't most widely adopted operating systems - including Windows NT and
its successors - use very simple weighted round-robin algorithms for
scheduling? A process has a priority number, and whatever its relative
priority it gets a proportional number of processor quanta per epoch.
The differences are relatively minor, mostly in the numbers used, how
device interrupts are prioritized, and how processor "stickiness" is
achieved on SMP systems.

I don't think there's much "prediction" of processor usage or run-time
profiling going on in any modern OS, since that would take too much CPU
to be efficient. See http://www.cs.wpi.edu/~cs535/s03/rajaram.ppt for a
decent comparison of schedulers.

As for the Hyperthreading-specific hooks in Windows XP/2003, from what
I've read on hardware sites and Microsoft's site the HAL simply
recognizes the difference between physical and logical (HT) processors.
If you have more than one HT-enabled processor in a system, work is
scheduled across physical CPUs before the "logical" processors are used.
No other profiling of running threads/processes seems to be done.

The above would lead me to conclude that HT would have similar effects
on a Linux/FreeBSD system that was running a similar application mix as
a Windows system.

> I would think the same would apply with multiple single-
> threaded processes as well, as long as "2" above still applied.

Yes, I agree. My awkward sentence didn't appear to leave room for this
case, but it was intended.




More information about the rc5 mailing list