Memory Management Flashcards
Swapping
Processes swapped temporarily to a back store then brought back to memory for execution
Advantages of swapping
Increases degree of multiprogramming in a system
Contiguous allocation
Way of organizing program in memory where a program must exist as Contiguous adddreses
Compaction
Shuffle memory contents to place all free memory together in one large block (only when allocation is dynamic)
Requirements of Primary Memory
- The primary memory access time must be as small as possible
- The primary memory must be as large as possible
- The primary memory must be cost effective
Protection of memory space
Protection by using a pair of base and limit registers define the logical address space of a process
Hardware Address Protection
CPU must check every memory access generated in user mode to
be sure it is between base and limit for that user
Address Binding
Mapping and loading instructions and data to locations in RAM (main memory)
Address binding of instructions and data to memory addresses can
happen at three different stages, what are they?
- Compile time: If memory location known a priori, absolute code can be generated; must recompile code if starting location changes
- Load time: Must generate relocatable code if memory location is not known at compile time
- Execution time: Binding delayed until run time if the process can be moved during its execution from one memory segment to another
Logical vs. Physical Address Space
- Logical address – generated by the CPU; also referred to as virtual address
- Physical address – address seen by the memory unit
*Logical and physical addresses are the same in compile-time and load time address-binding schemes; logical (virtual) and physical addresses differ in execution-time address-binding scheme
Logical address space
Is the set of all logical addresses generated
by a program
Physical address space
Is the set of all physical addresses
generated by a program
Memory-Management Unit (MMU)
Hardware device that at run-time maps virtual to physical address
Fixed-Partition Strategy
Divide memory into N fixed size regions,
possibly of different sizes
Internal Fragmentation
- Memory allocated to one process may be more than what it needs
- Memory allocated to one process cannot be used by another, even if it is unused