欧美三区_成人在线免费观看视频_欧美极品少妇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條評論
主站蜘蛛池模板: 老妇毛片 | 欧美精品黄页在线观看大全 | 欧美无乱码久久久免费午夜一区 | 国产精品久久久久久久久久久新郎 | 欧美色欧美亚洲另类二区精品 | 国产精品夜色一区二区三区 | 69av在线视频 | 欧美日韩中文 | 婷婷亚洲五月琪琪综合 | 波多野结衣久久一区二区 | 99激情视频 | 亚洲视频区 | 特级av毛片免费观看 | 精品欧美乱码久久久久久 | 国产福利在线看 | 日本视频a | 丁香六月婷婷激情 | 综合久久久久 | 亚洲一区精品在线 | 精品在线一区 | 亚洲91| 国产精品91久久久久 | 亚洲欧洲精品成人久久曰影片 | 一区二区免费看 | 奇米777视频国产 | 色婷婷99综合久久久精品 | 黄色免费在线观看 | 开心伊人 | 欧美高清3dfreexxxx性 | 夜本色 | 日本一区二区三区中文字幕 | 成人亚洲A片V一区二区三区婷婷 | 日日日bbb | 毛片999 | 日韩欧美一区二区视频 | 九九在线精品视频播放 | av片免费| 五月天婷婷在线视频 | jizzjizz丝袜老师 | 国产福利在线观看永久免费 | 精品不卡|