From owner-freebsd-questions Fri Nov 19 12: 1:43 1999 Delivered-To: freebsd-questions@freebsd.org Received: from probity.mcc.ac.uk (probity.mcc.ac.uk [130.88.200.94]) by hub.freebsd.org (Postfix) with ESMTP id 34A1314D80 for ; Fri, 19 Nov 1999 12:01:33 -0800 (PST) (envelope-from jcm@dogma.freebsd-uk.eu.org) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97]) by probity.mcc.ac.uk with esmtp (Exim 1.92 #3) id 11ouDs-0005BP-00; Fri, 19 Nov 1999 20:01:33 +0000 Received: from localhost (jcm@localhost) by dogma.freebsd-uk.eu.org (8.9.3/8.9.3) with SMTP id UAA28680; Fri, 19 Nov 1999 20:01:32 GMT (envelope-from jcm@dogma.freebsd-uk.eu.org) Date: Fri, 19 Nov 1999 20:01:32 +0000 (GMT) From: Jonathon McKitrick To: Lowell Gilbert Cc: freebsd-questions@freebsd.org Subject: Re: Memory Info In-Reply-To: <199911191951.OAA23688@world.std.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 19 Nov 1999, Lowell Gilbert wrote: >>If this is the case, does this mean FreeBSD keeps everything possible in >>memory and then swaps out to VM when it needs more? > >This is a badly-worded question -- that, in itself, indicates some of what >you're missing. VM *is* memory; the 'M' *stands* for the word "memory." OK, i meant swaps it to _disk_ here... >Specifically, VM is an abstraction of memory space that allows parts of >that space to be kept in different kinds of storage at any particular >That's only a rough approximation, though. Pages can get swapped to disk >well before they're needed for other purposes, and then there's no wait on >the disk write before they can be re-used. They don't have to be cleared >immediately, though, so if the original task accesses the page before it's >needed for anything else, that page is still in RAM (and the swap copy of >the page is invalidated). If pages are swapped to disk before they are needed, then there *IS* a wait on the disk write before the can be re-used, correct? >> How are unnecessary >>page faults and disk accesses avoided with this method? > >Quite well. A RAM page is never assigned to a new use unless that that >use *needed* RAM. [I realize I'm being a little disinguous here; the >problem is not when to reassign a page, but which one to reassign. Making >that guess is a rather complicated statistical problem, but amounts to >guessing which current page is least likely to be needed again soon.] FIFO, LRU, Second Chance, etc. And i don't quite understand that second sentences.. typo, maybe? >>I am a bit of a neophyte, but I am right in the middle of an 'Intro to >>Operating Systems' course, and we just finished memory mgmt and virtual >>memory. > >You might want to discuss some of this with your professor rather than a >bunch of people who don't know you and can't see you to pick up on body >language. I didn't realize body language could cause such a misinterpretation of email. ;-) -jm --------- He who laughs last... obviously didn't get the joke. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message