Re: Update

From: Andrew Valencia <vandys_at_nospam.org>
Date: Tue Nov 23 1993 - 20:11:41 PST

[nick@nsis.cl.nec.co.jp (Gavin Thomas Nicol) writes:]

> Can we mmap() files/ports into the memory map of a process. The
>reason I'm asking is that I've been thinking about an Object Oriented
>File System (basically just a persistant object store), and mmaping
>seems to be one of the easiest ways to achieve it. Actually, I have been
>thinking about objects a lot recently, and VSTa seems to be an ideal
>platform to experiment with.

I use mmap() to provide exec()'ing of files. I support read-only
demand-filled views of a file, and I support copy-on-write views. I
omit read/write file access because (1) for it to be coherent with
all other processes, each and every server would have to be built
using mmap(), (2) since granularity is at the page size, it doesn't
scale across networks well, and (3) when you want to page a dirty
page out, you have to write it back to the server--which, being a
user process, may not complete your I/O in any finite amount of time.

So, coherent mmap()'ed access to files does not simplify servers, does
not simplify your kernel, does not scale to networked configurations,
and can easily be detrimental to overall system stability. For these
reasons, I decided to omit the feature. If you want to experiment with
such a function, you should probably start with os/kern/pset_fod.c.
This is the pset layer which maps the filling of page slots down onto
an underlying fileserver. Right now he panics if he sees a dirty page
which he should write out--change that to do an I/O back out to the
server, and you should be in business.

Other thoughts. Once you have that, you need to ponder when things should
get sync()'ed out. You probably don't want to wait for the paging
system, because he only does it when memory gets low. You also need
to ponder what happens if your server task doesn't complete the I/O--there's
only so many threads for doing async pageouts. You should consider
how to cache the pset, along the lines of what I do for mapped a.out's.
Otherwise all the data will be flushed and freed, and you'll have to
re-fill the pages from the server if you mmap() it again. I think the
kernel assumes the server will do DMA, so be careful if you try handing
back I/O's to a filesystem.

I used to be a rabid fan of memory-based communication; in fact, I worked
on the original project which became the Scalable Coherent Interface
standard. I've since had lots of experience with both MIMD and messaging
systems, and I guess I've pretty much been converted! :-)

                                                Andy
Received on Tue Nov 23 20:27:17 1993

This archive was generated by hypermail 2.1.8 : Wed Sep 21 2005 - 21:01:53 PDT