























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























-^ Mainly based on Tanenbaum’s 2002“Distributed Operating Systems” Ch. 10and Silberschatz & Galvin’s Ch. 17^ –^ An overview of the main Distributed FS issues^ –^ We will see all the design options and thechoices made by different distributed filesystems
There are two distinct concepts: •^ File service
: the interface to file system functionality (primitives, parameters, semantics) • File server
: an implementation of this interface
-^ file servers may be local or remote –^ file servers may be replicated Usually there are two distinct components of file service: • True file service
: operations on files
-^ Directory service
: operations on directories (or metafiles)
-^ Main issue: do all machines have the same view of the filesystem?^ –^ are the paths to a file the same on all machines? -^ e.g., \mymachine\c-disk on Windows – or can one “mount” a remote file system in different locationson the local tree? -^ The former has the advantage of behaving like a local filesystem •^ The latter has the advantage of an extra level ofindirection in the naming scheme^ –^ e.g., one may decide to make /usr/local/ be remote on a Unixmachine. The paths do not need to change •^ With consistent naming across all machines, remotemounting is ideal
-^ In practice, we will always have caches for efficiencyreasons •^ Propagating all writes back to the server as soon as theyhappen is inefficient •^ Instead, a common policy is to propagate all changesonly when the file is closed or the write buffer flushedexplicitly (
session semantics
-^ no surprise here: this is common for local file systems as well • Another approach is to have transactions: atomicsequences of file operations –^ changes have the all-or-nothing property • Note that the above talks about the
semantics
: the
behavior that the user should expect. The implementationmay be tricky!
write , the value returned by the
read^ is the value just written. b) In a distributed system withcaching, obsolete values may bereturned.
-^ A good implementation should depend on the expected use.Usual properties of file access are:^ –^ most files are small (<10K). Maybe this is not true any more(either small or too big?)^ –^ reading is much more common than writing^ –^ random access is rare^ –^ most files don’t live long^ –^ files are rarely shared •^ All such properties need quantification (“how rare”, “howlong”, etc.) •^ Realistically, there have been very few good studies of theproperties of file accesses^ –^ we will see the classical Sprite FS study in a later lecture. This hasendured for years^ –^ only recently there have been some more studies in differentenvironments
There are many axes of variability in distributed filesystems: •^ Are servers special or can anybody export file services? •^ Are file services and directory services combined?^ –^ is directory information cached? •^ Can a server export file services for files that it itselfimports? •^ Can a directory hierarchy be partitioned? (So that serverA asks server B, which asks server C, etc.?) •^ Do servers maintain state information?
-^ Stateful servers advantages:^ –^ convenience: file locking, performance (filestate kept, shorter network requests, readahead)^ –^ idempotency
: depending on the file
service
(i.e.,
the interface) – if the interface is not naturally idempotent (e.g.,contains “Append”) then state is needed tomake it idempotent
-^ Fault tolerance is important •^ Performance is important: even stateless filesystems can keep state that is strictly used foroptimization •^ Stateful servers have better support for efficientcache consistency with no stale data^ –^ expiration protocols can be used (see later) •^ An idempotent interface is good (read, write,set_size operations, but not append)
-^ The cache consistency issues for distributed file systemsare similar to those for (multi-)processor caches^ –^ but the solutions are different: file use semantics is differentthan SMP memory •^ Main consistency issue:^ –^ reading and writing should not conflict: a reader should get aconsistent version (most recently written:
strong consistency
)
-^ “consistency” can be relaxed • Two performance issues: –^ writing should not propagate to the servers immediately forbest performance –^ delayed writing: periodic writing or update on close/flush –^ reading should not poll the server every time to find out if thecached copy is current
-^ Simple solution: strict (readers/writers) locking^ –^ but multiple clients may want to use a file (concurrency)^ –^ inconvenient semantics •^ Two main variants for concurrent accesses:
server-driven
protocols and
client-driven
protocols
-^ Client-driven: clients poll servers to see if cached objectsare current^ –^ have to sacrifice either performance or strong consistency •^ Server-driven: servers notify clients of changes^ –^ more complicated: now clients need to “play server” and acceptmessages^ –^ fault tolerance is harder^ –^ the server has to be stateful
-^ Distributed file systems often offer file replication^ –^ for fault-tolerance and availability: servers go down,disks go bad^ –^ for performance: distributing the load •^ Replication can be transparent or user controlled •^ Replication can be synchronous (all serversupdated simultaneously) or lazy •^ To avoid problems with crashes while replicatingfile changes, transaction techniques can beemployed (all-or-nothing) •^ Flexible, distributed replication protocols havebeen proposed (e.g., voting)^ –^ we won’t cover them here
-^ The basic NFS architecture for UNIX systems.