3 ms·
To reverse that question, what do you gain by defining a `read` and `write` API over that memory segment? Because if you just add some high-level interface wit
by marcosdumay 3y ago
To reverse that question, what do you gain by defining a `read` and `write` API over that memory segment?
Because if you just add some high-level interface without any concern for performance, yeah, you get what Linux does today. But if you make them a core concern of your shared memory interface, you will certainly lose performance on the cases it's mapped as memory. And "everything is a file, but this one here is actually all about random access" doesn't give you much abstraction.
As somebody already said on the comments, the nice (maybe IMO, I'm not sure) thing about Plan9 is that every resource is named somewhere in a tree. The fact that those things are "files" only detracts from the value and makes the system less fit for modern usage.
- plorkyeran 3y agoYeah, "everything has a filename" and "everything is a file" are very similar concepts but they aren't quite the same, and it might be that most of the value comes from the former.
- totony 3y agoHaving a cursor to access files is mostly legacy no? The difference between memory and storage is getting very small, e.g. ssds and optane
- marcosdumay 3y agoNot exactly legacy, as SSDs are not completely random access, and disks still exist. But yes, the stream abstraction is losing relevance for files. But well, if the proposal is to unify everything, you will have to unstream network connections too.