Autor Wiadomość
yxfbbiedtj
PostWysłany: Pią 8:45, 01 Kwi 2011    Temat postu: LX_PVM distributed multi-threaded communication li

LX_PVM distributed multi-threaded communication library implementation technology


The service line to the message thread will monitor the arrival. Get the message header from the target thread punctuation, to obtain the true object of communication. The target thread in the use of Lxpyret'gC'U () to receive communication message, will call pthread () ∞ wai () hangs on a condition variable. When the service identified the target thread thread is called after the pthreadcormsignal () wake up the target thread, while lack of will receive ~: one or two entries in the active buffer in the note, the thread receiving thread suspend and wake-up condition of service for each variable is thread only. It is in the service thread is created or predefined state distribution of this can prevent multiple threads receiving messages caused confusion after receiving service thread will wait on a condition variable until the target thread Lxpyre () end of the process. This processing step is to prevent the target thread is not finished when receiving a message arrives there, leading to message loss. In short, in order to identify the thread-level communications, LPVM library construct some special data structure, including the active buffer table, the parent thread variables. And produced a background service thread. The service thread running in LPVM occupies a vital position. Summing up the above process, the service thread's process as shown in Figure 4: pmlr ~ fid () P registration process pyreprobe () 『t side - x of a data message Shuai cm () and start extracting the target thread number thread name lpthteadcreate () starts l Father of the target thread thread number assigned set IpyrekrId () returns the thread identifier is activated extract the target thread number lpfl ~ aeadd pay () wake-up the corresponding target thread fpthread head 1dwait (1 waiting for the target thread rhyme LXpyrere () end of the performance analysis of Figure l4 4 Since the LxP Ⅵ Ⅵ library is built on the P Ⅵ Ⅵ and pthread library on high-level library, rather than direct implementation, and therefore the performance will be lost, mainly in the following two aspects: 1. The new data structure takes a certain user space, which is due to ensure the thread-level communication and established data structures, such as an active buffer table, etc., will occupy part of the memory, so the user's physical space is smaller .2. LXpvm in the use of arsenic, LXpvmsend, LXpyre measured, have the following results: Total No. 38 Xin Lu: LXPVM distributed multi-threaded communication library implementation technology to receive 64B128B256B512B1024B line 37 l32141 library, combined with the pthread library implements thread communication. Lx-P Ⅵ set in the use of libraries with basically the same set P Ⅵ. Although a loss in performance, but it implements features greatly facilitate the users. and than inter-process communication library, the thread switching overhead, can largely compensate for the loss. In skyu ~ k parallel file system, the communication library to support communication between multiple threads provide a good support. But the LX-P Ⅵ set currently only provides some basic functions,herve leger uk, and its efforts to improve to be the next step.

Powered by phpBB © 2001, 2005 phpBB Group