Suppose we were to implement remote file system mounting using an unreliable
RPC protocol that offers zero-or-more semantics. If a message reply is
received, this improves to at-least-once semantics. We define read() to return
the specified Nth block, rather than the next block in sequence; this way
reading once is the same as reading twice and at-least-once semantics is thus
the same as exactly once.
(a) For what other file system operations is there no difference between at-
leastonce and exactly once semantics? Consider open, create, write, seek,
opendir, readdir, mkdir, delete (aka unlink), and rmdir.
(b) For the remaining operations, which can have their semantics altered to
achieve equivalence of at-least-once and exactly once? What file system
operations are irreconcilable with at-least-once semantics?
(c) Suppose the semantics of the rmdir system call are now that the given
directory is removed if it exists, and nothing is done otherwise. How could
you write a program to delete directories that distinguishes between these two
cases?