What Is Memory Management in OS and How Does It work? [MiniTool Wiki]
What Is Memory Management
What is memory management? It is the process of controlling and coordinating computer memory. Parts called blocks are allocated to various running programs to optimize overall system performance. Memory management resides in hardware, operating system, and programs and applications.
How Does It Work?
Main memory refers to physical memory, which is the internal memory of the computer. The main memory is also called RAM. The computer can only change the data in the main memory. Therefore, every program you execute, and every file you access must be copied from the storage device to the main memory.
Related Article: How to Check RAM Speed on Windows 10 (2020 Update)
All programs are loaded into the main memory for execution. Sometimes, a complete program is loaded into memory, but sometimes a part of a program or routine is only loaded into the main memory when it is called by a program. This mechanism is called dynamic loading, which can improve performance.
The Need to Use Memory Management
Now, let’s see the need to use memory management in operating system. The details are as follows:
- You need to place the program in memory to make full use of the memory.
- You should also make sure that these applications do not interfere with each other.
- It allocates space for application routines.
- It helps protect different processes between each other.
- It tracks when inventory is released or unallocated.
- It allows you to check how much memory needs to be allocated to the process to decide which processor should acquire memory.
Memory Management Techniques
Here are some of the most critical memory management techniques.
Segmented Memory Management
Segmented memory is the only memory management method that does not provide linear and continuous address space for your programs. Segments require hardware support in the form of segment tables. It includes the physical address, size, and other data of the section in memory, such as status and access protection bits.
Single Contiguous Allocation
Contiguous memory allocation in OS is the simplest memory management technique. In this method, except for a small part reserved for the operating system, all types of computer memory can be used for an application. For example, the MS-DOS operating system allocates memory in this way.
Do you know how to get rid of invalid MS-DOS function on your Windows computer? Now, in this post, we will show you some effective solutions.
It divides the main memory into various memory partitions, most of which are contiguous areas of memory. Each partition stores all information for a specific task or job. Its’ working methods include allocating a partition when the job starts and canceling the allocation when the job ends.
Paged Memory Management
This method divides the computer's main memory into fixed-size units, called page frames. The hardware memory management unit maps pages into frames that should be allocated according to pages.
Memory allocation is a process of allocating memory or space for computer programs. It has three types.
The first hole large enough is assigned to the program.
The smallest enough hole is assigned to the program.
Largest enough holes to be assigned to the program.
Swapping is the process of putting each process in main memory, running it for a while, and then putting it back to disk. The process needs to be in memory to execute, but sometimes the main memory is insufficient to accommodate all currently active processes in the time-sharing system. Therefore, redundant processes will remain on the disk and make it run dynamically.
The Windows memory management error occurs frequently on the computer’s blue screen due to different reasons.
What is memory management in OS? You may have answers after reading the post. Based on that, you also obtain some extra information about memory management techniques. Here comes the end of the post.