“This is the 18th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021”

preface

Hello everyone, I'm GW_gw. I'm glad to learn and progress with you.Copy the code

The following content is from the network, if there is any infringement, please contact me to delete, this article is only used for learning exchange, not for any commercial purposes.

Abstract

This paper mainly introduces some basic concepts of memory management under single-channel programming and multi-channel programming, as well as some introduction of address translation.Copy the code

1. Single-channel programming memory management

Single-programming memory management is the simplest memory management because there are only two programs in memory, one for the operating system and one for the user. Since the size of the operating system is constant and there is only one user program, we can load the user’s program into the same memory location every time and not change it. This method of calculating all physical addresses before the program runs is called static address translation.

Fixed memory management is simple and the program runs fast, but the disadvantages are obvious. Programs run by putting the entire program into memory, and even though we “scale” memory, programs still don’t run when they are larger than the actual physical memory. In addition, because it is a fixed partition, it may not run on different operating systems.

2. Memory management for multi-channel programming

In multi-channel programming environment, it can not be sure the program is loaded into the fixed memory address, so we can’t advance the application of physical addresses, and only in a program to calculate physical address upon completion of loading, runtime address translation in the program, we translate this address is called dynamic address translation.

There are two memory management methods for multi-channel programming: fixed partition management and non-fixed partition management.

3. Address translation

The physical address is obtained by adding the virtual address of the program to the start address of the area it occupies.

Physical address = virtual address + start address of the area where the program resides.

We call the starting address of the program’s region the base address, and the maximum length that the program can load is called the limit, stored in the base address register and limit register respectively. The effective address range of a program is the base address, limit.

summary

The above is about the single-channel programming and multi-channel programming environment under the memory management of some introduction, I hope to help readers, if there is anything wrong, welcome comment correction.