memory management

We just talked about MMU (memory management unit) a few days ago: the function is to realize the mapping of virtual memory to physical memory: if you need a page table for mapping, why do you need mmu? It is useless when we explain bare board development before. Over mmu, which is more convenient. You can directly access physical memory.

Now that the kernel is up, it must have mmu. Without mmu, the kernel cannot get up. Let's take an example to explain why the kernel does not come without MMU. Suppose there is a piece of memory (0~2g), which must be placed in the program. It can only be run in memory. Suppose there are two people, each of whom has written a program, respectively AA BB,

In the case of multitasking with an operating system: you must have an MMU\

A physical address can have multiple virtual memory mappings: for example shared memory between two processes:

The inner kernel of the page table is written. We don't need to write it

The page tables of different processes are different, if they are the same, they will conflict, but there is a situation like this, fork forbidden

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325120500&siteId=291194637