Shared Memory Concurrency
Comments debate the use of shared memory for communication between processes and threads versus alternatives like message passing or sockets, focusing on performance, safety, and implementation challenges in concurrent programming.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Doing such a thing would implicitly require doing shared memory behind the scenes.
Doesn't that preclude shared memory?
No shared memory. To communicate between processes you usually use sockets, to communicate between threads you mutate variables. This is a huge performance difference.
It does. It's a distinct issue and still very relevant if you're using shared memory without locks to communicate between threads.
You do not need threads for shared memory. I know of quite a few high-performance software systems that use process isolation and yet leverage shared memory via mechanisms like mmap() for IPC.
Maybe he thinks shared memory would be simpler?
Sorry, but we need shared memory for fast sharing of large immutable data structures.
I used shared memory concurrency all the time, you're simply wrong.
You have to copy memory before sharing it between threads.You cannot do atomic memory sharing between threads = threads cannot work on the same task at the "same" time efficiently.
No. Sharing code is good. Sharing memory bad.