Requirements of memory management system


Memory is considered a major part of the operating system to store and access the data. Memory management is a complex task that is performed by the OS when the main memory has limited space and requires more switching operations during multiuser environments. It functions to manage the status of the processes which are in ready, waiting, or execution states and allocates or frees the memory location based on the completion of each process. Each process is allocated to a specific memory location and its status of it is monitored and updated in the memory management system. During a multiprogramming environment, the operating system subdivides the memory for multiple processes to perform their functions at the same time, at this phase proper memory management is required so that processor never gets into an idle state.

Memory management has two different schemes to store the data in the system. Contiguous approach where the processes are assigned to fixed blocks of memory, with larger sizes and stored in a memory location that has consecutive addresses whereas in the non-contiguous approach, the processes are stored in different blocks that are located at different memory portions not needed to be in a consecutive manner which seems to be an efficient technique as it uses memory spaces only when needed.

Requirements of memory management

Memory management system requires a few of the basic requirements for its processing and storage which are discussed below.

Sharing of memory

During a multi-process environment, all the processes access the same part of the main memory. Here protection measures are required during this sharing process which is taken care of by memory management. This approach of sharing has been an advantageous one because each process does not need a separate copy to be created as they access the shared copy already available in the memory. Shared memory is considered an efficient approach during inter-process communication methods.

Memory protection

Protection mechanisms have to be satisfied by the processor which is in the execution state, to avoid interference of other unauthorized to perform write operations to the same file located in the shared memory space. This has to be in control by the processor of the system rather than the installed operating system, as OS has a function to control the process which occupies them, thereby checking the reference of the valid memory. In simple terms, protection is the method of securing the memory from unauthorized processes.

Mapping of Address /Relocation βˆ’

During the time of process execution, the user may not know about other programs that are residing in the main memory, here swapping happens to the disk and it gets returned to the main memory but with a different location. Relocation happens after swapping because the previous memory location where the process already resided will now be used by another process. Once the process gets loaded to the memory, translation must happen from the logical address to the physical address, which is done by the associated process and the operating system. A physical address contains a combination of logical addresses and contents related to the relocation register.

Logical addressing βˆ’

Programs that are stored inside the memory units are organized into modules and these modules are modifiable with read and execute permission but a few do not have permission to modify. The sequence of bytes or otherwise as words is the representation form of main memory which is linear and has a one-dimensional address area in nature. As said above, logical addresses are generated by the CPU during the run time of the process. The user programs which are given as input is divided into modules compiled independently and their references are addressed during the run time of the system. Protection can vary on each level of logical spaces where different modules reside.

Physical space βˆ’

As it’s known that the memory of the system has two divisions such as main memory and secondary memory. Main memory (volatile) is capable to store and handle the current programs which are in execution with better performance whereas secondary memory (which acts as nonvolatile) supports storing the data for a long time but provides less performance when compared to main memory. The flow of information and swapping process seems to be a difficult task for the user to understand.

The overlaying approach can be followed by the user when the main memory and the data to be stored are not as sufficient as required. This method allows various modules of a user program allocated to the same memory space. The major drawback is during a multiprogramming environment, the user does not know the details about the space and its location in the memory during the program execution.

Conclusion

So, the memory management system controls and manages the available and free spaces during the process execution and at the idle phase. Dynamic allocation is also provided to the user based on their request and deallocates the unused memory when not needed. This system should manage the above-given requirements for effective storage and processing of user programs.

Updated on: 17-Jul-2023

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements