节点文献

适于TriBA的面向对象程序设计语言对象消息机制研究

Research on the Object Message Mechanism of Object-oriented Programming Language for TriBA

【作者】 宫兆汉

【导师】 石峰;

【作者基本信息】 北京理工大学 , 计算机科学与技术, 2011, 硕士

【摘要】 目前,面向对象编程语言已经成为主流的开发语言,完全独立的对象构成了应用程序;在单核处理器上对象只能依靠分时复用同一处理单元来实现交叉运行,而多内核处理器是内部具有多个处理器核的芯片,从物理上依靠多核分时复用实现对象并行运行,提高面向对象程序的运行效率。基三多内核体系结构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对于软件开发的适用研究分离开来。

【Abstract】 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.

  • 【分类号】TP311.1
  • 【下载频次】44
节点文献中: 

本文链接的文献网络图示:

本文的引文网络