Linux Tutorials - Herong's Tutorial Examples - v5.45, by Herong Yang
Virtual Memory Mapping and Page Table
This section describes virtual memory page, physical memory frame, and page table that maps a page to a frame.
What Is Page? - Page is the block unit of the virtual memory. Each page is mapped to a frame in the physical memory. The page size is 4096 bytes on most Linux systems.
For a 32-bit CPU, the virtual memory address is 32 bits long, and divided into 2 sections: page index and page offset. If the page size is 4096 bytes, the first 20 bits of an address represent the page index and the last 12 bits represent the page offset. For example:
Virtual memory address: 0x000A502F = 0000 0000 0000 1010 0101 | 0000 0010 1111 page index | page offset
What Is Frame? - Frame is the block unit of the physical memory. Since each page in the virtual memory is mapped to a frame, the frame size must match the page size.
What Is Page Table? - Page Table is a lookup table to map a page index in the virtual memory to the location of a frame in the physical memory. The page table is managed by the MMU (Memory Management Unit) as shown in the diagram below:
"getconf PAGESIZE" - Display Page Size - "getconf PAGESIZE" command returns the page size of the virtual memory.
herong$ getconf PAGESIZE 4096
Table of Contents
Cockpit - Web Portal for Administrator
Layers of Memory and Access Speed
List CPU Caches and Their Sizes
Virtual Memory vs. Physical Memory
Buffer Memory and Cache Memory
Verify Cache Memory with "cp" Command
►Virtual Memory Mapping and Page Table
"ps -o rss,drs,trs,vsz,sz" - Process Status Options
smem - Process Memory Usage Report
/proc/{id}/maps - Process Memory Map
/proc/{id}/smaps - Process Memory Map Details
SELinux - Security-Enhanced Linux
SSH Protocol and ssh/scp Commands
Software Package Manager on CentOS - DNF and YUM
vsftpd - Very Secure FTP Daemon