In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is about the purpose of storage management in computer systems. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The purpose of memory management is to facilitate users and improve memory utilization; the object of memory management is main memory, also known as memory, its main functions include allocating and recovering main memory space, improving main memory utilization, expanding main memory, and effectively protecting main memory information.
The purpose of storage management is to facilitate users and improve memory utilization.
The object of memory management is main memory, also known as memory. Its main functions include allocating and recovering the main memory space, improving the utilization rate of the main memory, expanding the main memory and effectively protecting the main memory information.
Storage management scheme
The main purpose of the storage management scheme is to solve the problem of multiple users using main memory. The storage management scheme mainly includes partition storage management, paging storage management, segmented storage management, segment page storage management and virtual storage management.
Partition storage
There are three different ways of partition storage management: static partition, variable partition and relocatable partition.
Static partition
Static partition storage management divides the allocable main memory space into several contiguous areas in advance, each of which can be the same or different in size. In order to explain the allocation and use of each partition, storage management needs to set up a "main memory allocation table". The main memory allocation table indicates the starting address and length of each partition, and the occupancy flag bit in the table is used to indicate whether the partition is occupied or not. when the occupied flag bit is "0", it indicates that the partition has not been occupied. When allocating main memory, always select the partition marked "0". When a partition is assigned to a job, fill in the occupation flag column with the job name that occupies the partition. Using static partition storage management, the utilization of main memory space is not high. [2]
Variable partition
Variable partitioning is partitioned according to the size of the job. When a job is to be loaded, check whether there is enough space in the main memory according to the amount of main memory needed by the job, and if so, divide a partition to allocate to the job according to the demand; if not, make the job wait for the main memory space. Because the size of the partition is determined according to the actual demand of the job, and the number of partitions is random, the waste of main memory space in the fixed partition mode can be overcome.
With the loading and withdrawal of the job, the main memory space is divided into many partitions, some of which are occupied by the job, while others are idle. When a new job is required to be loaded, it is necessary to find a large enough free area and load the operation into the area. if the free area found is greater than the job requirement, the original free area is divided into two parts after loading, one part is occupied by the operation, and the other part is divided into a smaller free area. When a main bank ends its evacuation, if the area it returns is adjacent to other free areas, it can synthesize a larger free area to facilitate the loading of large operations.
Variable partition scheduling algorithm
1) adaptation algorithm for the first time. At each allocation, the unallocated table is searched sequentially until the first free area that meets the length requirement is found. Divide the unallocated area found, part of it is assigned to the job, and the other part is still free. This allocation algorithm may divide a large space into cells, resulting in more "fragments" of main memory.
2) the best adaptive algorithm. Select a minimum partition from the free area that can meet the requirements of the operation, which ensures that a larger area will not be divided, so that it is easier to be satisfied when loading large operations. When using this allocation algorithm, the free areas can be arranged smoothly according to the size, and the search always starts from the smallest area until a zone that meets the requirements is found.
3) worst-case adaptive algorithm. Select a largest free area to be divided into jobs, so that the remaining free area will not be too small, this algorithm is beneficial to small and medium-sized jobs. When using this allocation algorithm, the free area can be arranged smoothly according to the size, and the search always starts from the largest area. In this way, the table must also be rearranged when a partition is recovered.
Paging storage
Paging storage management divides the logical address space of a process into several equal-sized slices, called pages or pages, and numbers each page, starting with 0, such as page 0, page 1, and so on. Accordingly, the memory space is divided into several blocks of the same size as the page, called (physical) blocks or page frames (frame), and they are also numbered, such as blocks, blocks, and so on. When allocating memory for a process, several pages in the process are loaded in blocks into multiple physical blocks that can not be adjacent to each other. Unusable fragments are formed because the last page of the process is often filled with less than one piece, which is called "intra-page fragmentation".
Segmented storage
In the segmented storage management mode, the address space of the job is divided into several segments, each of which defines a set of logical information. For example, there are main program segment MAIN, subroutine segment X, data segment D, stack segment S, and so on. Each paragraph has its own name. For simplicity, you can usually replace the segment name with a segment number, with each segment addressing from 0 and using a contiguous address space. The length of each segment is determined by the length of the corresponding logical information group, so the length of each segment is different. Because the address space of the whole job is divided into multiple segments, it is two-dimensional, that is, its logical address consists of the segment number (segment name) and the address within the segment.
Segment page storage
The basic principle of the segment-page system is the combination of the basic segmented storage management mode and the basic paging storage management mode, that is, the user program is divided into several segments, and then each segment is divided into several pages, and each segment is given a paragraph name.
Virtual storage
When the storage space of the program is larger than the actual memory space, it makes it difficult for the program to run. virtual storage technology uses the combination of actual memory space and relatively large external storage space to form a virtual storage space that is much larger than the actual memory space, in which the program runs. The basis for realizing virtual storage is the locality principle of the program. In other words, the program often runs within a certain local scope in the process of running. in time, we often run the same instruction segments and data (called time locality). In space, we often run instructions and data with a certain local storage space (called spatial locality). Some program segments can not be run at the same time or can not be run at all. Virtual storage divides the storage space needed by a program into several pages or segments, and the pages and segments used by the program are placed in memory, but not in external memory for the time being. when pages and segments in external memory are used, they are transferred to memory, otherwise they are sent to external memory. Pages or segments loaded into memory can be stored separately.
Thank you for reading! This is the end of this article on "what are the purposes of storage management in computer systems?". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.