There are many mechanisms and policies associated with memory management. The requirements that memory management is intended to address, these include: relocation, protection, sharing, logical organization, and physical organization.
The reason relocation is needed is because in many multiprogramming systems the main memory is shared amongst a number of processes. To maximize processor efficiency it is important to be able to swap programs in and out of the main memory. Once the program is swapped out of the disk it would be restricting if the program had a go to the exact same location as before, but with relocation it is possible to relocate the process to a different area of the memory. However, an operating system still needs to know the location of the program in the main memory and because the operating system is ...view middle of the document...
In order to ensure memory spaces are isolated for the process memory references are generated by process and must be checked at run time. Unless there is a special arrangement in place programs cannot access the data areas of other processes.
Sometimes processes need to execute the same program, so to increase efficiency each process has access to the same copy of the program thus removing the need to process the program separately. This access is called sharing and is effective in memory management systems to allow controlled access to shared areas of memory without compromising essential functions.
The computer's memory is divided into at least two levels: main memory and secondary memory. Logical organization of main memory and a computer system has linear organization or one-dimensional consisting of address space with a sequence of bytes and words, and secondary physical organized memory. Programs are organized into modules, some of these modules can be modified but most are read-only and execute only. By organizing programs as modules it is then possible to apply different degrees of protection. Also it is possible to introduce mechanisms by which modules can be shared amongst processes and increases the user’s ability to specify the sharing that is desired in each process.
We know that a computer's memory is organized into at two levels main memory and secondary memory. The main memory provides a user with fast access but does not permit the user to store any data for an extended time. Secondary memory is slow to access but does provide the user with a large capacity for long-term data storage. A further explanation would be that secondary memory holds data for long-term storage for programs and data while the smaller main memory holds the programs and data currently being used.
Operating Systems: Internals and Design Principles, Seventh Edition, by William Stallings. Published by Prentice Hall.