适于TriBA的面向对象程序设计语言对象消息机制研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
目前,面向对象编程语言已经成为主流的开发语言,完全独立的对象构成了应用程序;在单核处理器上对象只能依靠分时复用同一处理单元来实现交叉运行,而多内核处理器是内部具有多个处理器核的芯片,从物理上依靠多核分时复用实现对象并行运行,提高面向对象程序的运行效率。三多内核体系结构TriBA(Triple-based Architecture)是一种新颖的多内核处理器,直接支持面向对象语法和对象的并行运行,可以提高面向对象程序的运行效率。然而,现有的ANSI C++之类的面向对象语言都是采用函数来模拟模块间的通信,并没有直接支持消息传递机制。因此,提出面向对象模型的消息机制,具有广泛的理论和实践意义。
     本文将现有面向对象编程模型与面向对象的三多核处理器相结合,研究适于TriBA的对象消息机制;未来TriBA直接支撑该对象消息机制的实现,使对象在TriBA多内核处理器上并行处理。利用该对象消息机制,以贴近目标机器多核结构的方式编写程序,当程序结构和机器结构相近时,机器的能力将会被彻底挖掘出来。因为TriBA处理器目前还处于研究及开发阶段,所以即使设计出新的面向对象语言也无法在其上运行,以及目前面向对象语言都是采用函数来模拟模块间的通信,并没有直接支持消息传递机制。因此于现有面向对象程序设计语言的语法框架下,采用面向对象语言的封装、多态等机制,给出建立通用程序设计语言础上的对象消息机制;用户采用此对象消息机制可以进行面向对象软件开发,而该软件的最小组织结构单元为对象,这些对象未来将直接运行于TriBA的内核之上(TriBA本身硬件支撑对象消息),而目前运行面向对象程序所采用的是2种方式:其一是将面向对象程序翻译成面向过程的汇编语言,并采用函数调用(串行机制)模仿消息机制;其二是提供一个面向对象虚拟机(由软件模拟面向对象的机器,如Java虚拟机之类),然后在之上运行面向对象程序,以上两种方式导致面向对象程序运行效率比较低。因此本文采用ANSI C++、ANSI Java、ANSI C#、ANSI Python、ANSI Delphi面向对象程序设计语言,分别实现该对象消息机制,以此来验证该对象消息机制的可行性。
     于本研究的对象消息平台,采用事件驱动程序设计风格,可以进行应用软件开发,因此需要验证该对象消息机制的有效性。本文采用MFC中对象于该对象消息机制进行通信,以此来验证该对象消息机制的有效性。由于考虑到消息有不同的通信机制,主要分为阻塞消息和非阻塞消息,因此,本文也验证了非阻塞消息的有效性。实验结果表明,面向对象程序设计语言均支持该对象消息机制,这说明该对象消息机制是可行的。且该对象消息机制通过MFC对有效性的验证,说明该对象消息机制是有效的。本项目研究完成后,将TriBA底层的设计研究工作与TriBA对于软件开发的适用研究分离开来。
At present, object-oriented programming language (OOPL) has become the chief development language,The fully independent object forms the application program.On the single-core processor,the object can only realize the crossovers by the way of depending on the time sharing multiplex technology concerning the same treatment unit.However,the multi-core processor is a kind of chip that possesses multi-cores.Physically it adopts Multi-Core time sharing multiplex technology to achieve the parallel running of the object,in order to advance the operating efficiency of object-oriented program. Triba (Triple-based Architecture) is a new multi-core processor. It can directly support the parallel action of object-oriented grammar and object, so that it can advance the operating efficiency of object-oriented program. However, the ANSI object-oriented language at present has always employed the functions to imitate communications between modules without directly supporting message transmission mechanism. Since the multi-core synchronization processing needs communication, it is a profitable method to realize the parallelism through object-oriented programming model.
     Combining the object-oriented programming model at present with Triba (Triple-based Architecture), this thesis tries to study the message mechanism of the object-oriented mode based on Triba, this thesis will be also used in the realization of the object message mechanism to make the object do parallel processing in multi-core processor. By making the use of object message mechanism and programming in the way of pressing close to the multi-core structure of the target machine, the ability of the machine will be fully excavated when the structure of the program is close to that of the machine. For ont thing,the TriBA processor is still in its research and development stage,thus even there is the brand new designed object-oriented language,it can not operate on the TriBA processor. For the other,up to days,object-oriented language has always employed the functions to imitate communications between modules without directly supporting message transmission mechanism.So proposing the construction of object message mechanism based on generalized programming language by applying object-oriented mechanism such as encapsulation , polymorphism etc.under the grammer framework of object-oriented general programming language.Users can apply this mechanism to object-oriented software development.The smallest organization structur unit of this software is object which can be directly operated on core of TriBA in the future(the hardware in TriBA supports object message).At present,there are two ways to operator object-oriented program into process-oriented assembly languages and employ function call(serial mechanism) to imitate message mechanism.The other way is to offer a object-oriented virtual machine(using software to imitate the object-oriented machine,such as Java virtual machine),and then run object-oriented program based on it,so that it can reduce the operating efficiency of object-oriented program.. By using of the object-oriented programming languages ANSI C++、ANSI Java、ANSI C#、ANSI Python、ANSI Delphi, this thesis attempts to realize message mechanism of the object model individually to check the availability of this message mechanism.
     The object message platform in this study employs an event-driven programming style and can be used to conduct application sorfware development, so it neetd to check the efficiency of the message mechanism. Based on the message mechanism, this thesis studies the communication among the object modules through MFC, so that the efficiency of the message mechanism can be checked. Considering that the message has different communicating mechanism, chiefly block message and unblock message, this thesis also checks the availability and efficiency of the unblock message. The experiment result manifests that the object-oriented programming language supports the message mechanism, which approves that this message mechanism is available. Moreover, this message mechanism passed the check of the availability of the framework, which approves that this message mechanism is available.After finishing the present project,it is expected to separate the design research on the botton of TriBA from the adaptive research on TriBA based software development.
引文
[1]张民选,王永文等.高性能通用微处理器体系结构关键技术研究[J].计算机研究与发展,2006,43(6):987-992.
    [2] L Hammond, B A Nayfeh, K Olukotum. A Single-clip multiprocessor[J]. IEEE Computer,1997,30(9):79-85.
    [3] Brad Calder,Dirk Grunwald,Benjamin Zorn.Quantifying Behavioral Difference Between C and C++ programs.Journal of Programming Languages,VOL.2,NO.4,1994,313-351.
    [4] Mok Pak Lun,Anthony Fong,Gary K.W. Hau.Object-Oriented Processor Requirements with Instruction Analysis of Java Programs[J].ACM Sigarch Computer Architecture News,2003,pp.31(5):10-15.
    [5] Sun Microsystems, Inc. The Fortress Language Specification, Version 1.0, 2008. research. sun.com/projects/plrg/fortress.pdf.
    [6] IBM Inc. The X10 Programming Language. http://domino.research.ibm.com/ comm/ research_projects.nsf/pages/x10.index.html.
    [7] Bradford L. Chamberlain, David Callahan, Hans P. Zima. Parallel Programmability and the Chapel Language. International Journal of High Performance Computing Applications[J]. USA IEEE Computer Society Press, 2007, 21(3): 291-312.
    [8] Stephen S. PROOF: a parallel object-oriented functional computation model. Journal of Parallel and Distributed Computing[J], USA IEEE Computer Society Press, 1991, 12(3):202-212.
    [9] http://www.erlang.org.
    [10] Grimshaw A. S.,Easy-to-Use object-oriented parallel processing with Mentat[C]. IEEE Computer Society Press, 1993, 26(5): 39-51.
    [11] Gannon D., Yang S. X., Beckman P. User guide for a portable parallel C++ programming system: pC++[R]. Technical Report, Indiann University, 1994.
    [12] Carlin P., Chundy M., Kesselman C. The CC++ language definition. Http:globus.isi.edu/ccpp/.
    [13] Diwan S., Johnson E.,Gannon D. HPC++ and the Europa call reification model. ACM Applied Computing Review[J], 1996, 4(1):251-269.
    [14] Chien A, Dolby J., Ganguly B, et al. Supporting high level programming with high performance : the Illinois concert system[A]. In: Proceedings of the 2nd International Workshop on High-Level Parallel Programming Models and Supportive Environments[C].USA ACM Press, 1997:147-162.
    [15]于勐,臧婉瑜,谢立,过敏意.并行面向对象语言综述,软件学报[J],12(6),2001:822-829.
    [16] OpenMP Architecture Review Board: OpenMP Application Program Interface. Version 2.5 edn. 2005.
    [17]武浩.于消息传递系统的多线程并发对象模型. 2004
    [18] NASSER GIACAMAN and OLIVER SINNEN. Parallel iterator for parallelizing object oriented applications[A], In: Proceedings of 14th IEEE Internatinal Conference on Parallel and Distributed Systems[C], IEEE Computer Society Press ,2008:113-120.
    [19] E. Johnson and D. Gannon, HPC++: experiments with the parallel standard template library[A], In: Proceedings of the 11th international conference on Supercomputing[C], USA ACM Press, 1997:124-131.
    [20] P. An, A. Jula, S. Rus etc. STAPL : An adaptive, generic parallel programming library for C++[A], In Workshop on Languages and Compilers for parallel Computing(C), USA ACM Press,2001:86-93
    [21] http://api.kde.org/4.0-api/kdelibs-apidocs/threadweaver/html/index.html.
    [22]刘梦晓.基三体系结构存储系统相关问题的研究[D].北京:北京理工大学.2010.
    [23] David Robson. Object-oriented Software Systems[J]. In Tutorial:Object-Oriented Computing, volume 1:Concepts. IEEE Computer Society Press,Byte,1981,PP.5-8,6(8):74-86.
    [24]冯玉琳,黄涛,倪彬.对象技术导论[M].北京:科学出版社,1998.3.
    [25] Xuli Liu. Exploiting Object-Based Parallelism on Multi-Core Multi-Processor Clusters. Eighth International Conference on Parallel and Distributed Computing, Applications and Technologies[C], USA ACM Press,2007:78-89.
    [26]尚亚灵,袁道华,丁莹,曾祥洪.消息传递机制的比较及其最新发展,计算机工程与设计,2007.5.
    [27]魏兵海.若干发展的消息传递界面:PVMPI,IMPI与FT-MPI[J].计算机科学,2004,31(3):161-162.
    [28] Mauro Migliardi, Dawid Kurzymiec, Vaidy Sunderam. Standards based metacomputing. The design of hamess II[R]. Ft Lauderdate, Florida,USA:11th Heterogeneous Computing Workshop,2002.
    [29] Edgar Gabriel,Graham E Fagg, George Bosilca,et al. Open MPI:Goals, concept and design of a next generation MPI implementation[C]. Budapest, Hungary:Euro PVMPI Proceedings,2004.
    [30] Ian Foster,Nicholas T Karonis. A grid-enabled MPI:message passing in heterogeneous distributed computing systems[C].NJ, USA:Proceedings SC 98 IEEE Press:Piscataway,1999.
    [31]左琦,石峰,刘彩霞.一种支持高级语言部分语句功能的处理器指令集[P],申请号:200810100863.0,2008.2
    [32]计卫星.三多内核体系结构关键技术研究[D].北京:北京理工大学.2008.
    [33]申俊,郑纬民,鞠大鹏.FMP:一种适用于机群系统的快速消息传递机制,计算机学报,1998,7.
    [34] Agha G. Actors:a model of concurrent computation in distributed systems.Cambridge,MA USA:MIT Press,1986,10-122
    [35] D. Caromel, Toward a Method of Object-Oriented Concurrent Programming.Communications of the ACM,1993.36(9):46-87.
    [36] O Nierstrasz. Active Objects in Hybrid. ACM SIGPLAN Notices,1987,22(12):243-253.
    [37] Algorithms for the Space and Time Efficiency in Parallel Compacting Garbage Collectors Collectons||,shao shan Liu, Ligang Wang, Xiao-Feng Li, and Jean-Luc Gaudiot,Proceedings of the ACM International Conference on Computing Frontiers (CF2009), Ischia, Italy,May 18-20,2009.
    [38]石峰,计卫星,乔保军.一种新的非冯.诺依曼计算机体系结构TriBA[J].北京理工大学学报,2006,26(10):847-849.
    [39] Feng Shi,Weixing Ji,Baojun Qiao.A triplet based computer architecture supporting parallel object computing[C].IEEE 18th International Conference on Application-specific Systems,Architectures and Processors, Montreal, Quebec, Canada:IEEE Computer Society Press,2007:192-197.
    [40] Sivarama P. Dandamudi. Hierarchical Interconnection Networks for Multicomputer Systems[J].IEEE Transactions on Computers,1990.39(6):786-797.
    [41] Weixing Ji, Feng Shi, Baojun Qiao,et al. The Design of a Novel Object-oriented Processor: OOMIPS[C].IEEE International Conference on Application-specific Systems, Architectures and Processors(ASAP), IEEE, 2007.
    [42]刘滨,石峰.三分层互连网络中负载平衡的研究与仿真[J]. 2006,18(2):781-784

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700