中国科学院软件研究所机构知识库
Advanced  
ISCAS OpenIR  > 中科院软件所  > 中科院软件所
题名:
对象总线技术分析与原型系统实现
作者: 邵丹华
答辩日期: 1997
专业: 计算机软件
授予单位: 中国科学院软件研究所
授予地点: 中国科学院软件研究所
学位: 博士
关键词: 分布计算 ; 对象 ; 请求 ; 分布对象总线 ; 线程
摘要: 近几年来,随着软件、硬件,特别是网络技术的迅猛发展,分布式计算的应用范围越来越广。分布式计算从最初的数据上的互连发展为基于过程的互操作。但是,过程模型很难对分布的资源作出恰当的描述。而在软件发展过程中,对象技术的程序设计语言、数据库等多个领域都发挥着重要的作用。推广了的对象模型具有封装、抽象、多态等特点,非常适合于描述分布资源,因此,产生了分布对象计算。OMG的OMA/CORBA规范就是一种分布对象的计算标准。但是,它们对于分布对象计算中的核心—对象总线ORB的实现机制却没有介绍。而在实际的分布对象系统中,ORB发挥着极其重要的作用。从ORB所处的位置来看:它不仅要为上层的程序设计提供服务,而且还要与下层的操作系统和网络甚至硬件设备打交道,其中主要的异构平台上数据表示的差异以及网络中各站点之间的数据传递。因此,ORB的实现与这几方面都密切相关。从结构上来看,ORB所支持的是一种总线形式的框架结构,为所支持的对象提供公共的通信接口。作为中介,它负责client和server之间的通信。而在分布系统中,通信部分性能的好坏是直接影响整个系统效率高低的关键因素。而且ORB所传递的不是简单的关于数据或是过程的访问而是对象请求,而目前很少有直接支持对象访问的通信方式,对象通信只能通过其它手段直接地实现,这样,ORB对实现方法的选择和设计就显得更为重要了。因此,有必要对ORB的具体实现机制加以讨论。ORBPRO就是对象总线的一个原型系统。在参考了CORBA规范,以及已有的分布计算技术和对象技术之后,我设计并实现了ORBPRO原型系统。在ORBPRO中,为了支持局域网环境下,异构平台上的分布式的面向对象的程序设计,在实现中采用了分层的ORB Lib:简单名字服务层、请求服务层、数据转换层和网络接口层。其中,简单名字服务层负责server的从名字到地址的映射,为用户提供位置上的透明性;请求服务层负责请求的构造,包括请求的初始化、参数的输入输出、发送和响应接收;数据转换层负责本地的数据表示与标准数据表示之间的转换;网络接口层负责通过底层的网络接口进行通信。对于server,ORBPRO采用了共享式的类server模型。类server是指类与server一一对应:一个类对应与一个server,而一个server也只包括一个类对象及其实例对象。在类server中,由类对象负责实例对象的管理工作,这些是由类对象中定义的类数据和类方法来实现的。同时,同属于一个类的对象共享方法的实现,类对象和实例对象同在一个地址空间内,便于实现上的共享。对于为server提供ORB服务的适配器,在ORBPRO中被设计为独立的进程。它负责server注册、激活、对象引用等的管理。与库函数式适配器相比,进程式适配器可以始终处于活动状态,等待client的请求,并在需要的时候激活server。这样,就屏蔽了server的状态,有利于提高分布对象系统的透明性。由于适配器需要和client和server两方面打交道。一方面要把请求传递给server,另一方面也要管理server(比如激活server),而适配器本身又是以多线程方式运行的,所以,这两个方面可能同时访问同一个server。因此,在适配器中为server设置了状态信息,采用了条件变量方法来同步对server的访问。由于在分布式系统中多请求的并行处理能力是必不可少的。server、适配器都面临着如何避免在同时处理多个请求时发生阻塞的问题。线程是编写高效并行程序的有力的手段。一个线程是在所属进程内的一个语句执行序列。同一个进程内的各个线程对于代码段、静态数据区和堆是共享的,而指令计数器、栈、通用寄存器是各个线程所私有的。与进程相比,线程在创建、切换等方面的代价要小得多。目前,很多的操作系统都提供了线程机制。因此,在ORBPRO的中采用了多线程来支持适配器和server对于多请求的并行处理。而请求与响应线程之间的对应关系上也是多种多样的。在实现中采用的是最基本请求/响应模型:主线程负责侦听请求,并为每个请求创建一个响应线程。
英文摘要: Recently, with the development of software, hardware, especially in the area of networking, the application of Distributed Computing becomes more and more pervasive, and its focus is also shifting from interconnectivity to interoperability. However, traditional procedural models are inadequate for describing distributed resources, so some other models are needed. Object Technology is a dominant technology in the area of Programming Language, Database, etc. The characteristics of the extended object model are encapsulation, abstraction and polymorphism. They are all well suited to describe the distributed resources. So the area of Distributed Object Computing come into being. OMG's OMA/CORBA is the standard for Distributed Object Computing. But in it there is no description for the implementation of ORB (the object bus) - the heart of Distributed Object Computing. The object bus is very important, and determines the performance of the whole system. It stays at the middle layer of the architecture: it provides uniform services for the applications in the upper layer and encapsulates the heterogeneous OS and network interfaces and data representation of the lower layer. So the implementation of ORB is closely related to the two layers. As the communication bus, ORB provides interoperation between client and server. The communication mechanism directly affects the distributed computing. The messages transferred by the ORB are the requests to objects, not to database or to remote procedures. So it is absolutely necessary to study the implementation of the object bus. ORBPRO is just such a prototype system for the distributed object bus. With references of CORBA specification, and technologies applied in the distributed computing and O-O fields, I have designed and implemented ORBPRO prototype system. The ORB Lib of the ORBPRO provides communication and data representation service for distributed objects. It has four layer: simple name service layer, request service layer, data representation layer and network interface layer. The simple name service layer provides the mapping for the servers: from name to address. The request service layer provides the construction of a request, which includes the request initialization, inputting and outputting of the arguments, request sending, etc. The data representation layer provides the transformation between local data representation and standard data representation - XDR. The network interface provides the lower layer network communication service. In ORBPRO, the object implementation is a shared class-server. In the class-server, there are only one class object and many instance objects belonging to the class. The class object has class data and class method, and manages all the instances objects in the server. The instance objects reply the requests from clients, and they share the object implementation in the server. The adaptors in ORBPRO are all independent processes. It provides the registration, activation, and object reference generation for servers. The adaptors processes are always activated, waiting for the request form client, and will activate the server when necessary. So it provides a transparent server activation mechanism for clients. The adaptors will interact with clients and servers: it passes the requests to the servers and manages the servers(eg. activation). So, in the adaptor, there are condition variables for synchronizing accesses to servers. The adaptor and servers and needed to handle requests concurrently. So they are all implemented in multi-thread to improve the efficiency. In a multi-threaded process, each thread independently uses its own stack space and register resources, periodically synchronizing with each other and sharing the heap- and static-data process resources as necessary. Multi-threading provides a more elegant, and potentially more efficient, means than multi-processing. By now, most OS provide the thread mechanism. There are a number of different models for concurrent multi-threaded servers. In ORBPRO, the adaptor and servers are implemented in the thread-per-request model. In this model, the server handles each request from a client in a separate thread of control.
语种: 中文
内容类型: 学位论文
URI标识: http://ir.iscas.ac.cn/handle/311060/7610
Appears in Collections:中科院软件所

Files in This Item:
File Name/ File Size Content Type Version Access License
N98818.pdf(2834KB)----限制开放-- 联系获取全文

Recommended Citation:
邵丹华. 对象总线技术分析与原型系统实现[D]. 中国科学院软件研究所. 中国科学院软件研究所. 1997-01-01.
Service
Recommend this item
Sava as my favorate item
Show this item's statistics
Export Endnote File
Google Scholar
Similar articles in Google Scholar
[邵丹华]'s Articles
CSDL cross search
Similar articles in CSDL Cross Search
[邵丹华]‘s Articles
Related Copyright Policies
Null
Social Bookmarking
Add to CiteULike Add to Connotea Add to Del.icio.us Add to Digg Add to Reddit
所有评论 (0)
暂无评论
 
评注功能仅针对注册用户开放,请您登录
您对该条目有什么异议,请填写以下表单,管理员会尽快联系您。
内 容:
Email:  *
单位:
验证码:   刷新
您在IR的使用过程中有什么好的想法或者建议可以反馈给我们。
标 题:
 *
内 容:
Email:  *
验证码:   刷新

Items in IR are protected by copyright, with all rights reserved, unless otherwise indicated.

 

 

Valid XHTML 1.0!
Copyright © 2007-2017  中国科学院软件研究所 - Feedback
Powered by CSpace