Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux 0.12 kernel and modern kernels difference in memory management     - LVM basic concepts, management (Linux)

- SSH security note (Linux)

- Netfilter / Iptables Comments (Linux)

- Oracle11g CRS-0184 Problem Solving (Database)

- Servlet life cycle code examples (Programming)

- ARM constant expression (Programming)

- IP Security Policy is to learn how to prevent Ping and closed ports (Linux)

- Tomcat installation under Linux (Server)

- To create a Linux server network security (Linux)

- PHP Performance Analysis and Experiment: Performance Micro Analysis (Programming)

- High-performance JavaScript loaded and executed (Programming)

- How to turn Java String into Date (Programming)

- Ubuntu 15.10 under Python + Apache + CGI fully configured (Server)

- MongoDB3.0.6 wiredtiger MMAPv1 (Database)

- gzip, bzip2, xz, tar, zip compression, archive Detailed (Linux)

- Schema snapshot rollback (Database)

- OpenSUSE installation on CentOS6 (GUI) (Linux)

- Ubuntu 14.04 install the NVIDIA driver + CUDA + MATLAB (Linux)

- CentOS 6 / Linux su: Unable to set user ID: Resource temporarily unavailable (Linux)

- Node.js form --formidable (Programming)

  Linux 0.12 kernel and modern kernels difference in memory management
  Add Date : 2018-11-21      
  Linux 0.12 kernel's memory management is simple and crude, the kernel only used a page directory, only map 4G linear space, virtual space (logical space) each process can only give to 64M, up to 64 process; each process has a corresponding number nr task, a process when the process needs to allocate space, just nr multiplied 64M can be drawn on the starting linear address space of the process. Then the code segment of the process, the data descriptor inside the base address field will be set (nr x 64M), while for the process to allocate the page directory and page table of contents for carrying mappings.

After the process if you want to access an address space of their own will be the first with a base address and 32-bit offset within the program address (logical address) synthesis of linear address, the address must be synthesized in a linear (segment base) ~ between (segment base address + segment limit long), which is (nr x 64M ~ nr x 64M + 64M) between. Then use this linear address follow: "page directory entries - page table - page table entry" in this order to find the corresponding page table entry, will find a physical address, you can actually access the data.

But in the modern kernel, memory management, there are many different.

First, the linear address space will not change, 32-bit CPU can address 4G linear space. This is unique.

But each process has its own separate 4G virtual space, then this is how to do it? In fact, each process is given its own page directory, so that each process can have 4G virtual space (logical space) a.

Note: 0.12 Kernel two processes each synthesized linear address is not necessarily the same, because each process occupy different regions of linear space. But modern kernel, A, B two processes may be synthesized in the same linear address because each process has 4G virtual space, that virtual space and linear space to wait. However, due to the page directory and page tables two processes are different, so each of these two processes will synthesize equal numerical linear addresses are mapped to different physical addresses. Both linear space that is mapped to the physical space is different. In other words, modern kernel, virtual space (logical space) and become almost a linear space concept, the following does not distinguish.

For example, if A and B processes simultaneously access their 0x0804800 linear address space, segmented paging address translation mechanism will put 0x0804800 this linear address mapped to different physical addresses up. And this process, the process that they are invisible, A and B both consider themselves successful visit 0x0804800 this address, but in fact, they visit is "equal value" of each linear linear address space, the final two " equal "linear address value will be mapped to different physical memory address. This enables the process isolation.

Each process has 4G linear space (virtual space), linear spatial isolation between processes, mutual non-interference in each process are working in their own world.

The above said are from the operating system point of view of principle, put on the specific Linux operating system will be a little different. Because the Linux kernel which provides that although each process their own 4G linear space, but they are not free to use it all 4 G. 0-3G user space is indeed free to use, but the kernel space between 3G-4G, can not be free to use. Therefore, the above theory can improve, for each process has a size of 4G linear space, 4G linear space is divided into two parts:

Size of the 3G user space, each process can be used in a free and independent "privileged class 3", this space of each process is completely independent from each other, pointing to different physical memory locations.

1G size of the kernel space, the processes in the "privilege level 0" under before you can use this space, this space are not independent of each process, pointing to the same physical memory location. That is shared by all processes.
- Linux system security settings (Linux)
- Bash How to read a file line by line (Programming)
- CentOS install SystemTap-2.6 (Linux)
- Apache Spark1.1.0 deployment and development environment to build (Server)
- Oracle RMAN backups of the control file backup (Database)
- Java Access Control (Programming)
- Some of the bibliographic management tools to good use on linux (Linux)
- Java to create a table in the database SYBase (Database)
- Using RAID in Linux: Create a RAID 5 (Linux)
- Oracle study notes view (Database)
- To create and manage virtual machines on Ubuntu Redhat (Linux)
- E: Sub-process / usr / bin / dpkg returned an error code (1) error solution (Linux)
- Oracle 11g can not export a variety of empty table solution (Database)
- Polymorphism of the C ++ compiler and run-time polymorphism (Programming)
- Hibernate Search 5.5 in the search results sorted (Linux)
- Linux System Getting Started Tutorial: Using the Linux common commands (Linux)
- Android Custom View step (Programming)
- Mongo-connector integrated MongoD to achieve incremental Solr index (Server)
- See how --nand flash timing diagram of a read operation Comments (Programming)
- Oracle archive log size than the size of the online journal of the much smaller (Database)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.