MEMORY MANAGEMENT Flashcards
Main memory is divided into two parts:
one for the operating system and one part for the program currently being executed.
The ‘user’ part of memory may be further subdivided to
accommodate multiple processes in a multiprogramming system.
Memory is allocated to ensure a
reasonable supply of ready processes to consume available processor time.
The memory management module must meet five main requirements, which include:
relocation, protection, sharing, logical organisation, and physical organisation.
Relocation
The role of relocation is the ability to execute processes independently from their physical location in memory.
A program must be compiled and linked in
such a way that it can later be loaded starting from an unpredictable address in memory, an address that can even change during the execution of the process itself.
Protection:
Each process should be protected against unwanted interference by other processes. Programs should therefore not be able to reference memory locations in a process for reading or writing purposes without permission.
All memory references generated by a process must be
checked at run time to ensure that they refer only to the memory space allocated to that process.
Sharing:
Several processes should be able to access the same portion of main memory. If a number of processes are executing the same program, it is good to allow each process to access the same copy of the program instead of accessing its own copy.
Within an individual program, memory references may be included as
branch instructions, which contain an address to reference the instruction to be executed next, and as data reference instructions, which contain the address of the byte or word of data referenced.
Logical organisation:
In RAM, logic is represented in the form of data structures. Physical organisation: Physical data is stored linearly in RAM. These linear pieces of data are stored in bits. Physical storage is always linear and logical structures are imposed over this using some method of organisation.