3 ms·
> Also, the emphasis on virtual memory and page faults is becoming dated. Paging out to disk is obsolete technology. RAM is too cheap, and mobile devices don't
by justin66 10y ago
> Also, the emphasis on virtual memory and page faults is becoming dated. Paging out to disk is obsolete technology. RAM is too cheap, and mobile devices don't page.
I've got to admit, I thought of John Carmack advocating for pretty much the opposite direction for operating systems earlier this year, for making greater use of memory mapped files, unified virtual memory for CPU and GPU, and so on: https://twitter.com/ID_AA_Carmack/status/742191010013286400 https://twitter.com/ID_AA_Carmack/status/742191010013286400
I wonder what you meant by "mobile devices don't page."
- astrange 10y ago> I wonder what you meant by "mobile devices don't page." Mobile devices have memory-mapped pages, but they don't have VM or overcommit. Your process just gets killed if it's using too much memory. Page faults are still important though… actually even more important.
- justin66 10y agoAre we talking about the same thing when we say "mobile devices?" Like, Android phones? Because if there's something lobotomized about their virtual memory, that's something I'm curious about, if you could share a reference of some sort.
- astrange 10y agoI don't know if Android swaps (almost certainly not) but iOS does not swap. It doesn't have a pager. Of course it does have "VM".
- justin66 10y agoI dug into it a little. It's mostly for posterity at this point but if anyone wants to read about it, look up the Android lowmemory killer, which is sort of an enhancement to the OOM killer's functionality. It's a conventional enough Linux virtual memory otherwise.
- Animats 10y agoHe's a game developer, and struggles with the communications problems between the application and GPU. Remember that in Carmack's worldview, the game owns the entire display. It's not one window of many.
- clarry 10y agoLet me quote Carmack on the issue of mmapped assets so other people can see whether you're truly presenting his world view or something you just made up. On startup, applications would read-only mmap their entire asset file [..] Splash screens and loading bars vanish. Everything is just THERE. You could switch through a dozen rich media application with a gig of resources each, and come back to the first one without finding that it had been terminated to clear space for the others [..] It will save power. Hopefully these are the magic words. Lots of data gets loaded and never used, and many applications get terminated unnecessarily to clear up GPU memory, forcing them to be reloaded from scratch.
- justin66 10y agoThere are some well founded reasons to be skeptical about this at first glance, until you realize that we are moving toward a world where hardware supports having CPUs and GPUs in the same address space (and the support is there on some mobile devices and HSA-supporting desktops). Expanding support for these traditional VM techniques to use the hardware to its fullest only makes sense.