Font Size: a A A

The Implementation Of Distributed Shared Memory Based On Multithread

Posted on:2008-07-10Degree:MasterType:Thesis
Country:ChinaCandidate:S LiFull Text:PDF
GTID:2178360212496834Subject:Computer system architecture
Abstract/Summary:PDF Full Text Request
In this thesis, we present the design and implementation of a distributed shared memory (DSM) system. The designing goal of the DSM system is to transplant easily, good usability and high scalability. To transplant easily, the DSM system is implemented upon the LINUX kernel. To get good usability, the DSM system gives a set of user interface functions same as that given by the LINUX shared memory mechanism. To get high scalability, the DSM system uses multi-thread technology, multicast technology and absorbs the software pipeline ideas.The basic design aim of this system is that we will build a system which can be easily replanted ,operate easily and extended based on the LINUX system. Totally we hope to design a distributed shared memory that provides a communicating method based on shared memory for two processes in different machines ,this method is as same as shared memory of two processes in single LINUX system.The purpose of our design is that the programmer can implement IPC in different nodes using traditional IPC of the same point. However we do not care if the communicating process is in the same point,;it implements clarity in position and visit.At the same time, we can use the new distributed IPC system to modify the original combined program in single Unix system;even we do not modify at all and it can carry out in distributed system. Thus we need not program repeatedly in order to transplant the program in single machine to the distributed system, finally simplify the transition from the single to the distributed system.First we present the differences between the DSM system and the message-passing system, the differences between the DSMsystem and the remote procedure call system, the differences between the DSM system and the closely-coupled multiprocessor system, and point out the advantages of the DSM system such as the good scalability and easy to program compared with the other systems. In this chapter, we also give the main problems which must be solved in designing and implementing the DSM systems and present some basic methods which can be used to solve the problems.Then we give some basic technologies must be known while designing the DSM system, the technologies include the LINUX shared memory communication mechanism, the LINUX message queue communication mechanism and so on. We design the client interface function and the client interface function is basically the same as the shared memory function in LINUX .We also design the segment structure of the DSM, the system structure, the administrator structure of DSM. The administrator is multi-thread, and different thread deals with the task of the client process steamily.Then explaining the process of the system implementation , the most important problem we need to think is that what technology we use can we have good performance. To get good performance, the DSM system must satisfy the two following conditions. The first, the control mechanism of the DSM system should consume the less CPU time as far as possible. The second, the number of control messages between different nodes should be less as possible. In our DSM system, all the threads in the manager process are task-driven, when no task they are sleep. Once a new task arrives, the related thread is waken up automatically. Because all the threads no need to check if there is a new arrival task, so they consume very less CPU time. In the process of the implementation, we do some careful designing works for the message types and message functions to ensure that the most messages among different nodes are multicast messages, only verylittle messages are point-to-point messages. By the advantages of the multicast communications, we can greatly decrease the number of messages passing through the network. In our DSM system, we implemented a set of user interface functions, the syntax and the semantics of the functions are the same as which of the user interface functions in LINUX shared memory mechanism. It is very easy to use these functions for the user who well knows the LINUX shared memory mechanism. In our DSM system, we also give a lock mechanism to users, by using the lock mechanism, we can lock a variable range of data in a distributed shared memory segment. We integrate weak consistent semantics and delayed write-and-update consistent protocol into the lock mechanism, so by using the lock mechanism, the user can design and implement an application which can be run efficiently with a highly parallel style. In this chapter, we show the design details of the message types and the message functions, and also give the implementation details of the user interface functions and the distributed shared memory manager.Next, we describe the execution procedures of the following typical applications in detail, such as the creation of a shared memory segment, the attaching a shared memory segment to an application, the detaching a shared memory segment from an application, the locking/unlocking a data block and the deleting a shared memory segment. By the description, the functions of the DSM system and the technologies of the DSM system implementation are shown clearly.The multithread programming can reduce the transmission numbers of the message in Internet, so it make the amount of messages of every node receives and disposes irrespective to the amount of the system, and it only has connected with the amount of producing processes of every point. On the other hand, the multithread programming can reduce update and delay of multi-copy data, make it equal with the single.In the single administrator ,once there is a request, the whole administrator will serve for the quest ,other request will be delayed until the request can be finished by the service. In multi-process administrators, the CPU pays out very large expense, the administrator processes can not easily share the information. Using the multi-thread administrators, multi-threads each other can share the data very easily.In this chapter, the major jobs are to analyze the consistent protocols in our DSM system, the implementation algorithms in our DSM system, and the methods to solve the main problems related to our DSM system design and implementation, we also analyze how these factors affect the whole system performance. Finally, we point out the technologies to improve the whole system performance which we adopted, these technologies are: the multicast technology, the variable lock range technology, the static distributed management technology, the delayed write-update policy, the multithread programming and the software pipeline technology.
Keywords/Search Tags:Implementation
PDF Full Text Request
Related items