Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: 5.99.42/i386 crash (backtrace + core available)
On Sun, Jan 09, 2011 at 10:29:19PM +0000, Matthias Scheler wrote:
> I still like the AmigaOS model:
> 1.) Each file-system is owned by single AmigaOS process (same as a kernel
> thread in NetBSD).
> 2.) Any kind of file-system operating is done by sending a message to the
> file-system process.
> 3.) The file-system processes messages (usually in order) and sends a
> reply to the originator once it has finished.
>
> The advantages were:
> 1.) No locking is necessary because the file-system process owns all the
> data-structures.
> 2.) Layered file-systems are easy. They just accept messages from
> normal processes, create a new message and send it one layer down.
> They wait for a reply afterwards and finally send a reply for
> the original operation.
Yes, and in (2) you see the problem: they wait for a reply afterwards,
so only one operation can be in flight at once. This ends up being
exactly equivalent to using one big lock for the whole fs.
I too implemented this once, a long time ago, because I was persuaded
by this reasoning, and like pooka I discovered that it ceases to be
simple once you have more than one thing happening at a time. In fact,
the easiest way to have more than one thing happening at a time is to
create a pool of worker threads and give each incoming request to an
idle thread... and that puts you back in the same locking territory
you started.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index