Background Naming and Transparency Remote File Access Stateful Versus Stateless Service File Replication Example Systems
Background Naming and Transparency Remote File Access Stateful Versus Stateless Service File Replication Example Systems
Background Naming and Transparency Remote File Access Stateful versus Stateless Service File Replication Example Systems
Background
Distributed file system (DFS) a distributed implementation of the classical time-sharing model of a file system, where multiple users share files and storage resources.
Operating System Concepts FAROOQ
A DFS manages set of dispersed storage devices Overall storage space managed by a DFS is composed of different, remotely located, smaller storage spaces.
There is usually a correspondence between constituent storage spaces and sets of files.
DFS Structure
Service software entity running on one or more machines and providing a particular type of function to a priori unknown clients. Server service software running on a single machine.
Operating System Concepts FAROOQ
Client process that can invoke a service using a set of operations that forms its client interface. A client interface for a file service is formed by a set of primitive file operations (create, delete, read, write). Client interface of a DFS should be transparent, i.e., not distinguish between local and remote files.
Naming Structures
Location transparency file name does not reveal the files physical storage location.
File name still denotes a specific, although hidden, set of physical disk blocks. Convenient way to share data. Can expose correspondence between component units and machines.
Location independence file name does not need to be changed when the files physical storage location changes.
Better file abstraction. Promotes sharing the storage space itself. Separates the naming hierarchy form the storage-devices hierarchy.
Files named by combination of their host name and local name; guarantees a unique systemwide name. Attach remote directories to local directories, giving the appearance of a coherent directory tree; only previously mounted remote directories can be accessed transparently. Total integration of the component file systems.
A single global name structure spans all the files in the system. If a server is unavailable, some arbitrary set of directories on different machines also becomes unavailable.
Consistency
Is locally cached copy of the data consistent with the master copy? Client-initiated approach
Operating System Concepts FAROOQ
Client initiates a validity check. Server checks whether the local data are consistent with the master copy.
Server-initiated approach
Server records, for each client, the (parts of) files it caches. When server detects a potential inconsistency, it must react.
Reduces server load and network traffic. Enhances potential for scalability.
Remote server method handles every remote access across the network; penalty in network traffic, server load, and performance. Total network overhead in transmitting big chunks of data (caching) is lower than a series of responses to specific requests (remote-service).
In caching, many remote accesses handled efficiently by the local cache; most remote accesses will be served as fast as local ones. Servers are contracted only occasionally in caching (rather than for each access).
Increased performance.
Fewer disk accesses. Stateful server knows if a file was opened for sequential access and can thus read ahead the next blocks.
Failure Recovery.
A stateful server loses all its volatile state in a crash.
Restore state by recovery protocol based on a dialog with clients, or abort operations that were underway when the crash occurred. Server needs to be aware of client failures in order to reclaim space allocated to record the state of crashed client processes (orphan detection and elimination).
With stateless server, the effects of server failure sand recovery are almost unnoticeable. A newly reincarnated server can respond to a self-contained request without any difficulty.
Distinctions (Cont.)
Penalties for using the robust stateless service:
longer request messages slower request processing additional constraints imposed on DFS design
File Replication
Replicas of the same file reside on failure-independent machines. Improves availability and can shorten service time. Naming scheme maps a replicated file name to a particular replica.
Existence of replicas should be invisible to higher levels. Replicas must be distinguished from one another by different lower-level names.
Updates replicas of a file denote the same logical entity, and thus an update to any replica must be reflected on all other replicas. Demand replication reading a nonlocal replica causes it to be cached locally, thereby generating a new nonprimary replica.
ANDREW (Cont.)
Clients are presented with a partitioned space of file names: a local name space and a shared name space. Dedicated servers, called Vice, present the shared name space to the clients as an homogeneous, identical, and location transparent file hierarchy. The local name space is the root file system of a workstation, from which the shared name space descends. Workstations run the Virtue protocol to communicate with Vice, and are required to have local disks where they store their local name space. Servers collectively are responsible for the storage and management of the shared name space.
ANDREW (Cont.)
Clients and servers are structured in clusters interconnected by a backbone LAN. A cluster consists of a collection of workstations and a cluster server and is connected to the backbone by a router. A key mechanism selected for remote file operations is whole file caching. Opening a file causes it to be cached, in its entirety, on the local disk.
volume number vnode number index into an array containing the inodes of files in a single volume. uniquifier allows reuse of vnode numbers, thereby keeping certain data structures, compact.
Fids are location transparent; therefore, file movements from server to server do not invalidate cached directory contents. Location information is kept on a volume basis, and the information is replicated on each server.
ANDREW Implementation
Client processes are interfaced to a UNIX kernel with the usual set of system calls. Venus carries out path-name translation component by component. The UNIX file system is used as a low-level storage system for both servers and clients. The client cache is a local directory on the workstations disk. Both Venus and server processes access UNIX files directly by their inodes to avoid the expensive path name-to-inode translation routine.
LRU algorithm used to keep each of them bounded in size. The status cache is kept in virtual memory to allow rapid servicing of stat (file status returning) system calls. The data cache is resident on the local disk, but the UNIX I/O buffering mechanism does some caching of the disk blocks in memory that are transparent to Venus.