Several ways of Windows memory management and their pros and cons

Source: Internet
Author: User

Windows memory management methods are mainly divided into: page management, Segment management, section page management.

The basic principle of page-based management is to divide the virtual space of each process into several pages of equal length, page management divides the memory space into a page by the size of the page, then the page virtual address and memory address to establish one by one corresponding page table, and the corresponding hardware address transformation mechanism to solve the problem of discrete address transformation. Page management uses the request paging or the pre-paging technology to realize the unified management of internal and external storage. The advantage is that there is no outer fragment, and each inner fragment does not exceed the size of the page. The disadvantage is that the program is all loaded into memory and requires appropriate hardware support. For example, Address transformation mechanism page fault generation and selection of obsolete pages, etc. require the corresponding hardware support. This increases the cost of the machine and increases the system overhead.

The basic idea of segment management is to segment the program in terms of content or process functions, each with its own name. A user job or process includes a segment that corresponds to a two-dimensional linear virtual space, which is a two-dimensional virtual memory. The segment manager allocates memory in segments and then translates the segment virtual address into the physical address of the actual memory through the address mapping mechanism. The advantage is that it can be written and compiled separately, can be different protection for different types of segments, can be shared by segment, including code sharing through dynamic links. The disadvantage is that it produces fragmentation.

Section-page Management: In order to achieve section-page management, the system must establish a segment table for each job or process to manage memory allocation and release, missing segment processing, and so on. In addition, a segment is divided into several pages. Each segment must create a page table to transform the virtual pages in the segment into the actual pages in memory. Obviously the same as the page management, the page table should also have corresponding to implement page break processing and pages protection and other functions of the table entries. Segment management with page management is a combination of the two, so they have the advantage of both. In turn, however, the complexity and overhead increase as management software grows. Additional hardware required and memory usage increased. Make the speed drop down.

Related Article

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.