chapter 21 - beyond physical memory Flashcards

1
Q

What assumption breaks down when memory fills up?

A

That all pages can fit in physical memory

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

What is the solution when memory is full?

A

Use disk as swap space to temporarily hold unused memory pages

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

What is swap space?

A

Disk space used to store inactive pages when memory is full

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

What happens when a page is swapped out?

A

It’s removed from RAM and written to swap space on disk

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

What does the present bit in a PTE indicate?

A

1: Page is in RAM

0: Page is not in RAM → triggers a page fault

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

What is a page fault?

A

When a page is accessed but not in memory, the OS loads it from disk

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

What does the OS do on a page fault?

A

Finds free frame

Loads page from disk

Updates PTE

Retries the instruction

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

What if no free RAM is available during a page fault?

A

A victim page must be evicted to make space

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

What is a page-replacement policy?

A

The algorithm the OS uses to choose a page to evict

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

Why not wait until RAM is completely full?

A

It delays page fault handling

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

What is the high watermark?

A

Amount of free pages the system tries to maintain after evictions

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

What is the swap daemon?

A

A background thread that proactively frees pages to keep RAM available

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

Why evict pages in clusters?

A

To reduce disk seek/rotation overhead and speed up I/O

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

What are the steps for a memory access with paging & swapping?

A

TLB lookup

If miss → Page table lookup

If present → update TLB

If not present → Page fault

Load from disk

Retry access

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

Does the process know the memory managment?

A

No. The OS + hardware handle all paging/swapping transparently.

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