Reputation: 37
Consider we have large amount of physical memory.
Do we still need virtual memory?
What is the use of paging in that situation?
Upvotes: 1
Views: 2774
Reputation: 289
Do we still need virtual memory? Most likely yes, because virtual memory has its perks and advantages.
It keeps memory isolated from other processes, which means they cannot access each other data or corrupt them. This can give you a lot of peace of mind.
When using certain methods, an OS can "trick" a program into using more memory than possible. Memory can be held temporarily on a secondary storage when not in use and then switched back into memory when needed.
Memory doesn't needed to be shared, so all programs can be memory position dependent, without having to worry about having other programs being loaded at the same location.
Generally, virtual memory is vital for any OS, regardless of the amount of memory. The only time I'd say you wouldn't need virtual memory is if the kernel executed managed code. For example, a JVM executing Java bytecode. Be aware that even in this scheme, the JVM would still manage the memory and program would have an abstract knowledge of its location, not the physical location. Either way you put it, the hardware or the software would still emulate virtual memory.
What is the use of paging in that situation? It allows the OS to have more memory than it has by utilizing secondary storage. Pages of the RAM are being swapped in and out when needed.
I Hope this helps!
Upvotes: 2