Date: Sun, 13 Jun 1999 13:17:16 -0600 (MDT) From: Jonathon Doran <doranj@Colorado.EDU> To: freebsd-questions@freebsd.org Subject: Re: Memory and Addressing Protection Message-ID: <199906131917.NAA15776@ucsu.Colorado.EDU>
next in thread | raw e-mail | index | archive | help
> My CD-ROM Drive is broken, and as a result, I can't get FreeBSD source onto > my home PC to analyze it. :( Could you please give me a technical overview > of how FreeBSD Memory Protection works? If you're busy, you can delay > answering this message for a few weeks, but I would appreciate a reply some > time this month if at all possible. This is probably beyond the scope of this list. But there is a short answer which will get you started. Look at "The Design and Implementation of the 4.4BSD Unix Operating System" (I have the 4.3 book, so I'm guessing at the title a bit). There is a chapter on memory management in my copy which does a good job of covering the fundamentals. Basically, when an address is used the memory management hardware (on the processor) checks that the page is loaded into the page table. If not, a page fault is generated. FreeBSD traps it, loads the page into memory (overwriting one of the older pages), and updates the TLB. The instruction causing the fault is re-executed (or restarted, in the case of a string instruction which can generate multiple faults during execution). This is pretty vanilla demand-paging. However, BSD has an unusual "clock" algorithm which cheaply estimates the least recently used page. (I said estimates, since it samples memory usage, and can miss things). PS: you can always install FreeBSD over the net, or copy the distribution to an msdos partition :-) Jon Doran To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199906131917.NAA15776>