标题: | 多核心系统上动态优化及耗电管理的研究 Dynamic Optimization and Power Management on Multi-Core Based Systems |
作者: | 徐慰中 Hsu Wei Chung 国立交通大学资讯工程学系(所) |
关键字: | 多核心处理器;帮手绪;投机绪;动态优化系统;编译器;虚拟机器;Multi-core processor;helper thread;speculative thread;compiler;virtual machines |
公开日期: | 2010 |
摘要: | 多核心多执行绪的处理器己是市场主流. 这些处理器除了核心与核心沟通快速, 同步便捷之外, 还有一个特性, 就是资源共享. 譬如说数个核心可以共用一个L3快取记忆体. 其他许多较昂贵的芯片内资源, 也都可以让多个核心来共用. 资源共享, 提升了多核心处理器的功效, 也提供了许多最佳化的新机会. 举例来说, 利用帮手绪(Helper Thread) 或是投机绪(Speculative Thread) 可以将所需使用的资料提早拿进共用的快取记忆体, 有效地减少资料获取所花费的时间. 然而这些新的优化机会和因为资源共享而造成的资源竞争,使得传统的编译器优化束手缚脚, 难以使力. 因为在芯片上的资源竞争, 通常是动态的. 编译器所预估的情形也许在执行时己大不相同, 所以在多核心多执行绪的处理器上,许多优化应该配合实际执行时的情况来决定该如何进行. 如何有效地善用多核心多执行绪芯片上的资源, 是系统研究上一大挑战. 这需要硬体, 作业系统, 编译器, 多方面的配合. 从程式码优化这角度来看, 我们计划延伸过去数年设计开发的动态优化系统ADORE来因应多核心多执行绪处理器上优化的挑战. ADORE原本是设计开发在Intel Itanium系列机器上. 后来应Sun Microsystem要求, 被移植到SPARC平台的UltraSparc IV+上. UltraSparc IV+是早期的多核心处理器. ADORE/SPARC可以自动在程式执行时生成帮手绪(Helper Thread), 而帮手绪可在另一个核心上执行, 替主绪(Main Thread) 预先将需要的资料拿进共用的快取记忆体. 在Itanium 和SPARC这两个商业平台上, ADORE动态优化都能呈现明显的功能增进. 为了可以对付更多在多核心多执行绪处理器上的应用程式(如OpenMP, MPI 一类), 我们更进一步设计与实作了COBRA系统, 对执行程式中每一个绪进行监督观测. 依照整体系统的资源使用情况, 搭配每一绪的执行资料来拟定最有效的功能优化或省电策略. 以单核心的动态优化系统ADORE为基础, 以多核心平台上的COBRA为辅助, 我们计划进行在多核心多执行绪处理器上对可调适监测, 动态执行状况收录, 和程式码动态优化的研究. 特别值得注意的项目包括(A) 如何使原本在单核心上的应用程式在多核心环境下获利, (B) 如何使原本己多绪化的应用程式能在新的多核心环境下充分发挥, (C) 如何从计算机架构, 编译器, 虚拟机器, 各方面来支援在多核心多执行绪处理器上更有效, 更可靠的动态优化管理系统 Summary As the increase of clock rate becomes increasingly difficult due to the power and other considerations, many modern high-performance microprocessor chips are moving to Multi-core and/or Chip Multi-Threading (CMT). The common features on these processors are resource sharing as well as low communication and synchronization latency. While such features create many opportunities for new optimizations to improve performance (such as helper threads and speculative threads generation), they also pose a significant challenge to compilers because the effectiveness of many such optimizations depend heavily on the conditions at runtime. Very often, the conditions manifested at runtime would differ greatly from what the static compiler has assumed, and the performance of its optimized code would suffer accordingly. With dynamically deployed optimizations at runtime, the applications could avoid such constraints and be more adaptable to the changing execution conditions. Efficient and Effective management of the shared resources in multi-core systems has emerged as one of the key challenges for systems research. We propose to extend our existing dynamic compiler framework that has been successfully targeting application binaries to single-core processors, called ADORE, to the new Multi-core/CMT processors. ADORE has been implemented on two commercially available platforms: ADORE/Itanium and ADORE/Sparc. Both systems are fully functional and have shown significant performance improvement on real-world applications. ADORE/Sparc could also generate helper threads on-the-fly to assist the execution of main thread on SPARC Multi-cores (e.g. Panther) with shared caches. In order to handle a larger class of applications, such as multiprocessed programs with OpenMP, on existing and future Multi-core/CMT processors, we have further designed and implemented the COBRA framework that adds a layer on top of ADORE to handle applications running on multiple cores. COBRA continuously collects and accumulates execution profiles from application binaries, and uses off-line analyses and optimizations to improve the adaptability of applications. As it focuses on parallel and multi-threaded applications, it needs to aggregate and correlate the execution profiles collected from different threads running on different cores to extract the necessary information for dynamic optimizations. With the integrated COBRA/ADORE framework, we propose to study adaptive monitoring, profiling, and dynamic optimization on the latest and future Multi-core/CMT processors. In particular, we propose to research on A) strategies to optimize single-core applications running on Multi-core/CMT processors, B) strategies to adapt multi-core applications running on Multi-core/CMT processors, and C) architectural and compiler support (such as compile-time annotation) needed for adaptive dynamic optimization systems. |
官方说明文件#: | NSC99-2218-E009-008-MY2 |
URI: | http://hdl.handle.net/11536/99872 https://www.grb.gov.tw/search/planDetail?id=2016270&docId=330255 |
显示于类别: | Research Plans |