21. Swapping Mechanisms Flashcards

1
Q

What is swap space?

A

A reserved area in the hard disk that stores memory pages that have been swapped out of memory.

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

What physical component do we need for swapping?

A

Computer hard disk

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

What is the present bit used for?

A

To determine if the page is available in physical memory

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

What is page fault?

A

The act of accessing a page that is not in physical memory

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

What handler is called when a page is not present?

A

Page-fault handler

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

What happens when a page is not present?

A

The OS will call the page-fault handler, which indexes the address in the PTE. Then it issues a I/O request to retrieve the data from the disk, marks the page as present and update the new address in the PTE.

The next step will result in a TLB miss and finally proceed like normal after that

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

What state will the process be in during the page fault process?

A

Blocked state

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

What happens when the memory is full during a potential swap process?

A

The OS has to page out first then page in.

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

What is page-replacement policy?

A

Policies that evict pages that are currently in memory

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

What are the possibilities when a TLB miss occurs?

A
  1. Present and valid bit - regular TLB miss handler
  2. Not present and valid - page fault handler then regular TLB miss handler
  3. Present and invalid - trap handler (invalid access)
  4. Not present and invalid - trap handler (invalid access)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is low watermark and high watermark

A

When the OS notices there are less than low watermark pages available in memory, it evicts pages until there are at least high watermark pages available

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

What is a swap daemon

A

A background thread that evicts pages in memory to make space

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