P3L2 Flashcards

(32 cards)

1
Q

Principles of Memory Management Systems

A
  1. ) Use intelligently sized containers
  2. ) Nota ll memory is needed at once
  3. ) Optimized for performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Memory Management Goals

A

Allocate and Arbitrate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Allocate

A

map pages from virt mem into page frames from physical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Arbitrate

A

page tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

MMU

A
  • translate virtual to physical accesses

- report faults

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What causes faults

A

illegal access
permission
not present in mm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

HW Support Registers

A

Pointers to page table

base and limit size, number of segments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Cache - TLB

A

Translation Lookaside Buffer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

VPN

A

Virtual Page Number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

PFN

A

Page Frame Number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Page tables are per

A

process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Page Table Flags

A
  • Present (valid/invalid)
  • Dirty
  • Accessed
  • R/W (permission bit)
  • U/S (permission bit - user / supervisor)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Page Fault when

A

H/W determines a physical mem access cannot be performed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Page Fault Handler

A

determines action based on error code and faulting addr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Hierarchical Page Tables

A

Outer page table == Page Table Directory

Internal page table == only for valid virtual memory regions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Multi-level PT Tradeoffs

A

Smaller internal page tables / directories

but more memory accesses required for translation

17
Q

Page Table Cache

A

Translation Lookaside Buffer

MMU Level address translation cache

18
Q

Why small number of cached entry = high TLB hit rate

A

temporal and spacial locality

19
Q

Example of inverted page tables

A

Hashing Page Tables

20
Q

Memory allocator

A

determines VA to PA mapping

21
Q

Memory Allocation Challenges

A

permit coalescing / aggregation of free areas

avoid or limit extend of fragmentation

22
Q

Allocators in Linux

23
Q

Buddy

A

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

24
Q

Slab allocator

A

-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