logoalt Hacker News

Twey • today at 12:16 PM • 1 reply • view on HN

Message-passing doesn't necessarily involve naïvely copying the data around. If you have access to shared memory then you can pass a pointer; the only thing you really need to ‘pass’ is the capability to access the message data. This is how seL4 does it, for example.

Of course if you don't have shared memory then you have to copy anyway :) And because of CPU caching architecture the benefits of having an owned copy of the data can sometimes outweigh the cost of copying it, even if shared memory is available.


Replies

skew-aberration • today at 12:28 PM

Ok if you define message passing that broadly then I would agree, but I think that definition is also broad enough to bring in the downsides of shared memory such as deadlocking.

We're also now talking about patterns which are common in other contexts, but I don't have a problem with that. io_uring for example - is it shared memory, asynchronous, message passing, or all three (probably yes)?