Font Size: a A A

The Design And Implementation Of Distributed Signal Communication System

Posted on:2006-03-24Degree:MasterType:Thesis
Country:ChinaCandidate:Y P WangFull Text:PDF
GTID:2168360155954424Subject:Software engineering
Abstract/Summary:PDF Full Text Request
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,...
Keywords/Search Tags:Implementation
PDF Full Text Request
Related items