Electrical computers and digital processing systems: interprogra – Interprogram communication using message
Reexamination Certificate
1999-10-14
2004-07-20
An, Meng-Al T. (Department: 2126)
Electrical computers and digital processing systems: interprogra
Interprogram communication using message
C718S102000
Reexamination Certificate
active
06766517
ABSTRACT:
FIELD OF THE INVENTION
The invention relates generally to the field of digital computer systems, and more particularly to systems and methods for facilitating inter-process communications using message passing communication methodologies. The invention specifically provides systems and methods facilitating inter-process communications among processes using message passing methodologies, in a thread-safe manner.
BACKGROUND OF THE INVENTION
Computers typically execute programs in one or more processes, each of which comprises one or more threads. Generally, a process will have an associated address space, which is separate and apart from address-spaces associated with other processes. Since each process has its own address space, the likelihood that a process's program code, data and data structures associated with the process will be corrupted by processing operations in connection with other processes will be minimized. On the other hand, all of the threads in a respective process will share the same address space, which can lead to problems. For example, since all threads in a process share the same address space, each thread can access program code, data and data structures associated with other threads, and care needs to be taken to regulate such access.
In a number of applications, threads in various processes need to communicate to either obtain data from threads in other processes, or to transmit data to threads in other processes. To accommodate such communication, various communication methodologies have been developed. In one such communication methodology, known as “message passing,” a thread in one process can, as a source thread, transmit a message to a thread in another process, as a destination process, using messages containing the data to be transferred. One popular message passing mechanism, referred to as “MPI” (“Message Passing Interface”), provides a message passing arrangement to facilitate transfer of messages among threads in respective processes. Several MPI specifications define an interface that threads can use to make use of an MPI message passing arrangement.
A number of problems arise in connection with communication among threads in respective processes using message passing mechanisms such as those defined by the MPI specifications. Generally, to ensure that, when a “source” thread in one process is to send a message to a “destination” thread in another process, each thread uses locking functions, such as the “mutex” (“mutual exclusion”) functions available in the Unix operating system, to protect the message passing operation and ensure that it operates in a “thread-safe” manner. In particular, the source thread uses the mutex function to ensure that no other thread in its process attempts to send a message while it is engaged in performing the MPI calls required to initiate the message passing operation. In addition, the destination thread uses the mutex function to ensure that no other thread in its process will be attempting to receive a message while it (that is, the destination thread) is attempting to do so, which might result in the other thread erroneously receiving the message directed to the destination thread. However, serializing receive operations using mutexes in such a manner can cause deadlock problems since it prevents the other threads in the destination thread's process from receiving and processing incoming messages.
Another problem arises in connection with collective operations such as, for example, broadcast, barrier synchronization, and reduction operations described in U.S. patent application Ser. No. 09/303,465, filed Apr. 30, 1999, in the name of Rolf H. vandeVaart, et al., entitled System And Method For Facilitating Communication Among A Plurality Of Processes In A Digital Computer System, (hereinafter, “the vandeVaart application”) assigned to the assignee of the present application and incorporated by reference. Generally, in collective operations such as those described in the vandeVaart application, one thread in each of a plurality of processes will be engaged in the collective operation, and may be transmitting messages to threads in other processes and/or receiving messages from threads in other processes. In a collective operation, the individual messages transmitted between threads in the respective processes are typically “point-to-point” messages, similar to the messages transmitted between threads in respective processes in a non-collective message passing operation. In a collective operation, a considerable amount of coordination is required as among the threads in the processes that are to be engaged in the collective operation. In addition, collective operations need to be given a higher priority than non-collective message passing operations, otherwise non-collective operations may prevent collective operations from completing.
SUMMARY OF THE INVENTION
The invention provides a new and improved system and method facilitating inter-process communications among processes using message passing methodologies, in a thread-safe manner.
In brief summary, the invention in one aspect provides a collective communications coordinating arrangement for coordinating a collective communications operation among user threads in a plurality of processes,the user threads being configured to communicate using a selected message passing methodology. The collective communications coordinating arrangement comprises a master thread and, associated with each of the processes, a respective slave thread. The slave thread, in response to a collective communications request from a respective user thread in its associated process, generates a collective communications request message for transmission to the master thread. The master thread, after receiving collective communications request messages from all of the slave threads associated with processes that contain threads that are to engage in the collective communications operation, generate a collective communications grant for transmission to the slave threads of all of the processes which contain threads which are to engage in the collective communications operation. In response to a collective communications grant from the master thread, the slave threads enable the respective user threads to engage in the collective communications operation.
In one embodiment, the collective communications grant includes two messages transmitted by the master thread to the slave threads. In response to the initial communication grant message, each slave thread acquires a message transmission regulation lock that regulates transmission of messages by threads in the process. In response to the second communication grant message, each slave thread transfers control to the user thread that is to engage in the collective communications operation.
In another aspect, the invention provides a communications coordinating arrangement for coordinating collective and non-collective communications operations among user threads in a process, the user threads being configured to communicate using a selected message passing methodology. The communications coordinating arrangement comprises associated with each the thread to engage in a non-collective communications operation, a non-collective communication operation control module and, associated with each the thread to engage in a collective communications operation, a collective communication operation control module. The non-collective communication operation control module, when the thread is to engage in a non-collective communication operation, initially performs a first lock operation to acquire a non-collective communication regulation lock which regulates transmission of messages in non-collective communications operations as among threads in the process and, after it has acquired the non-collective communication regulation lock, performs a second lock operation to acquire a general communication regulation lock. Each thread that is to engage in a non-collective communications operation is configured to not engage in a non-collective com
An Meng-Al T.
Chapin & Huang LLC
Chapin, Esq. Barry W.
Zhen Li B.
LandOfFree
System and method for facilitating thread-safe message... does not yet have a rating. At this time, there are no reviews or comments for this patent.
If you have personal experience with System and method for facilitating thread-safe message..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for facilitating thread-safe message... will most certainly appreciate the feedback.
Profile ID: LFUS-PAI-O-3220442