P3L2 Flashcards Preview

CS6200 Final > P3L2 > Flashcards

Flashcards in P3L2 Deck (32):
1

Principles of Memory Management Systems

1.) Use intelligently sized containers
2.) Nota ll memory is needed at once
3.) Optimized for performance

2

Memory Management Goals

Allocate and Arbitrate

3

Allocate

map pages from virt mem into page frames from physical

4

Arbitrate

page tables

5

MMU

- translate virtual to physical accesses
- report faults

6

What causes faults

illegal access
permission
not present in mm

7

HW Support Registers

Pointers to page table
base and limit size, number of segments

8

Cache - TLB

Translation Lookaside Buffer

9

VPN

Virtual Page Number

10

PFN

Page Frame Number

11

Page tables are per

process

12

Page Table Flags

-Present (valid/invalid)
-Dirty
-Accessed
-R/W (permission bit)
-U/S (permission bit - user / supervisor)

13

Page Fault when

H/W determines a physical mem access cannot be performed

14

Page Fault Handler

determines action based on error code and faulting addr

15

Hierarchical Page Tables

Outer page table == Page Table Directory
Internal page table == only for valid virtual memory regions

16

Multi-level PT Tradeoffs

Smaller internal page tables / directories
but more memory accesses required for translation

17

Page Table Cache

Translation Lookaside Buffer
(MMU Level address translation cache)

18

Why small number of cached entry = high TLB hit rate

temporal and spacial locality

19

Example of inverted page tables

Hashing Page Tables

20

Memory allocator

determines VA to PA mapping

21

Memory Allocation Challenges

permit coalescing / aggregation of free areas
avoid or limit extend of fragmentation

22

Allocators in Linux

Buddy
Slab

23

Buddy

Start with 2^x, split into powers of two until can satisfy request
-Aggregation works well and fast

24

Slab allocator

-caches for common object type/sizes on top of contiguous memory

25

Demand paging

virtual memory is much greater than physical memory
virtual memory page is not always in physical memory (swapping)

26

Freeing up Physical Memory

when memory usage is above threshold (high watermark)
when CPU usage is below threshold (low watermark)

27

LRU Policy

Least Recently Used

28

What pages to swap out

- Least recently used (access-bit to track)
- Pages that don't need to be written out (dirty bit)
- Avoid non-swappable pages

29

COW

Copy-on-write

30

Checkpointing

1. write-protect and copy everything once
2. copy diffs of "dirtied" pages for incremental checkpoints

31

Debugging

Rewind-Replay
1. Gradually go back to older checkpoints until problem found

32

MIgration

Repeated checkpoints in a fast-loop until pause and copy becomes acceptable