1 - Memory Management Flashcards
If program A is loaded into memory starting at physical (real) address 1000 with logical (virtual) address 23, where is it bound?
1023
What does a process consist of
Code, variables and constants
Give Kibibytes in bytes
2^10
Give Mebibytes in bytes
2^20
Give Gibibytes in bytes
2^30
Segmentation
Splitting a process up logically. Each segment has read, write and execute protection
What is paging?
Paging splits process up into smaller size parts of equal size
What is a page in real memory called?
Frame
Pros and cons of pure paging
Poor Protection/sharing
Little wasted space
What does a page table denote?
Where each of the process’ virtual pages are in main memory
Demand Paging
Wait until a process makes reference to a page before loading.
upon page fault (page not in memory) load it rom backing store
What is the valid-invalid bit?
Valid if page is in memory
Invalid if not
What is page replacement?
When a free page is not available, use a page replacement algorithm to deicide victim frame to replace
FIFO Page Replacement
First in First Out.
Simple queue of page age
Modified Bit
Set to 1 when page is changed in main memory.
Speeds up replacement as only need to write to backing store if changed
What is Thrashing?
Running processes are spending more time loading pages into memory than executing code
Reduce degree of multiprogramming to stop it
Define working set
Set of pages accessed by a process in the past x ref
Each set being a locality
Working Set Size
Tells us how many pages are in the WS of i (ie actively in use)
D <= m to avoid thrashing (m is total num of frames avail.)
What is total demand?
D = WSS(i) where that is the sum of all processes working set sizes
What is an inverted page table?
A table that reflects the state of the real memory
Find by using the pair (process_id, virtual page number)
Resort to process page table if virtual page not found in main memory
What is Belady’s Anomaly?
More frames = more page faults in some ref strings