Virtual Memory (week 9) Flashcards
where is virtual memory of the computer
it is on the fast secondary memory (hard disk) of your computer
why is sole use of primary memory not enough to run programs
–> Because large portions of most programs are not executed most of the time.
–> Therefore, large portions of programs need not be in memory.
–> Need to maximize the use of primary memory by loading as many programs as possible so as to increase CPU utilization.
what is virtual memory and what does it do ?
–> Virtual memory allows the execution of
processes that are not completely in memory
–> Each process’s address space is partitioned into parts that can be loaded into primary memory
–> Partitions which are not needed are written to secondary memory
–> Allows program that are larger than physical memory to be executed
Every process has code and data ______
locality
when is there a change in locality
As computation moves to a different
phase there is a change in locality
how is the address space partitioned
Address space is logically partitioned
–> Text, data, stack
–> Initialization, main, error handle
how is virtual memory organized
for example if there is 2 parts of a program (Pi) which is part A and part B first the part A will be loaded into primary memory and after part A has been executed it will be sent back to virtual memory and part B will loaded into primary memory.
why is there a need to implement an additional layer of abstraction for virtual memory
An additional layer of abstraction is implemented to map the physical addresses of data stored in RAM to virtual memory addresses that can be used by the OS
.
.
To support virtual memory, the computer
system needs to manage memory in _______
blocks
Virtual memory system transfers “blocks” of
the address space to/from _______
primary memory
what are the 2 types of blocks
Fixed size blocks (paging)
Variable size blocks (segmentation)
what is the commercially dominant form of virtual memory today ?
demand paging
what is fixed size block s
System-defined pages are moved back and forth between primary and secondary memory
what is variable size blocks
Programmer-defined segments - corresponding to logical fragments – are the unit of movement