Storage Management Objectives and Functions
For users, it is naturally desired that programs can run normally in memory without interference from other processes residing in memory. Furthermore, during program execution, users do not wish to observe the swapping process between internal and external storage, nor how logical addresses within a program are converted into physical addresses; these operations should be transparent to the user.
Therefore, memory management must achieve two primary objectives:
- Address Protection: A program cannot access the memory address space of another program.
- Address Independence: The user does not care whether specific addresses used by the program are absolute or relative at any given time; regardless of whether the program resides in main memory or on secondary storage, these operations should be automatically handled by the memory management system.
Functions of Storage Management
- Allocation and deallocation of memory space
- Implementation of logical address-to-physical address translation
- Method 1: Use absolute addresses during programming or compilation.
- Method 2: Static address translation (static relocation), where the conversion from all logical addresses to physical addresses within a program is completed at once when the program is loaded into memory.
- Method 3: Dynamic address translation (dynamic relocation), wherein system hardware performs the conversion of logical addresses to physical memory addresses whenever such an instruction appears during program execution.
- Sharing and protection of memory space
- Expansion of memory space