I am trying to understand server memory architecture and it's not going very well :(
I've read all the Wiki articles etc, but am still confused about a few things, so was hoping someone could explain them to me! Would be very grateful.
My environment is Windows - both 32 and 64bit OS's. (2003/2008).
My application is a 32bit app that has been succesfully running on Windows 2003 x32.
So, from what I understand:
1. Windows uses virtual address space (VAS). The OS manages the mapping of the VAS to the physical memory (http://en.wikipedia.org/wiki/Virtual_address_space
). Now, each time an app runs on a OS, a new VAS is created, and each VAS is 4GB large.
2. If another app is opened, then another VAS (4GB) is created too.
3. What if the application has multiple processes? Is there one VAS per app, or one VAS per process?
4. Within each VAS, 2GB is reserved for the application and 2GB for the OS to help run the application. The app cannot reference that extra 2GB natively.
5. Are 32bit applications programmed to access only that initial 2GB of VAS per app (or process?) or are they developed to use more, but they are limited to that 2GB by the OS (which may cause slowness in the application if the initial 2GB is used up when neeeded)
6. The OS will map individual bytes of each VAS to physical memory based on the usage of the physical memory. If all the physical memory is used, then the application has to wait until some is free?
Hopefully, my understanding of the above is correct. But now we have the page file in the equation too :(
7. For #6, instead of waiting for the physical memory to become free, can the OS map bytes of the VAS to the page file (which is 1.5 x the value of the RAM)? So realistically, do we have 6GB RAM extra when 4GB DIMM's have been added?
8. Thus far, I have been of the understanding that a 32bit OS cannot understand more than 4GB RAM, so there is no point adding more than 4GB. But if it's using 6GB of the disk as extra RAM, why not just add that as actual RAM?
9. If I was going to create a x64 OS server, but only allocate it 4GB RAM, would that essentially be the same as an x32 OS server with 4GB RAM? it's only when we add more than 4GB that there are benefits of a x64 OS?
10. Or, instead of my claim in #9, there would actually be a benefit for a 32 bit app in running on a 4GB RAM 64bit server, since there is no limitation in the VAS for just 2GB to the application?
Hope someone can help!