Memory Virtualisation Flashcards
Why do we need virtual memory?
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.
What are the three main sections of an address space?
Code section, Stack and Heap
True or false, the stack grows negatively?
True. The stack grows negatively, while the heap grows positively.
What is address translation?
The translation between virtual and physical memory addresses.
What is Dynamic Hardware Relocation? What registers does it use? How do we modify these registers?
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 do we make sure that base and bounds registers are saved when making a context switch?
There is a process control block, which is where we store the values of these registers.
What are the pros and cons of base and bounds in Dynamic Relocation?
Pros: it is transparent, simple to implement, and simple to switch.
Cons: How do we share memory, internal fragmentation