Q1. What is a physical address? What is a virtual address? What is a linear address?
A:
1) Define the memory space provided by the physical memory module on the motherboard as the physical memory space, where the actual address of each memory unit is the physical address;
2) Define the memory space seen by the application programmer as a virtual address space (or address space), where the address is called a virtual address (or virtual address), generally in the form of <;segment: offset” To describe, such as A815: CF2D;
3) Linear address space refers to a continuous, non-segmented address space ranging from 0 to 4 GB, a linear address is an absolute address of the linear address space .
Q2. How does the MMU convert a virtual address to a physical address in protected mode?
A: In protected mode, the memory management unit (MMU) consists of one or a group of chips. Its function is that the virtual address is mapped to a physical address, that is, address translation; the MMU is a hardware circuit. It consists of two parts, a segmentation component and a paging component, called the segmentation mechanism and the paging mechanism. The segmentation mechanism converts a virtual address into a linear address. The paging mechanism converts a linear address into a physical address.
Q3. Why use a two-level page table for a 32-bit linear address space?
A: A page table is a data structure that maps a linear address to a physical address. A 4 GB linear space can be divided into 1 M 4 KB pages, and each page table entry takes 4 bytes. The page table of 1M page table items needs to occupy 4MB space, and the requirement is continuous, so the two-level page table is used to implement; the two-level page table is to page the page table again, and the first level is called the page directory. It stores information about the page table; the 4MB page table is paged again and can be divided into 1K pages of 4KB size.
Q4. What is the role of the page cache? Why does Linux mainly use paging mechanism to implement virtual storage management? Why does it use a three-level paging mode instead of two levels?
A:
1) The page cache automatically retains the 32-page page entries recently used by the processor, so it can cover 128KB of memory;
2) Linux mainly The paging mechanism is used to implement virtual memory management for the following reasons:
A. The Linux segmentation mechanism makes all processes use the same segment registers, which makes memory management simple;
B. One of the design goals of Linux is to be able to be ported to most popular processing platforms, but many RISC processors support very limited segmentation; to ensure portability, Linux uses a three-level paging mode because many The processors all use a 64-bit structure; Linux defines three types of page tables: page directory (PGD), intermediate directory (PMD), and page table (PT).
Today I made a simple ftp server for the company, and it was the first time I actually did the serv
Description of Requirement compile and install MySQL, PHP , and Apache to work a. The process o
First, the installation of VirtualBox and expansion package installation steps is too simple, and wi
1. In STM32, there are five clock sources, HSI, HSE, LSI, LSE, PLL. 1, HSI is a high-speed internal
Fresh experience in programming under Linux
How to clear all iptables rules in Linux
Linux system garbled problem solution
10 useful Linux command interview questions and answers
CentOS install Apache+PHP+MySQL guide
Linux System Management and Maintenance - fsck Command
How to reinstall Linux under Linux operating system
How to view the operation record after user login under Linux
Windows 10 Enterprise and Security Features
Switching the Win7 system user profile to another disk
Linux file system entry details
Several useful small functions that are necessary for quick-press newbies
Win7 mouse right button failure solution
How to use search function in Win8 system
Windows XP system data backup and recovery
Using Win7 multi-function calculator complex mortgage easy to calculate
Telerik released Win8.1/WP8.1 universal development control
Compatibility issues with installing drivers under Windows 2000/XP