Virtual Memory Flashcards

Learn about VM

1
Q

In order to manage memory more efficiently and with fewer errors, modern systems provide an abstraction of main memory called ——- ——.

Also known as process of indirection

A

Virtual Memory (VM)

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

What is the purpose of Virtual Memory

A
  1. Solves the problem when we don’t have enough memory space (RAM)
  2. Be able to fill holes in memory space
  3. Keep program secure and data corruption
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is “address translation”?

A

With VM addressing, the CPU accesses main memory by generating a “virtual address” (VA), which is converted to the appropriate “physical address” (PA) before being sent to main memory.

The task of converting a “virtual address” (VA) to a physical one is known as “address translation”

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

What is the MMU (memory management unit) for?

A

Dedicated hardware on the CPU chip called “MMU” translates “virtual addresses” on the fly, using a lookup table stored in “main memory” whose contents are managed by the OS or operating system.

In other words, MMU is a hardware on the CPU chip which translates a “virtual address” (VA) to “physical address” (PA) to retrieve a requested memory address to get the data.

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

What is the difference between the virtual address space and physical address space?

A

In the Virtual Memory (VM) system, the CPU generates virtual addresses from an address space of N = 2^n addresses called the “virtual address space”

For example, a VMA (virtual address space) with N = 2^n address is called an n-bit address space.
Typically, 32-bit or 64-bit address space. Which means for a 32-bit address space, the number of Virtual addresses (N) it can generate is 2^32 or 4 Gigabytes worth of VMA with the largest possible virtual address of (4G-1) or (2^32 - 1)

PAS (physical address space) corresponds to the M bytes of physical memory in the system. Usually what the capacity of RAM. Assumed M = 2^m bit where m-bit determines the size of an address space needed to represent the largest address.

For example, 4 KBytes of Ram is equal to 2^12 which means the system has a 12-bit address promised by its physical memory.

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