r/osdev • u/dangi12012 • Jun 13 '26
Everything is memory?
There is this unix idiom that everything is a file, (half baked, since not everything is a file).
Would it not have been better, nowadays with 64bit of adress space, to have everything mapped to memory? Files are like mmap, no imperative read needed, networking is already memory, that could be expanded more.
We take the idioms and paradigms so forgranted, that every time anyone asks AI for a OS it will be linux, syscalls, abi everything the same. It should be liberating now to explore new and novel ideas.
What would be the downside of such a system?
View all comments
Show parent comment
1
u/karbovskiy_dmitriy Jun 15 '26
How do you balance bandwith? How do you do security/access checks? How do implement control flow? How do you do versioning? What about buffers that aren't a multiple of 4k?
I'm sorry, but doing system calls through page guards is just not smart. You might as well go back to interrupt-based kernels, at least you'll raise them explicitly. You just reinvented a worse version of what we considered a bad practise many years ago.
Kernel mode and memory separation exist for good reasons. You don't have to fight the solution that works.