In this paper I will discuss the memory management requirements for Operating Systems. The memory management requirements in operating systems are relocation, sharing, protection logical organization, and physical organization.
Memory Management Requirements
Main memory is an important part in a computer system because the operating system and many user applications must input into the main memory before the execution stage begins. The effectiveness of memory management affects the efficiency of the computer system. Efficient amount of memory must be obtainable to reduce the quantity of processor idle time while the computer’s devices are arranging to react. Effect memory management consists of a series of important requirements, which are relocation, protection, sharing, logical and physical organization.
Relocation is a basic requirement of memory management. For simplification purposes let us assume that the process image occupies a contiguous region of main memory. The operating system need to know the location of: Process control information; Execution stack; Entry point to begin the execution of a program. The ‘Processor’ must deal with memory references within the program. The ‘Branch instructions’ contain an address to reference the instruction to be executed next. Then the ‘Data reference instructions’ contain the address of the byte or word of data referenced.
Any protection mechanism must have the flexibility to allow several processes to access the same portion of main memory. For an example, if numbers of processes are executing the same program then it is advantageous to allow each process to access the same copy of the program rather than its own separate copy.
Once we have two programs in memory at the same time there is a danger that one program can write to the address space of another program. Every process should be protected against unwanted interference by other processes. Satisfaction of the relocation requirement increases the difficulty of satisfying the protection requirement.CPU tend to support absolute addressing which means that code runs differently when loaded in different places. It is not possible to check the absolute address at compile time. Most of the programming languages allow the dynamic calculation of address at run time.
Main memory is organized as a linear or one-dimensional address space that consists of sequence of bytes or words. Secondary memory at its physical level is similarly organized. Most of the programs are organized into modules. Those advantages of modules can be written and compiled independently, protecting (such as read-only, execute-only) is given to different modules, and introducing mechanism by which modules can be shared among processes.