欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

[Windows編程] Windows 7 對多核的支持

系統 3134 0

Windows 7 和 Windows Server 2008 R2 一個重要更新是增強了對多核的支持。 現已可以支持超過64個邏輯處理器(也就是所謂的“核”),并且引入了NUMA 技術, 大幅度提高多核運算的性能。

?

傳統的多核運算是使用SMP(Symmetric Multi-Processor )模式:將多個處理器與一個集中的存儲器和I/O總線相連。所有處理器只能訪問同一個物理存儲器,因此SMP系統有時也被稱為一致存儲器訪問(UMA)結構體系,一致性意指無論在什么時候,處理器只能為內存的每個數據保持或共享唯一一個數值。很顯然,SMP的缺點是可伸縮性有限,因為在存儲器和I/O接口達到飽和的時候,增加處理器并不能獲得更高的性能。

?

NUMA模式是一種分布式存儲器訪問方式,處理器可以同時訪問不同的存儲器地址,大幅度提高并行性。 NUMA模式下,處理器被劃分成多個 "節點" (node), 每個節點被分配有的本地存儲器空間。 所有節點中的處理器都可以訪問全部的系統物理存儲器,但是訪問本節點內的存儲器所需要的時間,比訪問某些遠程節點內的存儲器所花的時間要少得多。

?

在開發Windows7 上的多線程程序的時候, 應該把進程內所有的線程都安排到同一個節點,可以大大提高性能。 新的Windows 7 API 函數 SetProcessAffinityMask ? 可以實現這個功能。

?

如果你的程序使用內存比較頻繁, 應該在進程所在節點的本地存儲器空間分配內存,以避免跨節點存儲器訪問的開銷。 Windows API VirtualAllocExNuma ? 可以實現這個功能。

?

以下是Windows 7/ WIndows Server2 2008R2 新增加的 多核支持API函數

?

CreateRemoteThreadEx
Creates a thread that runs in the virtual address space of another process and optionally specifies extended attributes such as processor group affinity.

GetActiveProcessorCount
Returns the number of active processors in a processor group or in the system.

GetActiveProcessorGroupCount
Returns the number of active processor groups in the system.

GetCurrentProcessorNumberEx
Retrieves the processor group and number of the logical processor in which the calling thread is running.

GetLogicalProcessorInformationEx
Retrieves information about the relationships of logical processors and related hardware.

GetMaximumProcessorCount
Returns the maximum number of logical processors that a processor group or the system can support.

GetMaximumProcessorGroupCount
Returns the maximum number of processor groups that the system supports.

GetNumaAvailableMemoryNodeEx
Retrieves the amount of memory that is available in the specified node as a USHORT value.

GetNumaNodeNumberFromHandle
Retrieves the NUMA node associated with the underlying device for a file handle.

GetNumaNodeProcessorMaskEx
Retrieves the processor mask for the specified NUMA node as a USHORT value.

GetNumaProcessorNodeEx
Retrieves the node number of the specified logical processor as a USHORT value.

GetNumaProximityNodeEx
Retrieves the node number as a USHORT value for the specified proximity identifier.

GetProcessGroupAffinity
Retrieves the processor group affinity of the specified process.

GetProcessorSystemCycleTime
Retrieves the cycle time each processor in the specified group spent executing deferred procedure calls (DPCs) and interrupt service routines (ISRs).

GetThreadGroupAffinity
Retrieves the processor group affinity of the specified thread.

GetThreadIdealProcessorEx
Retrieves the processor number of the ideal processor for the specified thread.

QueryIdleProcessorCycleTimeEx
Retrieves the accumulated cycle time for the idle thread on each logical processor in the specified processor group.

SetThreadGroupAffinity
Sets the processor group affinity for the specified thread.

SetThreadIdealProcessorEx
Sets the ideal processor for the specified thread and optionally retrieves the previous ideal processor.

以下是新的線程池 API 函數


QueryThreadpoolStackInformation
Retrieves the stack reserve and commit sizes for threads in the specified thread pool.

SetThreadpoolCallbackPersistent
Specifies that the callback should run on a persistent thread.

SetThreadpoolCallbackPriority
Specifies the priority of a callback function relative to other work items in the same thread pool.

SetThreadpoolStackInformation
Sets the stack reserve and commit sizes for new threads in the specified thread pool.

?

?

?>> 原創文章的版權屬于作者,轉載請注明出處和作者信息( http://blog.csdn.net/WinGeek/ ), 謝謝。 <<

[Windows編程] Windows 7 對多核的支持


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 久久这里只有精品视频9 | 免费精品美女久久久久久久久久 | 澳门特级 片免费观看视频 久草最新在线 | 国产色情A片国语露对白 | 亚洲精品第一国产综合高清 | 亚洲一区二区三区欧美 | 久久伊人一区二区三区四区 | 日本高清在线精品一区二区三区 | 婷婷色中文字幕 | 91福利免费观看 | 久草视频观看 | 国产福利在线永久视频 | 欧美日韩精品一区二区三区在线观看 | 97伊人久久| 国产二区三区 | 夜夜夜爽 | 欧美日韩精品一区二区在线线 | 欧美精品一级 | 国产亚洲精品国产一区 | 亚洲成在人线中文字幕 | 91精品国产免费久久久久久 | 婷婷国产在线观看 | 免费午夜影片在线观看影院 | 中文字幕一区二区三 | 特级做a爰片毛片免费看 | 日本又黄又粗暴的gif动态图含羞 | 狠狠操麻豆| 高清不卡一区二区 | 国产日韩精品入口 | 日韩在线aⅴ免费视频 | 欧美 日韩 国产 一区 | xy110.app| 天天影视插插 | 色中色资源 | 日本黄视频在线观看 | 国产成人福利在线视老湿机 | 精品成人一区二区三区 | 亚洲91视频 | 日日a.v拍夜夜添久久免费 | 一级做一级爱a做片性视频视频 | 免费观看性欧美一级 |