Processor topology inside of Hyper-V virtual machines

Processor topology inside of Hyper-V virtual machines

A number of people have noticed that they can create a virtual machine with four virtual processors, and then successfully run Windows XP on it and have it utilize all four virtual processors.  This strikes them as odd, because Windows XP supposedly only supports the use of one or two processors in a computer.

To understand what is happening we need to talk about processor topology.

A long time ago, the universe used to be quite simple.  When you talked about a processor you meant a physical chip that you put inside a computer that was capable of handling one stream of execution.  Then along came concepts such as hyper-threading and multi-core processors.  These technologies allow a single physical processor to handle multiple streams of execution, and effectively appear like multiple physical processors.

In this new world, in order to differentiate between the physical chip that you put in a computer and a single stream of execution on the chip, we use the terms "package", "socket" or "physical processor" to refer to the actual physical chip that you put inside the computer,  and the term "logical processor" to refer to a single stream of execution on the chip.

"Processor topology" is simply the ratio, and nature, of logical processors to physical processors in a computer.

This all gets interesting when it comes to the question of how virtual processors are represented inside of a virtual machine.

When hyper-threading and multi-core processors first came onto the scene, Microsoft made the decision to license all of its software based on the number of physical processors [and not logical processors] in a system.  This means that when you try to create a "four processor" virtual machine the way in which we represent those four processors can affect how the software that runs inside the virtual machine will need to be licensed.

Obviously, as Microsoft, we do not want you to be able to run software that utilizes more processing power than you are correctly licensed to use.  On the flip side, we understand that you do not want to have to pay more for your software than you actually need to. 

To this end, Hyper-V examines the processor topology of your physical computer and exposes that into the virtual machine.

Thus, a virtual machine with four virtual processors that is running on a physical computer with a single quad-core physical processor will appear to only have a single physical processor with four logical processors.  The same virtual machine running on a system using two dual-core physical processors would appear to have two physical processors with four logical processors [two logical processors per physical processor].

And this is what allows Windows XP to run on your "four virtual processor" virtual machine and utilize all of the virtual processors, because it is still within its licensing right of one or two physical processors, if you are running on a hyper-threaded or multi-core system.

Cheers,
Ben

UPDATE: To help visualize this, below is a table that shows you the processor topology that will be reported inside the virtual machine, given the processor topology of the physical computer and the number of virtual processors configured for the virtual machine.

# Virtual Processors / Physical Processor Topology1 Virtual Processor2 Virtual Processors4 Virtual Processors
4 single-core processors1 single-core processor2 single-core processors4 single-core processors
2 dual-core processors1 single-core processor1 dual-core processor2 dual-core processors
1 quad-core processor1 single-core processor1 dual-core processor1 quad-core processor

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值