Virtual Memory Flashcards

1
Q

What is the goal of Virtual Memory?

A

to allow running processes with
memory requirements larger than available RAM to
run in the computer

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

How does Virtual Memory work today? (very high level)

A

gives each
process its own address space.

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

How does Virtual Memory store memory?

A

VM only keeps in RAM the memory that is
currently in use

The remaining memory is kept in disk in a
special file called “swap space”

This also specifically works through pages

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

Who created the idea of Virtual Memory?

A

Peter Denning a former head of the CS Department at Purdue

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

How does VM speed up OS tasks?

A

● Loading a program. The VM will load pages of the program as
they are needed, instead of loading the program all at once.

● During fork the child gets a copy of the memory of the
parent. However, parent and child will use the same memory as
long as it is not modified, making the fork call faster. This is called
“copy-on-write”.

● Shared Libraries across processes.

● Shared memory

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

What is VM Process Swapping?

A

The entire memory of the process is swapped in and out
of memory

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

What is VM Segment Swapping?

A

Entire parts of the program (process) are swapped in
and out of memory (libraries, text, data, bss, etc.

Problems of process swapping and segment swapping
is that the granularity was too big and some pieces still
in use could be swapped out together with the pieces
that were not in use

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

What is Paging in VM?

A

Process of dividing memory into fixed size, used in modern day OS

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

What is the size of a X86 + ARM page vs. a Sparc
Ultra Architecture/Alpha page?

A

x86+ARM usually 4KB, Spark usually 8Kb

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

What is a Backing Store?

A

A file in disk that “backs” the page (maybe research more)

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

What is the Swap Space?

A

A designated area in disk that is used by the VM system to store transient data. Generally data that will go away when the process exits goes to swap space.

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

What are specific examples of sections in memory stored in swap space typically?

A

Stack, Heap, BSS, modified data

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

What does the Memory Management Unit do? (MMU)

A

Translates Virtual Memory Addresses (vmaddr) to physical
memory addresses (phaddr) using a page table.

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

What are the two different types of addresses?

A

Virtual Memory Addresses: the address that the
CPU is using. Addresses used by programs are of
this type.

Physical Memory Addresses: The addresses of
RAM pages. This is the hardware address.

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

Does the cpu interact with virtual or physical addresses?

A

virtual

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

What are physical addresses pointing to?

A

pages in RAM