节点文献

分布式信号通信系统的设计与实现

The Design and Implementation of Distributed Signal Communication System

【作者】 王云鹏

【导师】 徐高潮;

【作者基本信息】 吉林大学 , 软件工程, 2005, 硕士

【摘要】 目前,随着网络应用的日益广泛,分布式系统得到了迅速发展。作为分布式系统实现的基础—进程间通信也就起着越来越重要的作用。然而Linux 操作系统支持的套接字(Socket)通信方式,使用复杂,代码量大,而且不能满足分布式系统对于透明性的需求。现存的RPC 与RMI系统,提供了可以保证透明性的分布式进程通信机制,但其价格昂贵,需要另行安装,还要求程序员对新的进程通信机制进行学习。本文首先介绍了Linux 系统提供的进程通信方式。之后对新的分布式信号通信系统提出要求:具有与单机内进程通信机制相似的调用接口,满足分布式系统对透明性的要求。接下来我们以此为依据,确定了分布式信号通信系统的体系结构模型。本系统由名字服务器与用户节点组件构成。名字服务器负责提供包括注册、注销和查询在内的名字服务,为用户提供全局唯一的名字—分布式进程号pid_d,以保证分布式系统的透明性。用户节点组件采用并发服务器结构,由守护进程负责接收用户请求,并根据请求类型创建合适的子进程来处理该请求。在设计的基础之上我们实现了分布式信号通信系统。最后,通过测试,我们得出:分布式信号通信系统可以稳定的工作,其速度比套接字方式略有下降,但比较接近,新系统满足了分布式系统的透明性要求,并具有与单机内信号通信相似的用户调用接口,从而降低了用户编写网络通信程序的复杂度。分布式信号通信系统可以作为大型分布式系统的一部分提供信号服务,也可以单独满足网络通信中不同节点上的进程发送信号的需求。本系统为分布式系统的实现提供了理论和实践上的基础,具有重要的理论意义和实用价值。

【Abstract】 Nowadays, along with the development of software, hardware, andnetwork techniques, distributed system has been used in many fields for itsadvantage in extensibility, transparency, reliability and the ratio ofperformance to price. Distributed system is actually executing by a group ofprocesses, which distribute in different nodes in the network and cooperatewith each other, these processes accomplish the operations ofsynchronization, mutex, and data transport, through IPC (Inter ProcessCommunication). IPC is the foundation of the implementation of distributedsystem. By the increment of scale and complexity of network application,the frequency of transport between processes in different nodes has beengetting higher and higher. The codes about network transport in programhave been becoming more and more, this leads to the result that the processcommunication mechanism is becoming more important.Linux system provides several process communication mechanisms; itcan be classified into two kinds: process communication in one node, andprocess communication in network environment. Process communication inone node includes: signal, pipe and FIFO, shared memory, message queueetc. Process communication in network environment only includes socket.There are still other distributed process communication systems, as RPCand RMI.Socket is very complicated to use, not only because that there are manyreduplicate codes to be written, but also brings trouble to the maintenance.On the other side, socket method needs IP address and port number to buildTCP link, or send UDP message, so the transparency can’t be matched.If we want to use RPC or RMI system, we should install it additionally.The system needs high performance hardwares and we must pay for thecommunication system. The programmers also have to learn new transportmechanism and how to use the transport system. RPC and RMI system arefit for large scale enterprise application system.So we need a new communication mechanism, which should havesimple C interfaces just like the interfaces of process communication in asingle node, and guarantee the transparency of distributed system.In the paper, we firstly introduced the concept of distributed system,the signal process communication mechanism, and Socket mechanism.Then we define the requirement of our system, that is: support the processcommunication between different nodes, ensure the transparence ofdistributed system, define C interface to the user. Our system is workingbetween transport layer and application layer. The system is comprised ofName Server and module in user’s node. The Name Server provides nameservice for the whole system, includes: register, log out, and name query.Every user process should register itself before it becomes the user of oursystem. The system will allocate an exclusive name, we call it distributedprocess number—pid_d. Distributed process number is the exclusiveidentifier of user process in distributed signal communication system. Whenthe user process terminates from our system, it should log out from thesystem and free the system resources—pid_d. User process send signal tothe destination process by calling the kill_d( ) function, which take pid_d asparameter. Function kill_d( ) has the similar parameters list like kill( ), onlyreplace pid with pid_d, pid_d hides the information about the actual locationof process, and guarantees transparency of distributed system. User modulesare responsible for receiving users’requests, and provide actually signalsending service. The whole communication procedure is: user processregister itself first, then call the kill_d( ) function to send signal. The systemqueries the IP address and port number to Name Server by the pid_d. Afterreceiving the response from Name Server, the local module encodes the pidof destination process and signal value, then sends it to the destination node.And the module on the destination node calls kill( ) to send the signal todestination process. At last, when exit from our system, the user processexecutes log out operation.The task of Name Server is finished by NS_daemon, it maintains a linklist—NS_table, every item in the NS_table records user processes’information, includes pid_d, IP and pid. The register, log out, and queryrequest operations, are changed into corresponding link list operations:insert, delete, and search. The user module adopts concurrency serverstructure, a daemon process is responsible for receiving users’requests, andtransmits them to corresponding child process. The child processes include:supb_reg, subp_ureg, subp_kill, subp_remote. Subp_reg and Subp_uregtransport the user requests to NS_daemon. Subp_kill encodes encodes andtransports user request to the target node. Subp_remote calls function kill( )to send signal to the target process.At the last of this paper, we implement the distributed signalcommunication system, and test the new system. According to the result oftest, we conclude that the speed of transport is close to socket mechanism,

  • 【网络出版投稿人】 吉林大学
  • 【网络出版年期】2005年 06期
  • 【分类号】TP393.09
  • 【被引频次】3
  • 【下载频次】210
节点文献中: 

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

本文的引文网络