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.

📉 Falling 0.4x Programming Languages
2,565
Comments
20
Years Active
5
Top Authors
#8629
Topic ID

Activity Over Time

2007
3
2008
19
2009
32
2010
38
2011
58
2012
56
2013
105
2014
128
2015
129
2016
155
2017
206
2018
135
2019
209
2020
162
2021
234
2022
222
2023
257
2024
218
2025
190
2026
9

Keywords

e.g CPU IMHO FPS AWS EmbarkStudios L4 IPC VM i.e memory shared memory shared threads sharing data message passing processes ocaml mmap

Sample Comments

ris Dec 21, 2013 View on HN

Doing such a thing would implicitly require doing shared memory behind the scenes.

ethbr0 Apr 4, 2021 View on HN

Doesn't that preclude shared memory?

heinrichhartman Oct 17, 2021 View on HN

No shared memory. To communicate between processes you usually use sockets, to communicate between threads you mutate variables. This is a huge performance difference.

barrkel Jun 15, 2016 View on HN

It does. It's a distinct issue and still very relevant if you're using shared memory without locks to communicate between threads.

jandrewrogers May 9, 2012 View on HN

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.

chrisseaton Oct 17, 2014 View on HN

Maybe he thinks shared memory would be simpler?

amelius Aug 30, 2017 View on HN

Sorry, but we need shared memory for fast sharing of large immutable data structures.

rwmj Jun 15, 2019 View on HN

I used shared memory concurrency all the time, you're simply wrong.

bullen Jul 11, 2021 View on HN

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.

azaras Aug 3, 2021 View on HN

No. Sharing code is good. Sharing memory bad.