LATEST UPDATE (ALREADY GRADED A+)
Virtual Memory
Technique that allows execution of a program that may not completely reside in memory (RAM).
Removes burden of memory resource management from the programmer. OS Controller (with
architecture help)
Program Controlled Memory Management
OS Controlled Memory Management
Demand Paging
Bringing a page into memory only when it is needed. Less I/O and memory needed, faster response,
more users.
Page Fault
an interrupt when the program needs to run code that is not loaded in physical memory signaling the OS
to remove a page frame from physical memory to make room for the new a page frame.
Demand Segmentation
involves the reallocation of variable sized segments into the address space.
Reference String
Evaluate algorithm by running it on a particular string of memory reference (reference sting) and
computing the number of page faults on that string
Temporal principle of locality
suggests those pages that haven't been referenced in some time and wont be referenced in the near
future
External Fragmentation
Total memory space exists to satisfy a request, but it is not contiguous
Internal Fragmentation
Allocated memory may be slightly larger than requested memory, holes in the memory block allocated
Compaction
-Reduce external fragmentation
-Shuffle memory contents to place all free memory together in one large block
, Stack Allocation
-Used to allocate local variables
-Grown and shrunk on procedure calls and returns
-Register allocation works best for stack-allocated objects
Best Fit
-Keep linked list of free blocks
-Search he whole list on each allocation
-Choose block that comes closest to matching the needs of allocation
-Save excess for later
-Merge adjacent free blocks during release operation
First Fit
-Keep linked list of free blocks
-Scan the list for the first block that comes closest to matching the needs of allocation
-Merge adjacent free blocks during release operation
Optimal Page Replacement
Replace the page that will not be reference for the longest time. Gives the lowest possible fault rate but
is impossible to implement.
First-In, First-Out (FIFO)
The oldest page in physical memory is the one selected for replacement. Poorest replacement policy
Worst Fit
-Keep linked list of free blocks
-Search the whole list on each allocation
-Choose block that worst matches the request
-Save excess for later
-Merge adjacent free blocks during release operation
Next Fit
-Keep linked list of free blocks
-Start where the last search left off
-Scan the list for the first block that comes closest to matching the needs of allocation
-Merge adjacent free blocks during release opertion
Overlays
Programmer breaking code into pieces that fit into RAM. These pieces, called overlays, are loaded and
unloaded by the program
Page Table
Table that holds VA -> PA translations (Virtual address to physical address)