NFS "features"

Kenneth Almquist ka at june.cs.washington.edu
Fri Apr 21 21:12:37 AEST 1989


guy at auspex.auspex.com (Guy Harris) writes:
]> The issue is not blocking temporarily while waiting for disk or network
]> I/O to take place.  The problem is that the open system call, rather than
]> succeeding or reporting an error, can simply block forever.  The O_NDELAY
]> flag prevents this under both System V and BSD.  If you run NFS (which is
]> not part of either System V or BSD UNIX at this point), then the O_NDELAY
]> flag won't help you.
]
] There is some confusion here.  The "block forever" stuff applies to
] special files and FIFOs, not to regular files; while you can open a
] special file or FIFO that exists on a remote machine, the file in
] question refers to a local object.

Under NFS, it is also possible to block forever opening (or doing any-
thing else) to a regular file on a remote file system.  (This is not true
if the file system was mounted with the "-o soft" option.  However, this
isn't the default, so file systems tend to be mounted without this option.)

] If you do an open on a special file that exists on an NFS file system,
] O_NDELAY most definitely *will* get passed to the *local* driver for
] that special file's device, and it will act on it just as if you'd
] opened a special file on a local file system (in fact, the driver has no
] idea that the file exists on a remote machine - which, for the case of a
] diskless machine, is the way it should be; if I open "/dev/console" on
] my diskless workstation, I want *my* console, not the server's
] console!).

No, it's probably not the way it should be.  The advantage of the NFS
approach is that /dev can be on a remote file system rather than a local
file system, thereby freeing up maybe 1K bytes on the local machine.  You
discuss a diskless workstation where any local file systems have to reside
in memory, so local space is at a premium.  Never the less, the amount of
space consumed by a local /dev directory is peanuts.  I have nothing
against hacks designed to save a kilobyte of memory, but in this case you
have to give up the ability to reference remote devices transparently in
order to save that 1K of memory.  It strikes me as a bad tradeoff.
				Kenneth Almquist



More information about the Comp.unix.wizards mailing list