Message passing using shared memory of a computer
Abstract
A lock-free mechanism is provided for successfully passing messages between processes even if a process is preempted while sending or receiving a message. Messages are communicated between processes using a mailbox data structure stored in memory shared by the processes, without the use of locks or other mutual exclusion entities that would otherwise limit concurrent delivery and receipt of messages placed in the data structure. The data structure in the illustrative embodiment includes one or more message slots for storing messages placed in the data structure and a number of state variables for inserting messages into and removing messages from the message slots. A process sends or retrieves messages by manipulating the state variables using indivisible atomic operations. This ensures that a process cannot be preempted from message passing until it finishes executing the atomic instruction. The method and mechanism have particular value in distributed shared memory (DSM) and non-uniform memory access (NUMA) machines.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 12 · Forward citations: 56.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for communicating messages between processes via memory of a computer, the method comprising: providing a mailbox data structure for a second process in memory accessible to a first process and the second process, the data structure having one or more message slots for storing messages sent to the data structure, an availability indicator denoting a number of message slots that are at least partially filled and utilized to indicate if a message slot is available for receiving a message, a last message slot indicator denoting a last message slot that is at least partially filled and ut
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 56 total)
References Cited — Backward Prior Art (12)
Non-Patent Literature (3)
- "Interprocess Communications," UNIX Internals, by Uresh Vahalia, pp. 149-186 (1996).
- "Synchronization and Multiprocessors," UNIX Internals, by Uresh Vahalia, pp. 187-219 (1996).
- "The SVR4 VM Architecture," UNIX Internals, by Uresh Vahalia, pp. 437-440 (1996).