chapter 19 - Paging: Faster Translations Flashcards

(10 cards)

1
Q

what is a translation lookaside buffer (TLB)

A

cache in MMU that stores recent VPN → PFN translations

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

Why is the TLB important?

A

It avoids expensive page table lookups by quickly translating virtual addresses on a TLB hit

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

What happens on a TLB hit?

A

Use the PFN from the TLB, combine it with the offset, and directly access memory

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

What happens on a TLB miss?

A

Walk the page table in memory to find the PFN, then update the TLB with the new mapping

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

What is the typical structure of a TLB entry?

A

VPN (Virtual Page Number)

PFN (Physical Frame Number)

Valid bit

Protection bits

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

Who handles TLB misses?

A

Hardware-Managed TLB: CPU handles miss and updates TLB

Software-Managed TLB: OS handles miss via trap handler

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

What issue does a context switch cause for the TLB?

A

Old TLB entries may contain mappings for a different process → invalid!

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

How to solve TLB issues on context switch?

A

Use ASIDs (Address Space IDs) to tag TLB entries by process

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

Why is TLB replacement needed?

A

TLBs are small, and we must evict entries when it’s full

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

What are common TLB replacement strategies?

A

LRU (Least Recently Used)

Random Replacement

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