Chapter 6: Memory Management Flashcards
(33 cards)
Physical Memory (RAM)
A hardware structure, consisting of a linear sequence of words that hold a program during execution.
Word
A fixed-size unit of data (typically 4 bytes, but can be other sizes)
physical address
is an integer in the range [0 : n-1] that identifies a word in a physical memory of size n. The address comprises a fixed number of bits. A memory of size n requires an address size of k bits, where n = 2^k.
logical address space
an abstraction of physical memory, consisting of a sequence 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 the range [0:m-1] that identifies a word in a logical address space. Prior to execution, a logical address space is mapped to a portion of physical memory and the program is copied into the corresponding locations.
source module
A program or a program component written in a symbolic language, like C, or an assembly language, that must be translated by a compiler into executable machine code.
object module
The machine-language output of a compiler or assembler generated from a source module. An object module may be self-contained and executable or multiple object modules may be linked together into a load module by a linker or linkage editor
load module
a program or 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. The relocation may be between two logical address spaces or from a logical address space to a physical address space.
Static relocation
binds all logical addresses to physical addresses prior to execution
Dynamic relocation
postpones the binding of a logical address to a 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.
First-fit
always starts the search from the beginning of the list and allocates the first hole large enough to accommodate the request
Next-fit
starts each search at the point of the last allocation
Best-fit
searches the entire list and chooses the smallest hole large enough to accommodate the request
worst-fit
takes the opposite approach from best-fit by always choosing 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
50% rule
if the probability of finding an exact match for a request approaches 0, one-third of all memory partitions are holes, and two-thirds are occupied by blocks. n = .5m where n is the number of holes and m is the number of occupied blocks.
swapping
the temporary removal of a module from memory. The module is saved on disk and later moved back to memory. Dynamic relocation is necessary so that the module can be placed into a different location without modification.
memory compaction
the systematic shifting of modules in memory, generally in one direction, to consolidate multiple disjoint holes into one larger hole.
linking
The act of resolving external references among object modules and can be done statically, before loading, or dynamically, while the program is already executing.
sharing
the act of linking the same copy of a module to multiple other modules. Sharing improves memory utilization by allowing multiple processes to share common routines or services (Ex: compilers, editors, word processors), or common data (Ex: dictionaries). Sharing is possible under both static and dynamic linking.
page
A fixed-size contiguous block of logical address space identified by a single number, the page number.
page frame
a fixed-size contiguous block of physical memory identified by a single number, the page frame number.
A page frame is the smallest unit of data for memory management and may contain a copy of any page.