What Are the Different Methods for Memory Enhancement?

Memory is a main component in a computer system, which is used to save programs and data while a process is running. It is also called executable memory. In a computer, memory space generally refers to the main memory space (physical address space) or the system allocates memory space for a user program. Methods to expand memory space generally include increasing memory size and virtual memory.

Memory space virtual memory

Virtual memory is a technology for computer system memory management. It makes the application think that it has continuously available memory (a continuous and complete address space). In fact, it is usually divided into multiple physical memory fragments, and some are temporarily stored on external disk storage when needed. Data exchange. Compared with systems that do not use virtual memory technology, systems that use this technology make it easier to write large programs and use real physical memory (such as RAM) more efficiently.
Virtual memory is automatically scheduled and managed by hardware and operating system. Its working process includes 6 steps:
The logical address of the central processing unit accessing the main memory is decomposed into a group number a and an address b in the group, and the address conversion is performed on the group number a. That is, the logical group number a is used as an index. In main memory.
If the group number is already in the main memory, go to execute ; if the group number is not in the main memory, check whether there is a free area in the main memory, and if not, call out a temporarily unused group. Go to secondary storage to transfer this group of information into main storage.
Read the desired group from the auxiliary memory, and send it to the free area of the main memory, and then register the free physical group number a and logical group number a in the address conversion table.
The physical group number a corresponding to the logical group number a is read from the address conversion table.
Obtain the physical address from the physical group number a and the byte address b in the group.
Access the necessary information from the main memory based on the physical address.
Scheduling methods are paged, segmented, and paged. Paged scheduling is the division of logical and physical address space into fixed-size pages. The main memory is numbered in page order, and each independently addressed program space has its own page number order. By scheduling each page of the program in the auxiliary memory, it can be discretely loaded into different page positions in the main memory, and can be one by one according to the table. Correspondence search. The advantage of page-based scheduling is that the pages within the page are small, the page table is transparent to the programmer, the address conversion is fast, and the loading operation is simple. The disadvantage is that each page is not an independent module of the program, which is not convenient for the protection of programs and data. Segment scheduling divides the address space according to the logical structure of the program. The length of the segment is arbitrary and allows extension. Its advantages are that it eliminates the memory fragment, is easy to implement storage protection, and facilitates the dynamic assembly of the program; the disadvantage is that the loading operation is complicated . Combining these two methods constitutes segmented page scheduling. In segment page scheduling, the physical space is divided into pages. The program is divided into modules, and each segment is divided into pages that are as small as the physical space pages. Segmented page scheduling combines the advantages of segmented and paged. The disadvantages are increased hardware costs and complicated software. Most large-scale general-purpose computer systems use segmented page scheduling.

Memory space physical address extension

Physical Address Extension (PAE for short), and physical location extension, is a function of the x86 processor, allowing the central processor to access more than 4GB of physical memory under a 32-bit operating system.
PAE is supported by IntelPentium Pro and above CPUs (including all new Pentium series processors except this version of the Pentium M with a bus frequency of 400MHz). Other compatible processors, such as Athlon and AMD Newer models of CPUs also support PAE.
The x86 processor added extra address lines to select those added memory, so the size of the physical memory increased from 32 bits to 36 bits. The maximum physical memory has been increased from 4GB to 64GB.
The 32-bit virtual address (linear address) has not changed, so general application software can continue to use 32-bit instructions; if using flat memory mode, the address space of these software is also limited to 4GB. The operating system uses a page table to map the 4GB address space to 64GB of physical memory, and this mapping is generally different for each process. In this way, even if it cannot be used by a single program, the added physical memory can still work.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?