Date: Wed, 30 Jul 2008 19:28:32 +0200 From: Max Laier <max@love2party.net> To: "FreeBSD Hackers" <ml.freebsd.hackers@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: General questions about virtual memory Message-ID: <200807301928.32940.max@love2party.net> In-Reply-To: <591f70e00807300907n1a0585efr455bf1f8fc60b4e8@mail.gmail.com> References: <591f70e00807300459j74aac11eob0bea7cdf4b4dcd4@mail.gmail.com> <200807301536.23274.max@love2party.net> <591f70e00807300907n1a0585efr455bf1f8fc60b4e8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 30 July 2008 18:07:51 FreeBSD Hackers wrote: > > This suggest that you don't understand virtual memory at all. Go back to > > the > > start of the chapter and re-read. The page directories and page tables > > describe a *virtual* address space. For a given architecture the > > *virtual* address space has a fixed size (4GB for i386), so the page > > table structure is > > always the same size (though it might be sparsely populated). Inside the > > page > > Ack! As soon as I read this I realized the mistake I had made in my > thinking. This was a dumb question, and I knew better than to ask. > Somehow I had confused myself. > > ----- 8< ----- > > If a read request is made to a virtual address who's data has been swapped > out, the CPU traps to the OS to fix the problem. Assuming there are no > free page frames for the new data, a page frame is selected and evicted to > make room for the new page. Whatever page was chosen belongs to a process > somewhere in the system. When that page frame gets swapped, the PTE > pointing to that page frame must be updated to indicate that that data is > no longer in RAM. How does the OS find that PTE? Does it search through > every entry of every page table for every process in the system until it > finds it? You should have quoted (and I suppose read) my entire message: > .. you need additional bookkeeping > to track that (see core map, free lists, ...) Wikipedia really does a good job explaining all this. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807301928.32940.max>