Developers could exert some level of control over the selection of the execution core by using a technique called processor affinity. This capability allows the developer to specify a core for the thread to run on. Most operating systems, including Windows, treat processor affinity as a request rather than a command, so they accept the affinity only if it fits within their scheduling constraints (in practice, they mostly fulfill the request). However, this programming approach is generally discouraged, as it tends to make the scheduler work less efficiently. In almost all cases, the scheduler has far better algorithms for deciding what to run when and where than does the programmer at code-writing time.
Because previous Windows schedulers were indiscriminate about where they scheduled threads, an application using three threads might see those threads constantly rotated through all four Nehalem cores. The result is that the power-savings feature and Turbo Mode would suffer, as no core would remain inactive for very long. Windows 7, however, tends to schedule the threads to run on the same cores, rather than having them hop about; a three-thread application typically uses only three cores and lets Nehalem turn off the fourth core.
This behavior clearly reduces power needs, and it can improve performance in two ways: via Turbo Mode, as described earlier, and via marginally better cache usage. As we see from the benchmarks, however, the difference in performance is marginal when four or more threads are running. The real win is the power savings. On desktop systems, the power savings might not appear terribly important, but they can be very significant on servers and on mobile devices. Mobile users, in particular, will enjoy longer battery life when the Nehalem mobile processors begin appearing in consumer devices.
See additional InfoWorld articles on Intel's Nehalem:
- Last of the red hot Sun servers
- IBM BladeCenter delivers speed, power savings
- Windows 7 Ultimate on Nehalem Mac Pro
- Nehalem workstations: A new era in performance
- MacBook Pro soars to new heights
- Exclusive review: HP BladeSystem Matrix
- Apple's Nehalem Xserve serves the need for speed
- Mac Pro: The perfect workstation
- Intel's Nehalem simply sizzles
This story, "How Intel Nehalem processors and Windows 7 work together," was originally published at InfoWorld.com. Follow the latest developments in Windows, Windows 7, and Intel Nehalem on InfoWorld.com.