欧美三区_成人在线免费观看视频_欧美极品少妇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條評論
主站蜘蛛池模板: 999毛片免费观看 | 久久久一区二区 | 精品国产免费久久久久久 | 99国产精品2018视频全部 | 天天爽天天干天天操 | 国产精品一区二 | 欧美成人一级片 | 午夜国产亚洲精品一区 | 91久久精品一区二区二区 | 日本黄页在线观看 | 欧美高清成人 | 大象一区 | 欧美最爽乱淫视频免 | 天天爱夜夜操 | 日本在线亚州精品视频在线 | 免费视频日韩 | 最新中文字幕 | 一个看片免费视频www | 国产精品区二区三区日本 | 末成年毛片在线播放 | 成人午夜大片免费看爽爽爽 | 久久99国产综合精品 | 亚洲美女毛片 | 99伊人 | 亚洲欧美第一页 | 日本久久久久 | 影音先锋亚洲资源 | 日韩网红少妇无码视频香港 | 亚洲美女天堂网 | 久久久久综合精品福利啪啪 | 国产一区亚洲 | 久久午夜影院 | 国产一级免费不卡 | 孕妇体内谢精满日本电影 | 成人精品鲁一区一区二区 | 精品一区二区三区在线播放 | 黄色日本视频 | a级片在线免费观看 | 91精选国产91在线观看 | 香港一级毛片在线播放 | 免费看搡女人的视频 |