I was reading a book which talks about virtual memory:
Intel Core i7 supports a 48-bit (256 TB) virtual address space and a 52-bit (4 PB) physical address space
below is my question
Q1-since we mostly use 64 bits machine, how come the virtual address is only 48 bits? Shouldn't it be 64 bits virtual memory as well?
Editor's note: this part is an exact duplicate of Why do x86-64 systems have only a 48 bit virtual address space?
(Editor's note: this part is an exact duplicate of Why in x86-64 the virtual address are 4 bits shorter than physical (48 bits vs. 52 long)?)
Q2-How come the address space of physical memory(52 bits) is greater than virtual memory's(48 bits), shouldn't it be that virtual memory's address space should be greater than physical memory's?
(Editor's note: this part is a duplicate of several questions, including Is a process' page table mapped to Kernel address space? and Where is page table located?)
Q3-my understanding is that: all page tables stored in kernel memory which is invisible to user, is my understanding correct?
It is economics!
The cost of building a machine large enough to accommodate sufficient RAM to support 64 bits of virtual addressing is prohibitive. (Probably, even for the NSA!) Therefore we can conclude that the demand for chipsets that will actually support this is minimal.
Each bit of physical address space corresponds to a pin on the CPU chip, and a silicon to support it, and a wire on the PC board ... and a pin on each memory DIMM. These all add to the cost of manufacture, directly or indirectly.
It does not make business sense to ask customers to pay a premium for functionality that 99.999+% of them don't need and cannot possibly use. You do that and your competitors will be able to beat you on price / performance metrics.
Q1-since we mostly use 64 bits machine, how come the virtual address is only 48 bits? shouldn't it be 64 bits virtual memory as well?
Since you cannot afford enough RAM to effectively use 64 bits of virtual space, this is moot.
Q2-How come the address space of physical memory(52 bits) is greater than virtual memory's(48 bits), shouldn't it be that virtual memory's address space should be greater than physical memory's?
Not sure about this one. You would need to talk to the designers about that. But it is moot for the same reasons as above.
Q3-my understanding is that: all page tables stored in kernel memory which is invisible to user, is my understanding correct?
Yes that is correct (in a well designed multi-user OS), though I don't see how that relates to the rest of the question.