32bit architecture vs 64 bit architecture. Memory map of kernel. Memory map of a programme. Benefits of 64 bit architeture over 32 bit

For 32 bit architecture there are 32 address lines thus you can refer 2^32 addresses. For 64 bit architecture, you can refer 2^32 times more than that can be referred in 32-bit architecture which is extremely huge. Thus for 32-bit architecture, the Virtual Memory size is less than 4GB. Hence if you are using RAM of size greater than  4GB, some of it will be unutilised.  The Virtual Memory as the name implies is virtual and can be treated as a virtual extension of the physical memory. Thus if you are using 32-bit architecture and the if you have 2GB RAM chip, you can use your machine as if you are using RAM of size nearly 3.5 GB (nearly 3.5 GB is maximum usable memory depending upon your OS). Thus as the name virtual suggests as if you are using a virtual RAM much greater than your actual RAM. But using Virtual memory comes with an expense. If you are using more and more Virtual machines, the input-output to hard disks increases and which slows your system as input-output to hard disks takes large time. The CPU of your machine has memory called cache memory which is much much faster than RAM and again RAM is much much faster than the hard disk. Thus frequent CPU instructions are kept in CPU cache memory, and less frequently are kept in RAM and least frequent are stored in the Hard disk as a part of the virtual memory.

Now it sounds obvious that if instructions are stored in continuous locations in the memory it will be fast otherwise will have to spend time jumping from here and there.Thus when the Linux kernel is loaded it is stored in continuous memory locations typically in higher address part of the RAM. In this case of 64-bit architecture, the address space is so huge that some portions of it are not being utilized (Non Canonical addresses. See the picture in middle below).


Canonical address space implementations (diagrams not to scale)
Current 48-bit implementation
56-bit implementation
64-bit implementation

















(courtsey: wikipedia)

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.