Virtual Memory Flashcards
VM was created to allow running ____.
processes with memory requirements larger than available RAM to run in the computer.
Currently, VM is used mainly to give each process its own address space.
True/False
True
VM only keeps in RAM the memory that is currently in use.
The remaining memory is kept in disk in a special file called ___.
Swap space
VM implementations:
Process swapping: The entire memory of the process is ___.
swapped in and out of memory
VM implementations:
Segment swapping:
___ are swapped in and out of memory (libraries, text, data, bss etc).
Entire parts of the program (process)
There are 3 VM implementations:
___ swapping
___ swapping
___
process; segment; paging
Which of the following about paging is false?
A. Paging is used by modern operating.
B. The unit of memory that is swapping in and out is a page.
C. Paging divides the memory in pages of different sizes.
D. Usually the size of a page is 4KB in x86.
C.
Paging divides the memory in pages of fixed size.
Paging:
The virtual memory system will keep in memory ___.
It will leave in disk ___.
the pages that are currently in use; the memory that is not in use
Each page in the address space is backed by a file in disk, called ___.
backing-store
Name the backing store for the following memory section: Text ROData Data BSS Stack Heap
Exe file; exe file; exe file (not modified), swap space (modified); swap space; swap space; swap space
Name the permissions (RWX) for the following memory section: Text ROData Data BSS Stack Heap
RX; R; R, RW; RW; RW; RW
Any section in memory that is not persistent and will go away when the process exits is stored in ___.
Swap space
___ translates virtual memory addresses to physical memory addresses.
Memory Management Unit (MMU)
___ memory addresses: the address that the CPU is using. Addresses used by programs are of this type.
Virtual
___ memory addresses: The addresses of RAM pages. This is the hardware addresses.
Physical
The MMU has a ___ that points to the current page table that will be used for the translation.
page table register
Every process shares a page table.
True/False
False.
Each process has its own page table.
The page table register is updated during ___.
The page table has the information of ___.
a context switch from one process to the other.
the memory ranges that are valid in a process.
Consecutive pages in virtual memory are consecutive pages in physical memory.
True/False
False.
Consecutive pages in virtual memory may correspond to non-consecutive pages in physical memory.
To prevent looking up the page table at every memory access, the most recent translations are stored in ___.
Translation Look-Aside buffer (TLB)
The TLB ___ the translation from ___ to ___ memory addresses.
speeds up; virtual; physical
A page fault is an interrupt generated by ___.
MMU