Paging Flashcards

1
Q
  • What is the basic idea of paging?

- What problems of segmentation does it solve?

A
  • We divide the memory into fixed-size slots of memory “Page frames” (as opposed to segmentation). Pages are the memory called.
  • Internal (e.g. big constructs like the heap) and external fragmentation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the page table?

A

The page table is the heart of paging. It maps virtual address numbers (VPN) to physical frame numbers (PFN). Each process needs to have a page table.

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

How does the address translation work?

A

The virtual address is divided into VPN and offset. The VPN is the number of bits needed to address all pages (e.g. for 4 pages it is 2 bits). The rest is the offset (size of the page).
- The offset is the same for physical address but the VPN to PFN can change completely (even the nr. of bits).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
  • What is the Translation Lookaside Buffer (TLB)?
  • What problem of paging does it fix?
  • What is the principle of locality?
A
  • Hardware based cache in the MMU
  • Fixes the problem of using too much memory for having all pages in memory
  • Locality means that most of the time the same memory (temporal loc) or a near memory address (spatial loc) is accessed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does a TLB Entry look like?

A

TLB entry is fully associative

  • VPN
  • PFN
  • Valid bit (If this entry is filled or not)
  • Protection bit (read write exec)
  • Address space identifiers (ASID) (to which process it belongs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

TLB is efficient because of the principle of locality but the memory consumption of paging remains.

  • Why are huge pages a bad solution ?
  • Why is the combination of paging and segmentation not optimal?
A
  • Internal fragmentation

- Internal and external fragmentation through segmentation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
  • What is the multi-level page table?
A
  • Basic idea: Use another level (directory) to reference page chunks. This solves memory consumption on the cost of efficiency. (Tradeoff)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How does the multi-level page table work? (Generally)

A
  1. Divide page table into page-sized chunks
  2. Use a page directory to reference the page-sized chunks
  3. Returns PFN of chunk or indicates that the whole chunk is empty
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What datastructure is the page directory?

- What does a page directory entry need?

A
  • Linear array with one entry per chunk
  • Valid bit (indicates if chunk is used or not)
  • PFN of the page table chunk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly