[Linux Memory]linux Memory Learning (ii)--segments and pagination

Source: Internet
Author: User

One: Memory fragmentation and paging.
Click to open link

Each user space of the Linux process has a 3G address space, (virtual address space 3g-4g space is used by the Linux kernel), the user space to see the process address refers to the virtual address space, and then the operating system through the MMU and then map the virtual address to the actual physical address.

Segmentation: is to map the entire program to the physical address of the Linux memory, assuming that there are two processes a and B, process a requires a memory size of 10M, its virtual address space is distributed in 0x00000000 to 0x00a00000, process B requires a memory of 100M, its The virtual address space is distributed to 0x00000000 to 0x06400000. Then, according to the segmented mapping method, process A maps the area on the physical memory to 0x00100000 to
0x00b00000, process B maps the area on physical memory to 0x00c00000 to 0x07000000. So process A and process B are mapped to different memory ranges, each of which does not overlap each other, and it realizes the address isolation '


paging: because a fragment can only map the entire program to the physical address space, this can result in a lot of disk access operations, resulting in inefficiency. So this mapping method is slightly coarse, the granularity is larger, and the idea of paging is that the program's really executed pages will be mapped into memory.

[Linux Memory]linux Memory Learning (ii)--segments and pagination

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.