2013-09-27 25 views
0

我有一個戴爾Inspiron 620.系統控制面板顯示1個Intel i3-2100。英特爾說(http://ark.intel.com/products/53422/)它有2個內核和4個線程。三個問題:在系統環境變量中,no_of_processors = 4;那4線程呢?確定處理器和內核的數量

關於內核,當我運行這段代碼:

   // get a list of all processor devices 
       deviceList = SetupDiGetClassDevs(ref processorGuid, "ACPI", IntPtr.Zero, (int)DIGCF.PRESENT); 
       // attempt to process each item in the list 
       for (int deviceNumber = 0; ; deviceNumber++) 
       { 
        SP_DEVINFO_DATA deviceInfo = new SP_DEVINFO_DATA(); 
        deviceInfo.cbSize = Marshal.SizeOf(deviceInfo); 

        // attempt to read the device info from the list, if this fails, we're at the end of the list 
        if (!SetupDiEnumDeviceInfo(deviceList, deviceNumber, ref deviceInfo)) 
        { 
         deviceCount = deviceNumber - 1; 
         break; 
        } 
       } 

我得到3作爲核心的數量,而不是2

此外,在線程,這個系統將支持的數量方面充分的是,核心x處理器?

謝謝。

回答

0

這是純淨的假設,但不可能是:

  1. 2核心與4個線程意味着超線程
  2. 系統屬性所指=>其閱讀可作爲「邏輯單超線程的數目4個處理器線程處理器'
  3. 你的循環從0開始,所以你仍然看到4.