20. Paging: Smaller Tables Flashcards

1
Q

If linear page table consumes too much space, why not use just bigger pages? Are there working systems that use bigger pages?

A

Bigger pages lead to internal framgentation within than page. However, some systems provide an option for a user-process to request a page with bigger size, while still maintaining small size pages as default. This is done to to save space thought, but for TLB to have this entry.

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

What is usual size of a page?

A

4KB or 8KB

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

What are other approaches of constructing page table instead of usual linear page table?

A

Bigger page sizes, hybrid of segmentation and paging, multi-level page tables

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

How does hybrid approach work? How does it reduce the memory overhead of simple linear page table?

A

It’s a hybrid of segmentation and paging. Now each segment (i.e code, stack and heap) would have a different page table and base bounds register (so 3 pairs of registers and 3 page tables). The base and bounds registers are used to indicate start of page table for a segment and its end (how many pages it has). Page table in this case would allocate space only for valid entries

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

What’s the downside of hybrid approach?

A

External fragmentation because of varying page table sizes

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

What is an idea of multi-level page table? What structure does it use?

A

First, the page table is divided into pages itself so we can allocate or deallocate entire pages of page table. This lead to having only those pages of page table, that are valid i.e contain references to used PFNs. Pages that do not have any valid PTEs are marked invalid and space is not allocated for them.

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

What is PDE? What does it minimally has?

A

Page Directory Entry. It’s an entry inside page directory data structure that contains referrences to the second-level page tables which in turn have PTEs inside them pointing to a physical frame number. It minimally has a valid bit and PFN

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

How is virtual address constructed with MLPT?

A

Higher bits are for page directory index, the next coming bits are for the page table entry inside this PDE, and the rest is for offset.

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

What is an inverted page table?

A

It’s a single page table that holds an entry for each physical page of the system

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

How is it defined which bits in virtual address will be used for offset, PDEs and PTEs?

A

First, the offset is calculated based on size of page. Then the remaining number of bits are divided by number of levels in page table

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