COMP 322: Chapter 6: Memory Management Flashcards
Learn Chapter 6 Memory management
Physical memory (RAM)
It is a hardware structure consisting of a linear sequence of words that hold a program during execution.
A word
A fixed-size unit of data.
Can be 1, 2 or 4 bytes
Physical address
An integer of range [0; n-1] that identifies a word in a physical memory of size n.
The address comprises a fixed number of bits.
Logical address space
An abstraction of physical memory.
Consists of imaginary memory locations in a range [0; m-1] where m is the size of the logical address space.
Logical address
An integer in range [0; n-1] that identifies a word in a logical address space.
The word size of an address space depends on ___
Neither the address size nor the address space size.
Program transformations: Source module
It is a program/program component written in a symbolic language such as C or assembly
Program transformations: Object module
It is the machine language output of the compiler.
Program transformations: Load module
is a program or a combination of programs in a form ready to be loaded into main memory and executed.
Program relocation
The act of moving a program component from one address space to another.
Static relocation
Binds all logical addresses to physical addresses prior to execution.
Dynamic relocation
Postpones the binding of a logical address to physical address until the addressed item is accessed during execution.
Relocation register
Contains the physical starting address of a program or program component in memory.
Free space management: First-fit
Always starts the search from the beginning of the list and allocates the first hole large enough to accommodate the request
Free space management: Next-fit
Starts each search at the point of last allocation.
Free space management: Best-fit
Searches the entire list and chooses the smallest hole large enough to accommodate the request.
Free space management: Worst-fit
Takes the opposite approach from best-fit and chooses the largest available hole for any request.
External memory fragmentation
The loss of usable memory space due to holes between allocated blocks of variable sizes.
The 50% rule
If the probability of finding an exact match for a request, one third of all memory partitions to holes.
Swapping
The temporarily removal of a module from memory.
The module is saved on a disk and later moved back to memory.
Memory compaction
The systematic shifting of modules in memory, generally in one direction.
Linking
The act of resolving external references among object modules and can be done statically, before leading or dynamically while the program is already executing.
Sharing
is the act of linking the same copy of a module to multiple other modules.
It improves memory utilization by making processes share common routines or services.
Its possible under both static and dynamic linking.
A page
A fixed-size contagious block of a logical address space identified by a single number. The page number.