Understanding Linux Hugepages
Before we discuss about Huge pages, we should revise some of the basic concepts about Operating system memory management.
Operating systems basically deals with two types of memory for its operations one is Physical memory ( actual Physical RAM) and the second is Virtual memory ( combination of Physical and Swap). Virtual Memory is used to store entire program that is currently running and the physical memory is to store only specific part of memory that is important at this moment. And both physical memory and virtual memory will be segmented as pages, and the process of copying the pages of the program from to/from the virtual memory to/from the physical memory is called paging.
Operating system manages a page table to map virtual memory pages to physical memory pages. So when ever operating system needs to access memory for some information it will look at the paging table first and then look at the corresponding physical memory, if it doesn’t find information in physical memory then go back to virtual memory to get the required information. Full Story