Memory Flashcards
Physical Memory AKA
RAM
Memory needs to be
subdivided
Memory hierarchy
Registers, cache, main memory, solid state disk, magnetic disk
Memory management is an _ task under _
optimization task under constraints
Fixed-partition Allocation divides memory into
Fixed-size partitions
Fixed-partition allocation, each partition contains
exactly one process
In fixed-partition allocation, the degree of multiprogramming is bound by
the number of partitions
In fixed-partition allocation, what happens when a process terminates
The partition becomes available for other processes
Internal Fragmentation
Allocated memory may be slightly larger than requested memory
internal fragmentation size difference
is memory internal to a partition but not being used
Variable-partition scheme (dynamic) process
When a process arrives, search for a hole large enough for this process
Variable-partition scheme (dynamic) hole definition
Block of available memory; holds of various size are scattered throughout memory
In Variable-partition scheme (dynamic), how much memory is allocated
Only as much memory as needed
in Variable-partition scheme (dynamic), what does the OS maintain information about?
Allocated Partitions
Free partitions (hole)
External Fragmentation
Total memory space exists to satisfy a request, but it is not contiguous
What could fixed-partition allocation lead to?
Internal Fragmentation
What could Variable-partition scheme (dynamic) lead to?
External Fragmentation
How to reduce External Fragmentation?
Compaction
External Fragmentation 50% rule
number of holes = .5 * number of occupied blocks
Compaction
Shuffle memory contents to place all free memory together in one large block
Compaction is only possible when? and at done when?
It is only possible if relocation is dynamic and is done at execution time
First-fit
Allocate the first hole that is big enough
Best-fit
Allocate the smallest hold that is big enough
Best fit must do what?
Search entire list, unless ordered by size
What will best-fit produce?
The smallest leftover hole
Worst-fit
Allocate the largest whole
Next-fit
Starts each search at the point of the last allocation (round robin)
What must worst-fit do?
Search the entire list
Worst-fit produces
The largest leftover hole
Which dynamic storage-allocation is fastest?
First-fit
Word
Fixed size unit of data, usually 4 bytes
Logical Address Space
An abstraction of physical memory, consisting of a sequence of imaginary memory locations [0: m-1]
Source Module
A program or program component written in a symbolic language like C or assembly, that must be translated by a compiler or assembler into executable machine code
Source Module to object module
Translation
Object module(s) to Load Module
Linking
Object Module
The Machine language output of a compiler or assembler from a source module.
Load Module
A program or combination of programs in a form ready to be loaded into main memory and executed
Load Module on disk to Load module in memory
Loading
What are system libraries
Load modules on disk and in memory and in execution