Physical Memory Management

Source: Internet
Author: User

Physical address space: The address space supported by the hardware.

Logical address space: The address seen by the process running on the CPU.

One, continuous memory allocation:

1. Matching policy:

First matching policy: The list of free partitions is sorted by address order, and the first free partition that is larger than the required space is allocated.

Best Bet strategy: The list of free partitions is sorted from small to large, and the first free partition that is larger than the required space is allocated (that is, the smallest partition in the free partition that is larger than the space required).

Worst-fit Policy: The list of free partitions is sorted from large to small, allocating the first free partition (that is, the largest free partition). If the first one is less than the space required, there is no space allocation.

2. Defragmentation:

Compact: When the application is dynamically relocated, the application's address is combined so that the fragments are integrated into a large, free partition.

Partition swap: When there is a process in memory that is waiting, other running processes can preempt the partition of the waiting state process, and the waiting process moves to the hard disk waiting for the running process to be in memory

Run in the.

3. Partner Systems:

The free block is organized into two-dimensional arrays by size and start address, the first dimension is differentiated by size, and the second dimension is differentiated by address in the same size. The initial state is a 2-power-square free block, from small to large in two

The smallest available free block in a dimension array, such as an idle block that is too large, divides the free block evenly until a suitable free block is found. That is, the second equal to small, not two equal and large, so that it can be assigned.

Second, non-contiguous memory allocation:

1. Segment Storage Management:

    

The size of the segment may be different, you can divide the process into code snippets, stack segments, initialize data segments, and so on.

The corresponding data in memory is addressed according to (S,ADDR).

2. Page-type storage management:

Page frames, frames, physical pages.

pages, pages, logical pages.

   

  

Physical Memory Management

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.