This is the memory map which looks the same for every process:
Code: Select all
0GiB-1GiB -> kernel space
1Gib-4GiB -> app space
Code: Select all
0x3fc00000 -> PTE
0x3fbff000 -> PDE
Now I have the problem that I cannot access every PD with the addresses only. So I map the PDE and the PTE into a defined region of the memory (as shown above). So that I can access the PDEs and the PTEs of the actual process.
But this lead me into another problem. When I add a page for the kernel I have to update every PD of every process and this will be very slow So, I thought that when I use the same PDEs for the 1st GiB of every process that I needn?t to update when I alloc a new page for the kernel. But if I then need to alloc a new PT, then I have to update the PDs of every process
I have to admit that I don?t know every thing of a microkernel. But some put the MM into the kernel and some doesn?t. I put it into the kernel. But this means that an app has to run some ring0 code, if it wants to get some memory. Correct me if I?m wrong, but if you have a microkernel, the only thing that an app will ever do in ring0 is sending and receiving messages?!
My problems in a short:
How to alloc a new page w/o the need that the app has to run ring0 code?
How to solve the problem that I have to update the PDs of every process if I need to alloc a new PT for the kernel?