Wednesday 4 July 2018

cpu - How much memory can a 64bit machine address at a time?


If the memory is byte addressable, shouldn't it be


2^64 / (2^10 * 2^10 * 2^10) = 2^34 GB ?


A general Google search says 8GB or 16GB max.


How is that true? Also, how does it depend on the Operating System?



Answer



There are multiple interleaving factors.


First of all, you will never, ever be able to assemble a system that has 264 bytes (16 exibytes) of physical RAM.


Second, just because an architecture uses 64-bit pointers, doesn't mean that all the bits of those pointers are actually used. Notably, current x86-64 CPUs (aka AMD64 and Intel's current 64-bit chips) actually use 48-bit address lines (AMD64) and 42-bit address lines (Intel) (see http://en.wikipedia.org/wiki/X86_64#Virtual_address_space_details ), theoretically allowing 256 terabytes of physical RAM.


Second, motherboards have their own limits on how much RAM they can support, both physically and logically. Physically, there are only going to be so many slots available for RAM. As for the "logical" limits, I don't fully understand why this is still the case for x86-64 (the memory controller having long since been migrated into the CPU itself), but there it is. Presumably corners are being cut on address lines to save a few bucks in design and manufacturing.


Third, an operating system may have internal limitations as to how much RAM it can efficiently support. In part, this is actually to prevent needing overly large data structures to keep track of usage for memory that isn't really there. Last I checked, Linux allows 128TB of virtual address space per process on x86-64, and can theoretically support 64TB of physical RAM.


Fourth, some operating systems (e.g. Windows) will artificially limit how much RAM can be used as a tactic to make users upgrade to more expensive versions if they want more RAM (Windows 7 Starter is limited to 2GB, Home Basic to 8, Home Premium to 16, and Professional and above are 192GB, and Windows Server releases have far higher limits).


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...