chapter 18 - paging: introduction Flashcards

1
Q

what is paging in virtual memory

A

Divides virtual and physical memory into fixed-size units

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

What does the page table do?

A

It maps each virtual page number (VPN) to a physical frame number (PFN)

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

Why is paging better than segmentation?

A

No external fragmentation

Simpler memory allocation

No assumptions about memory layout

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

How does the OS track which page frames are free?

A

It maintains a free list or bitmap of available frames

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

What are the two parts of a virtual address in paging?

A

VPN (Virtual Page Number) - frist 2 bits

Offset (position within the page)

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

What is the formula for calculating the physical address?

A

Use VPN to look up PFN in page table

Combine PFN and offset

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

What is the purpose of the Page Table Base Register (PTBR)?

A

Holds the starting address of the process’s page table in memory

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

What is the valid bit in a PTE?

A

Indicates whether the page is valid (in memory). If 0 → segmentation fault

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

What is the present bit in a PTE

A

Indicates if the page is currently in physical memory (vs. swapped out to disk)

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

What is the dirty bit in a PTE?

A

Tells whether the page has been modified since being loaded into memory

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

What does the reference/access bit track?

A

Whether the page was recently accessed → used in page replacement algorithms

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

What are the protection bits in a PTE?

A

Define allowed operations: read (r), write (w), execute (x) → protect

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