processorid 是每个核心吗?

Is the processorid per core?

无论是双核、i3、i5 还是 i7,处理器的处理器 ID 是否等于核心处理器数或逻辑处理器数?

我正在使用 win32_processor 获取 processorid。

它返回一个 processorid,但我卡住了它是否 return 每个核心处理器或逻辑处理器的多个 processorid。

或者,它只是 return 一个处理器 ID,与核心处理器和逻辑处理器的数量无关。

您需要在您的系统上进行测试,因为它取决于您拥有的 CPU 类型。它可能是每个逻辑(超线程)处理器一个条目。

这是msdn says

On a multiprocessor computer, one instance of the Win32_Processor class exists for each processor.

To determine the total number of processor instances associated with a computer system object, use the Win32_ComputerSystemProcessor association class.

To determine if hyperthreading is enabled for the processor, compare NumberOfLogicalProcessors and NumberOfCores. If hyperthreading is enabled in the BIOS for the processor, then NumberOfCores is less than NumberOfLogicalProcessors. For example, a dual-processor system that contains two processors enabled for hyperthreading can run four threads or programs[ or simultaneously]. In this case, NumberOfCores is 2 and NumberOfLogicalProcessors is 4.