1, tab segment &&:
Paging and segmentation are the disk storage units.
(1) Page:
① defined: the memory space, the memory space is divided into a base unit and a magnitude equal, it referred to as "block", also called "page frames." The address space of the user program in accordance with the "block" is divided into several equal-sized area of the basic unit, which has a region called a page.
② memory allocation rule: in units of blocks is stored. Each page is stored in the designated block, each page may not be adjacent in a computer memory, it may be stored in non-adjacent pages box. It is the smallest unit of data block transfer between disk and memory.
(Note: less than a page size must also occupy a block which is the cause of memory fragmentation generated.)
(2) above:
① Definition: The address space of the user program is divided according to its own logic into a plurality of areas of different sizes, called "segment." Each segment has a segment name, from the beginning of each segment 0 addressing. In general, this area is a large area of the score page, so it can store more content, storage period of more complete information.
② memory allocation rule: allocated in units of segments, each segment occupies the continuous space in the memory, but not between adjacent segments.
(3) with the tab segment contrast:
① area size is equal to the tab; not like the segment.
② page is the smallest unit of data transfer between the physical block address information, disk and memory; logical segment address information, which is information with respect to the division.
③ tab in the address space is one-dimensional operations; a given address, it can be determined that the page address and page number (page length), thus it is possible to find the corresponding content
Address space segment job is two-dimensional. It needs to be determined by a segment number and the address segment.
analysis:
It is calculated using a linear fashion, but the length of each page is determined, and the length of each segment is different. So that the segments are two-dimensional, because of the need to determine the length of the segment and segment number two variables; and paging is one-dimensional, since only the page number can be determined
④ tab allows the discontinuous storage blocks, each page because it corresponds to one block, and each page can be stored in a non-continuous, so it;
For the segment, each segment must all content stored in continuous areas in the different segments can be stored in discrete regions.
⑤ tab is not visible to the user, and is determined by the system itself; segment for the user is determined
⑥ paged memory will fragment memory, no external memory chips;
Fragmentation does not produce memory fragmentation, it will produce external memory chips.
Note: Links page of storage:
First segmented, each segment followed for paging. At this time, each segment needs to be stored in contiguous blocks, and because the block as the basic unit of storage, so that in certain cases, requires a segment stored in a plurality of successive blocks (unless the length of the segment block == length), different segments may be stored in non-contiguous storage area.
2, memory fragmentation && external memory fragmentation:
Different (1) Nature:
① memory fragmentation: refers has been allocated, but did not use memory space. Because the restriction basic storage unit
② external memory fragmentation: refers has not yet been allocated, but are too small or is not continuous, which led to not meet the requirements, so there is no way the memory space allocated
Different (2) memory location:
① memory fragmentation is stored in the assigned area of the interior
② external memory chips are stored in unallocated area
(3) different states:
① memory fragmentation: other processes can not use it because it is a possession of a process
② external memory fragmentation: other processes can not use it because it can be stored position discontinuous or too small
References: