Geoff Chappell - Software Analyst
Microsoft’s license terms for Windows Vista, even for the Starter edition, state plainly that the software may be used “on up to two processors on” the licensed “device at one time”. What isn’t spelled out is whether the processors to be counted for this limit are physical or logical. In the experience of using Windows, there is generally no distinction. For instance, a dual-core CPU shows in the Device Manager as two processors, with no very obvious indication that these are logical processors in the one physical package. Especially as the day cannot be far off that Intel’s advertisements on television sing the wonders not only of dual-core but quad-core processors, it might be thought that Microsoft’s lawyers would want to clarify that the license applies specifically to physical processors. Such clarification might then be the end of the matter, but there are quirks.
For one thing, the legalese’s restriction to two processors is not factually correct for all editions, even with it understood as counting only physical processors. Some editions of Windows Vista are distributed with license values that permit just one physical processor.
The permitted number of processors is configured through the license value Kernel-RegisteredProcessors, as extracted from binary data for the ProductPolicy value in the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions. Though the Business, Business N and Ultimate editions do indeed have Kernel-RegisteredProcessors set to 2, it is just 1 for the Starter, Home Basic, Home Basic N and Home Premium editions.
Few users of these reduced editions may ever be troubled by the difference: even a quad-core processor counts as one for the license value, and machines with two physical processors will not be selling in quantity on the high street any time soon, if ever. Nonetheless, motherboards with two CPU sockets do exist and a search through Google shows soon enough that people have been caught unaware. Yet even if relative scarcity means there is little harm in total, what does it say of Microsoft’s notions of software licensing that Microsoft goes to the trouble of developing a formal scheme of named license values, includes one for limiting the number of processors, configures different limits for different editions, yet doesn’t make sure that the corresponding legal text is accurate with respect to these different limits?
Eventually, Microsoft may correct the legal text, or at least elaborate it somehow. There may someday, somewhere, be a clear statement by Microsoft that the restriction to one physical processor for the various Starter and Home editions is a licensing issue, not some technical constraint. Meanwhile, the closest that pages like Windows Vista: Recommended System Requirements seem able to come is “While all editions of Windows Vista can support multiple core CPUs, only Windows Vista Business, Ultimate and Enterprise can support dual processors”.
By the way, if you do have dual processors in combination with one of the lesser editions of Windows Vista, then do not naively change the ProductPolicy value in the registry in the hope of inducing Windows to rise to the behaviour suggested by Microsoft’s legalese. Not only may changing it transgress laws about modifying software to defeat license terms, but Windows does have various run-time mechanisms for protecting the integrity of the license values.
What happens if Windows is run on a machine with more processors than are licensed? It would be naive to imagine that Windows just doesn’t notice, or even that Windows does nothing about an excess until the time comes for what the license terms refer to as a validation. A natural expectation is that each time Windows enumerates the processors, as it must for instance when initialising, it will use those that are within the licensed limit but not use any that are unlicensed. And, indeed, it doesn’t use excess processors. But that is not the whole of it. There is a penalty. The price for starting Windows with even one unlicensed processor is that the kernel disables its support for the CPU feature known formally as Page Size Extensions (PSE) and known commonly as large pages.
This feature enables physical memory to be mapped into linear address space not only in 4KB pages, as usual, but also in 2MB or 4MB pages (depending on whether another feature, not directly relevant, is enabled). The large pages trade fine control for easier, quicker mapping. The advantage in faster access to frequently-used memory can be significant. Quite why this benefit should be lost as the penalty for having too many processors is anyone’s guess. Microsoft seems not even to document that any penalty is applied, let alone this one, let alone why. Yet its introduction is plainly a deliberate coding, introduced for Windows Server 2003 SP2 and maintained at least until Windows 7.
Microsoft may have a legal right to degrade its product in response to hardware that exceeds the license terms, and to do so however Microsoft wants. A case might be made that Microsoft would be generous just to ignore the excess hardware, and at least the penalty applies just to the infringing session and is entirely remediable just by removing or disabling the unlicensed hardware. That said, since Microsoft does not notify the user that the licence is supposedly breached, one might think that Microsoft would take special care to be sure that its supposition is correct beyond dispute and that the license limit is accurately documented. As things stand now, the loss of large-page support is the only notification and Microsoft seems nowhere to document that this penalty actually is incurred. Worse, as noted in the next paragraph but explained in detail elsewhere, the penalty can be incurred even without a breach.
Uncertainty about whether the license limit counts logical or physical processors makes for a complicated interaction with the numproc boot option, explained separately. A quick summary is that setting numproc on a machine with multiple logical processors may disable large-page support because a coding error causes one of the logical processors to be treated as an unlicensed physical processor. Microsoft fixed this in Windows Vista SP1.
That the license value is counted in physical processors is deduced from the kernel’s code for enumerating logical processors during initialisation. The following summary simplifies by assuming that numproc is absent (and also that the kernel is not passed a /BOOTPROC switch, in Windows Vista SP1 and higher).
The kernel first reads the Kernel-RegisteredProcessors license value into an internal kernel variable. The kernel is at the time executing on the so-called boot processor. Regarding this as the first logical processor of a first physical processor, the kernel then proceeds to enumerate other logical processors. Each new logical processor may be in the same physical package as one that has already been enumerated, or not.
If it is not, then it is the first logical processor for a new physical processor and is counted against the license value. The implementation is simply that if the number of processors that have yet been accepted has already reached the licensed allowance, then this new physical processor is unlicensed and cannot be accepted for use. The kernel continues enumerating, but only in the hope of discovering additional logical processors for physical processors that have been accepted as licensed.
When a newly enumerated logical processor is in the same physical package as one that has already been accepted for use, the kernel simply increments the licensed allowance and accepts the new logical processor. This models the notion that additional logical processors of a licensed physical processor are included automatically in the licensed allowance. The license limit is therefore a count of physical processors.