Skip site navigation (1)Skip section navigation (2)
Date:      05 Nov 1999 15:56:14 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        freebsd-questions@freebsd.org
Subject:   Re: Questions about memory filesystems.
Message-ID:  <86bt99hwjl.fsf@localhost.hell.gr>
In-Reply-To: "Ronald F. Guilmette"'s message of "Fri, 05 Nov 1999 01:26:31 -0800"
References:  <16804.941793991@monkeys.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Ronald F. Guilmette" <rfg@monkeys.com> writes:

> The man page for mount_mfs says that when you unmount one of these
> memory files systems, all data in that (former) filesystem is lost.
> 
> OK... Simple question:  Why?

Because when the memory of an MFS is freed, there is not guarantee that
the memory pages will not be used by someone else.  And in fact they
usually will be, especially on a somewhat loaded system.  The way an MFS 
works is similar to the way ramdisks were used in DOS, if that rings a
bell for you.

> OK, so if the system is smart enough to page out some parts of one of
> these memory filesystems when it gets generally low on memory, then
> why shouldn't it also be smart enough to simply (a) page out the
> *whole* filesystem to some designated hunk of disk space as/when the
> memory filesystem is being unmounted, and then (b) page the whole
> thing back in again (presumably from the same hunk of disk space) when
> the thing gets mounted again?

Because that would break the reason why a filesystem that exists solely
as a memory object is used by some people.  They really *need* this
non-persistant way an MFS is used.

> That would provide a nice sort of persistance effect for these memory
> filesystems, even across (orderly) reboots.

Nope, and that's exactly what an MFS `protects' you from.  Persistance.

-- 
Giorgos Keramidas, <keramida@ceid.upatras.gr>
"What we have to learn to do, we learn by doing." [Aristotle]


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?86bt99hwjl.fsf>