On mar, oct 01, 2002 at 06:14:30 -0300, Rik van Riel wrote: > Yes, but it leaves out one important detail. Page tables are > multiple levels. > > This means a process has present / non-present pointers to page > tables, in a higher level page table called page directory. > > kind regards, Aha! I missed out that the page directory has a present/not present flag too. This way, when a process tries to access a directory entry that is has its "not present" flag active, it generates a page fault, and the OS allocates a new page table for that entry, then generates more page faults, each of them makes the os to allocate a new page in physical memory. Then, you can start a process with a page directory (4kb), and one page table (4kb), and the OS will generate the page tables as needed via page faults. In fact, (i'm talking on i386) the page directory entry and the page table entry are the same: ---------------------------------------- | Address | D|A|PCD|PWT|U|W|P| ---------------------------------------- 31 12 6 5 4 3 2 1 0 I don't know if I get it right now. Thanks people, you're very kind. -- $ fortune Now what would they do if I just sailed away? Who the hell really compelled me to leave today? Runnin' low on stories of what made it a ball, What would they do if I made no landfall?" -- Jimmy Buffet, "Landfall" $ -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/