Memory Virtualisation Flashcards

1
Q

Why do we need virtual memory?

A

To give programs the impression that they have much more memory available to them than they actually do. It also avoids programs overwriting each other’s memory.

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

What are the three main sections of an address space?

A

Code section, Stack and Heap

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

True or false, the stack grows negatively?

A

True. The stack grows negatively, while the heap grows positively.

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

What is address translation?

A

The translation between virtual and physical memory addresses.

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

What is Dynamic Hardware Relocation? What registers does it use? How do we modify these registers?

A

This is when we have a base and bounds register, which are used to mark where in memory an address space begins, and how large the address space is. So, the physical address = virtual address + base register.
We can only modify the values of these registers when in kernel mode.

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

How do we make sure that base and bounds registers are saved when making a context switch?

A

There is a process control block, which is where we store the values of these registers.

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

What are the pros and cons of base and bounds in Dynamic Relocation?

A

Pros: it is transparent, simple to implement, and simple to switch.
Cons: How do we share memory, internal fragmentation

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