3 ms·
The thing is... multi-process with a bespoke shared memory system isn't better than multithreading; it's much worse.
by wmf 3y ago
The thing is... multi-process with a bespoke shared memory system isn't better than multithreading; it's much worse.
- anarazel 3y agoI'm not sure if I'd judge it as harshly, but you have a good point: A lot of debugging / validation tooling understands threads, but not memory shared between processes.
- throwawaylinux 3y agoBy bespoke you mean using standard interfaces to create shared memory pools? They do roll some of their own locking primitives, but that's not particularly unusual in a large portable program (and quite likely what they wanted is/was not available in glibc or other standard libraries, at least when first written).
- __turbobrew__ 3y agoIn Linux, multi process with shared memory regions is basically just threads. The kernel doesn’t know anything about threads, it knows about processes and it lets you share memory regions between those processes if you so desire.
- paulddraper 3y agoIt kinda is though. The process barrier is better at enforcing careful deliberate interactions
- citrin_ru 3y agoThe difference is between everything shared (threads) and some parts are shared explicitly (processes with shared memory). I'm not sure 2nd is worse.