Page 1 of 1

Dynamic Page Bindings.

Posted: Wed Aug 02, 2006 1:20 pm
by viral
Hi..

When a process is created, we bind whole kernel address space to that process's page directory. So that process can easily do system calls.

Now my memory manager has a heap of 4k at 0xD0000000. So when any new process is created, this address is mapped in its PD.

But kernel heap grows, so when this 4k mem is used I bind another page of 4k at end of old heap in kernel. But then all process starts doing page faults at 0xD0001000. This is obvious as this address is not yet binded in process PD.

Now tell me how do you maintain such dynamic page bindings? Do you bind the page in all process's PD when you bind it in kernels address space?

Hope this is making some sense..

Re:Dynamic Page Bindings.

Posted: Wed Aug 02, 2006 2:13 pm
by FlashBurn
I alloc enough mem for all 256 page table entries, so that when I map in a new page into kernel space that all processes can access it! This wastes some mem, but it makes lifes easier. There was a thread with the same probelm and I think Brendan is your man, he knows other(s) method(s)!

Re:Dynamic Page Bindings.

Posted: Wed Aug 02, 2006 3:50 pm
by viral
Hello....
There was a thread with the same probelm
I cant find that thread.. can anyone point me that?

Re:Dynamic Page Bindings.

Posted: Thu Aug 03, 2006 9:43 am
by Jamethiel
Just have all processes share the kernel page tables. Using the same kernel page tables (the same physical pages) across all processes means that when you update in one process all of the other processes get updated automatically.