Instead what we are talking about is having each process appear to have its own memory address, where virtual addresses are translated to different pages that may or may not be backed to specific physical RAM.
"A single bit in the descriptor can be used to specify whether the array (or other segment) is actually in core or not (the 'presence bit"). Bingo! Virtual memory."
This is really swapping, not virtual memory as we understand it today. While memory protection and translation are essential IMO, I agree with other commenters that swapping is mostly obsolete.
Just trying to understand his comment.
Instead of having to be aware of everything else in memory, and carefully allocating around other things and taking care not to step on each other, it can just assume that nothing else exists, and it has the whole addressable range to put things where it likes.
This isn't really true of course, it's a bit like being given a magical chest-of-drawers in which both you and your friends can use the same drawer, but every time you open it, it only has your own things inside. And behind the scenes, there's a little imp shifting stuff in and out depending on who's pulling the handle.
The virtual addressing part is the sharing of those drawers, the swapping part is if, instead of having only 4 drawers, there are now 8, or 16, or any number. If you open one of these drawers that doesn't actually exist, the imp rummages around in a bigger box in the next room, finds it, and fills whatever is meant to be there. He also sedates you if this happens, so the change appears 'instant' to you.
Because going into the other room is slow for him (and also you, but you might not necessarily notice because you're unconscious) he keeps a bunch of the most recent or most common things around close to hand on his side of the drawers so he can swap them quickly. Every time you need something that isn't nearby, he has to take something out with him to make space, and come back with the new thing.
There's a reasonable argument that this latter part (swapping) can be optional - you don't really have infinite memory like you're pretending, it's still limited to either the amount you can address, or the amount you can store in your secondary storage. And, comparatively, the secondary storage is really damn slow. But, for those occasional times when you just pass the limit, being able to handle that without crashing or the kernel arbitrarily nuking something to make space, it's useful.
Is the sedation COW?
So when, if ever, are we going to see it disappear? (If disks are always going to be cheaper than RAM?)
Some kernels allow you to disable swapping to disk, and others run quite well without any swap, but this the notion of "swap" still seems tightly integrated into most OS's. And I'm still seeing gimmicks like "Increase your system memory with [some catchy product name, but is actually nothing more than a multi-GB USB stick you plug in to give you more swap]."
Will we ever move beyond the concept of swapping to disk?