Basic knowledge of Linux: Memory management

Source: Internet
Author: User
Q1. why is the address space of a process divided into kernel space and user space? A: the virtual address space of Linux is 4 GB. the kernel divides the 4 GB space into two parts. the larger 1 GB space (the virtual address 0xC0000000 to 0 xFFFFFFFF) is used by the kernel, it is called the kernel space, and the low 3 GB (virtual...

Q1. why is the address space of a process divided into "kernel space" and "user space "?
A: the virtual address space of Linux is 4 GB. the kernel divides the 4 GB space into two parts. the larger 1 GB space (the virtual address 0xC0000000 to 0 xFFFFFFFF) is used by the kernel, it is called "kernel space", and the low 3 GB (virtual address 0x00000000 to 0 xBFFFFFFF) is used by each process, which is called "user space" because each process can enter the kernel through system calls, therefore, the kernel space is shared by all processes in the system. Therefore, from the process perspective, each process can have a 4 GB virtual address space (also called virtual memory ).

 

Q2. how does Linux implement "request page adjustment?

A:

1) If the Accessed page is not in memory, that is, the page is not stored in any physical page, the kernel allocates a new page and initializes it as appropriate, this technology is called "request page adjustment ";

2) "request paging" is a dynamic memory allocation technology that delays page allocation until it can no longer be postponed. that is to say, this delay occurs until the page to be accessed by the process is not in the physical memory. this technology is introduced mainly because the process does not access all the addresses in its address space when it starts running.

From: Column of zhouzxi

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.