Virtual Memory Flashcards

(16 cards)

1
Q

What is virtual memory?

A

Abstraction layer that gives program feeling of a big block of contiguous memory

Virtual memory allows for efficient memory management by creating an illusion of a large memory space.

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

What is the key idea of the working set algorithm?

A

Must allocate enough frames to process the current locality

The working set algorithm helps to avoid thrashing by ensuring that enough memory is allocated for the active set of pages.

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

Define page fault frequency.

A

An acceptable page fault rate

A high page fault frequency indicates that a process requires more frames, while a low frequency suggests that a process can afford to lose a frame.

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

What are memory mapped files?

A

Logical connection between file and chunk of memory on the SSD

Memory mapped files improve performance by allowing files to be read using demand paging.

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

What is memory mapped I/O?

A

Allows more convenient access to I/O devices

Memory mapped I/O simplifies operations for the operating system by enabling read/write from special memory locations.

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

What is kernel memory?

A

Needs to be physically contiguous and allocated from memory pool

Kernel memory management is essential for system stability, and it often uses the buddy system or slab allocation.

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

What is the buddy system?

A

Manages physically contiguous blocks by allocating memory in powers of 2

The buddy system rounds up memory requests to the next power of 2, which can lead to memory wastage.

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

What is slab allocation?

A

Comprises one or more physically contiguous pages

Slab allocation reduces the cost of finding, allocating, and freeing objects in memory.

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

What are the advantages of smaller pages?

A

Less internal fragmentation

Smaller pages can lead to more efficient memory use, but may not hold larger objects.

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

What are the advantages of large page tables?

A

Fewer pages needed, smaller page tables

Large pages are beneficial for big applications like databases, but can lead to wasted space with many small processes.

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

What is locality in memory management?

A

Programs tend to reuse data and instructions

Locality includes spatial locality (neighboring locations are likely accessed) and temporal locality (recently accessed locations are likely accessed again).

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

What is thrashing?

A

Occurs when the size of the locality exceeds the total memory size

Thrashing can severely degrade system performance due to excessive page faults.

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

What is a working set window (delta)?

A

Most recent page references is delta. Looks back at last delta time units that it took to run a process. If delta is 10ms, the working set window is the last pages touched in the last 10ms

The size of the working set window is critical in managing memory effectively and preventing thrashing.

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

Fill in the blank: If delta is too small, it fails to encompass _______.

A

entire locality

Adjusting the delta size is important for accurately capturing memory usage patterns.

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

Fill in the blank: If delta is too big, you might include pages from past _______ that are not active anymore.

A

localities

This can lead to inefficient memory allocation and potential thrashing.

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

True or False: If delta is infinite, it contains all pages accessed by the process during execution.

A

True

An infinite delta would capture the entire history of memory accesses, which may not be practical.