Virtual Memory Filesystem (?)

Chris Torek chris at mimsy.UUCP
Fri May 6 14:49:32 AEST 1988


In article <3711 at lynx.UUCP> m5 at lynx.UUCP (Mike McNally ) writes:
>Could one of the cognoscenti

More like Illuminati :-)

>fill me in on this ``virtual memory file system'' of ``4.4''BSD?

It is just a file system (presumably /tmp might be one of these) in
which files are not written to any sort of backing store unless the
system `feels like it', and if and when they *are* written, they are
written in a way that does not recover from crashes.  In particular,
this file system will use free memory pages, unless there are few; then
the pages may get pushed to swap space.

A major reason for the existence of this file system is so that
swap space has a name in the file system:

	fd = new_temp_file();
	res = mmap(addr, len, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, off);

would get what amounts to zero-filled space, a la the existing sbrk().
This obviates the need for a `magic' file descriptor and/or a MAP_SWAP
flag when all you want is blank swap-backed memory.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at mimsy.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.wizards mailing list