The main memory that a computer has is used for many things. The Memory Management Unit (MMU) is a piece of computer hardware that translates between physical and virtual memory addresses. When a CPU performs an instruction that uses a memory address, the MMU takes that logical memory address and translates it to a physical memory address. These are handled in groupings of physical memory addresses called pages. Pages are usually handled in 4 kB segments, using a table called a page table. The MMU also has other functionality, including using buffers, such as the Translation Lookaside Buffer (TLB), to hold recently accessed translations.
Virtual memory is helpful because it does the following:
- Allows hardware device memory to be mapped to an address space
- Allows access permissions (rwx) for particular memory regions
- Allows processes to have separate memory mappings...