Chapter 10 - Virtual Memory Flashcards

1
Q

What does virtual memory do?

A

Virtual memory abstracts physical memory into an extremely large uniform array of storage.

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

What are the benefits of virtual memory?

A

The benefits of virtual memory include the following:
1. a program can be larger than physical memory
2. a program does not need to be entirely in memory
3. processes can share memory
4. processes can be created more efficiently

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

What is demand paging?

A

Demand paging is a technique whereby pages are loaded only when they are demanded during program execution. Pages that are never demanded are thus never loaded into moemry.

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

When does a page fault occur?

A

A page fault occurs when a page that is currently not in memory is accessed. The page must be brought from the backing store into an available page frame in memory.

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

What does copy-on-write allow?

A

Copy-on-write allows a child process to share the same address space as its parent. If either the child or the parent process writes (modifies) a page, a copy of the page is made.

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

What happens when available memory runes low?

A

When available memory runs low, a paage-replacement algorithm selects an existing page in memory to replace with a new page. Page-replacement algorithms include FIFO, optimal, and LRU. Pure LRU algorithms are impractical to implement, and most systems instead use LRU-approximation algorithms.

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

What do global page-replacement algorithms do?

A

Global page-replacement algorithms select a page from any process in the system for replacement, while local page-replacement algorithms select a page from the faulting process.

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

When does thrashing occur?

A

Thrashing occurs when a system spends more time paging than executing.

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

What does a locality represent?

A

A locality represents a set of pages that are actively used together. As a process executes, it moves from locality to locality. A working set is based on locality and is defined as the set of pages currently in use by a process.

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

What is memory compression?

A

Memory compression is a memory-management technique that compresses a number of pages into a single page. Compressed memory is an alternative to paging and is used on mobile systems that do not support paging.

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

How is kernel memory allocated?

A

Kernel memory is allocated differently than user-mode processes; it is allocated in contiguous chunks of varying sizes. Two common techniques for allocating kernel memory are
1. the buddy system
2. slab allocation

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

What does TLB reach refer to?

A

TLB reach refers to the amount of memory accessible from the TLB and is equal to the number of entries in the TLB multiplied by the page size. One technique for increasing TLB reach is to increase the size of pages.

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

How do Linux, Windows, and Solaris manage virtual memory?

A

Linux, Windows, and Solaris manage virtual memory similarly, using demand paging and copy-on-write, among other features. Each system also uses a variation of LRU approximation known as the clock algorithm.

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