COMP 322 Chapter 7: Virtual Memory Flashcards

To study and learn Chapter 7

1
Q

Virtual Memory

A

A collection of one or more logical address spaces.

It may exceed the size of the physical memory

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

Demand paging

A

The principle of loading a page into memory only when the page is needed, rather than at the start of the execution.

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

A present bit

A

A binary flag/bit in a page table, it indicates whether the corresponding page is currently resident in memory.

If the page is resident, the entry points to the frame that holds the page.

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

A page fault

A

An interrupt that occurs when the program attempts to reference a non-resident page.

if a page fault occurs it sets the present bit to 1.

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

Page replacement

A

The act of overwriting a page in memory with a different page loaded from the disk when needed.

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

The modified-bit (m-bit)

A

A binary bit that indicates whether the corresponding page has been modified during execution.

The modified bit is set to 1 automatically by any instruction that stores data into the page and is used by the OS.

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

Potential size of the Virtual Memory (VM)

A

2^(64)

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

Potential size of segment and page tables

A

2^(26)

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

A reference string

A

The sequence of page numbers referenced by an executing program.

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

The optimal page replacement algorithm

A

An algorithm that searches the most distant resident page and replaces it with the page that causes a page fault.

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

FIFO page replacement algorithm

A

Selects the page that has been resident in memory for the longest time.

It takes advantage of the principle of locality.

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

Least-recently-used page replacement algorithm (LRU)

A

Selects the page that has not been referenced for the longest time.

Requires a queue of length n (The number of memory frames).

When a page fault occurs, the page at the head of the queue is removed and and a new page is inserted at the end.

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

Requirement for the LRU

A

The LRU requires the queue of the pages to be modified at each memory reference.

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

The referenced bit (r-bit)

A

A bit associated with a page and is set automatically by the hardware whenever the page is referenced by any instruction.

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

Aging register

A

it is associated with a page and is shifted periodically to the right by 1 bit.

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

The aging page replacement algorithm

A

Does not maintain the pages sorted in the exact LRU order.

It groups together pages referenced during a period of consecutive references.

Each period is represented by 1 bit when shifting the aging register.

17
Q

Second-chance page replacement algorithm

A

Is a coarse grain approximation of LRU.

It uses the r-bit to divide all pages into two categories:
recently referenced and non-recently referenced.

A page is then selected from the not-recently referenced category.

18
Q

The third-chance page replacement algorithm

A

aka the not-recently used page replacement algorithm (NRU).

It is a coarse grain approximation of the LRU.
It divides the pages into 4 categories which is based on the 4 possible combinations of the r-bit and the m-bit:

The possible combinations are:
(for the modified page)
11 -> 01
01 -> 00

10 -> 00 unmodified page

19
Q

The optimal working set

A

a set of resident pages that will be needed in the immediate future and should remain resident.

20
Q

The working set (WS)

A

At time t, It is the set of pages referenced during the past d memory operations preceding t.

21
Q

The working set page replacement algorithm

A

An algorithm that determines which pages must be resident but not in which frames.

22
Q

Page fault frequency replacement algorithm

A

An algorithm takes a direct approach to controlling page fault rate by adjusting the current resident set based on how frequently consecutive page faults occur.

23
Q

Page fault rate

A

its the number of page faults f occurring during a number of memory references t.

24
Q

Effective access time

A

The average time to access memory in the presence of page faults in the presence of page faults.

25
Q

Equation of effective access time

A

E = (1 - P) * m + P * S

26
Q

Load control

A

The activity of determining how many processes should be running concurrently at any given time.

27
Q

Thrashing

A

An execution state during which most of the time is spent on moving pages between the memory.

It occurs when there are too many processes are sharing memory concurrently.

28
Q
A