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