Reputation: 1889
I saw this question - What's the difference between "virtual memory" and "swap space"?
Here it is mentioned that virtual memory = RAM space + disk space - which the process can use.
So what can be the maximum size of Virtual memory ?
Is Max(Virtual Memory) = Disk space + RAM space - OS space (on RAM and Disk) ?
Upvotes: 8
Views: 24094
Reputation: 5191
Virtual memory management technique which help us to use secondary memory as it was a part of main memory.
Virtual memory frees up RAM by swapping data that has not been used recently over to a storage device, such as a hard drive or solid-state drive (SSD).
So it limits the maximum size of the virtual memory equal to the maximum physical secondary memory we have.
Why do we need Virtual Memory:
As we can't load the whole data into the ram and we have limited space there, so we have a page table in the ram which maps the address of the data in secondary memory in the page table, So on demand of the program, we swap-in and swap-out the data between RAM and secondary memory.
This technique is called the virtual memory. we don't have actual memory in ram but we still can have a reference of data in secondary memory which can be loaded and unloaded based on the need.
Upvotes: 0
Reputation: 21627
Theoretical Limits:
The starting point is the size of a virtual address. Generally 32-bits give a theoretical maximum of 2^32 virtual addresses.
Some systems divide the virtual address space in to dedicated regions (e.g., user and system). The VAX divided the address space into 4 regions (user, stack, system, reserved/unusable 1/4th of the address space).
From there . . .
Configuration Limits:
Most systems may impose a limit on the size of the user page table. This may be per user or a system limit. That restricts the size of the address space.
From there . . .
Runtime Limits:
The size of the available paging areas limit the maximum virtual address space a point in time.
Upvotes: 1
Reputation: 2289
Virtual memory is not limited by size of memory pointers in the machine, virtual memory limits are not the same as addressing memory space. More virtual memory than available in your pointer-based address space using paging can be addressed
Virtual memory upper limits are set by the OS: eg. 32-bit Windows the limit is 16TB, and on 64-bit Windows the limit is 256TB.
Max limitation is physical disk space.
To determine how much virtual memory you need, since the user's system contains the different amount of RAM, it is based on the system. By default, the OS will set the appropriate size for Virtual Memory. The default and appropriate size of Virtual Memory is:
<Amount_Of_System_Memory> * 1.5 = <Default_Appropriate_Size_Of_Virtual Memory>
Personally speaking, to maintain the good overall system performance, you should be using the default size of actual size for Virtual Memory and the triple the value of the size of the main memory for the maximum size of Virtual Memory.
Upvotes: 5