CSCI319 Distributed Systems
CSCI319 Distributed Systems
Lecture 7
1 2
Introduction Introduction
3 4
Introduction Introduction
5 6
                                                                                                                                                                    1
                                                                                                    Provides an emulation of a
Storage systems and their properties (roughly)                                                          Storage
                                                                                                    shared  memorysystems
                                                                                                                    by         and          their properties (roughly)
                                                                                                    replication of memory pages
                                                                                                    or segments at each host
                                  Sharing Persis- Distributed    Consistency Example                                                      Sharing Persis- Distributed    Consistency Example
                                          tence   cache/replicas maintenance                                                                      tence   cache/replicas maintenance
Distributed shared memory Ivy (DSM, Ch. 18) Distributed shared memory Ivy (DSM, Ch. 18)
Consistency Consistency
Consistency: whether mechanisms exist to maintain                                                          Distributed systems: strict consistency is more difficult to
  consistency between multiple copies of data when updates                                                 achieve. Sun NFS caches copies of portions of files at
  occur.                                                                                                   client computers, and they adopt specific consistency
  caching : first applied to main memory and non-                                                          mechanisms to maintain an approximation to strict
  distributed file systems (strict ‘1’) – program cannot                                                   consistency. This is indicated by a tick.
  observe difference between cached copies and stored data
  after an update.
  Distributed systems: ?
9 10
Consistency Consistency
   Web: uses caching extensively at ___ and ___                                                            Web: uses caching extensively at client computers and
                                                                                                           proxy servers.
                                                                                                                 Consistency is often maintained by explicit user actions
                                                                                                                       E.g. update a web page and see what happens when browsing it?
                                                                                                                OK for browsing, not OK for cooperative apps such as shared
                                                                                                                whiteboard.
11 12
                                                                                                                                                                                                            2
Consistency                                                      Consistency
  Persistent object store: CORBA and Persistent Java                Persistent object store: CORBA and Persistent Java
  maintain single copies of persistent objects. The only            maintain single copies of persistent objects. The only
  consistency issue is _________________                            consistency issue is between the persistent copy of an
                                                                    object on disk and the active copy in memory, which is
                                                                    not visible to remote clients.
13 14
15 16
17 Fig. 8.3 18
                                                                                                                                        3
 Characteristics of (non-distributed) file systems                                                          Figure 8.2 (non-distributed) File system modules (layered)
19 20
                                                                                                               filedes = open(name, mode)          Opens an existing file with the given name.
                                                                                                               filedes = creat(name, mode)         Creates a new file with the given name.
        Directory module:                 relates file names to file IDs                                                                           Both operations deliver a file descriptor referencing the open
                                                                                                                                                   file. The mode is read, write or both.
        File module:                      relates file IDs to particular files                                 status = close(filedes)             Closes the open file filedes.
                                        Distributed file service requires all                                  count = read(filedes, buffer, n)    Transfers n bytes from the file referenced by filedes to buffer.
        Access control module:           checks permission for operation requested
                                        of the components shown here, with                                     count = write(filedes, buffer, n)   Transfers n bytes to the file referenced by filedes from buffer.
                                                                                                                                                   Both operations deliver the number of bytes actually transferred
        File access module:             additional
                                         reads        components
                                                or writes               to deal with
                                                          file data or attributes
                                                                                                                                                   and advance the read-write pointer.
        Block module:                   client  server
                                         accesses        communication
                                                    and allocates   disk blocksand                             pos = lseek(filedes, offset,        Moves the read-write pointer to offset (relative or absolute,
                                                                                                                                    whence)        depending on whence).
                                        with the distributed naming and
        Device module:                   disk I/O and buffering                                                status = unlink(name)               Removes the file name from the directory structure. If the file
                                        location of files.                                                                                         has no other names, it is deleted.
                                                                                                               status = link(name1, name2)         Adds a new name (name2) for a file (name1).
               Each layer depends only on the layers below it.                                                 status = stat(name, buffer)         Gets the file attributes for file name into buffer.
                                                                                                           Accessed through library procedures such as C Standard I/O Library or Java file classes
                                                                                                     21                                                                                                         22
Accessed through library procedures such as C Standard I/O Library or Java file classes
                                                                                                     23                                                                                                         24
                                                                                                                                                                                                                      4
Distributed file system requirements                                      Distributed file system requirements
25 26
  Transparency                                                              Transparency
    Location transparency: Files may be relocated without changing            Mobility transparency: Neither client programs nor system
    their pathnames, and user programs see the same name space                admin tables in client nodes need to be changed when files are
    wherever they are executed.                                               moved. This allows file mobility: files may be moved, either by
                                                                              system admins or automatically.
27 28
  Transparency                                                              Transparency
    Performance transparency: Client programs should continue to              Scaling transparency: The service can be expanded by
    perform satisfactorily while the load on the service varies within        incremental growth to deal with a wide range of loads and
    a specified range.                                                        network sizes.
29 30
                                                                                                                                                       5
Distributed file system requirements                                      Distributed file system requirements
31 32
33 34
35 36
                                                                                                                                                       6
Distributed file system requirements                                       Distributed file system requirements
  Security                                                                   Efficiency
     Virtually all file systems provide access control.                         A distributed file system should provide a service that is
     In distributed file systems, there is a need to authenticate client        comparable with, or better than, local file systems in
     requests so that access control at the server is based on correct          performance and reliability. It must be convenient to
     user ID and to protect the contents of request and reply messages          administer, providing operations and tools that enable system
     with digital signatures and (optionally) encryption of secret data.        admins to install and operate the system conveniently.
37 38
   Abstraction
   Anticipation of change                                                                                                     Flat file service
   Generality                                                                         Client module
Incrementality
41 42
                                                                                                                                                       7
File service architecture                                                     File service architecture
Flat file service & directory service: provide a                              Client module: provides a single programming interface
  comprehensive set of operations (interfaces for use by                        with operations on files similar to conventional file
  clientClient
          programs)
               computer for access to files. Server computer                    systems
                                                                                      Client computer                    Server computer
43 44
Design is open:
              open different client modules can be used to                      Flat file service
  implement different programming interfaces, simulating                           Implements operations on contents of files
  the fileClient
              operations
                 computer   of a variety of different  OScomputer
                                                    Server  and                                               UFIDs) are used to refer to files in all
                                                                                   Unique File Identifiers (UFID
  optimizing performance for different hardware     Directory service
                                                                                   requests for flat file service operations
    Application Application
  configurations.
     program      program                                                          Division of responsibilities between file service and directory
                                                                                   service is based upon the use of UFIDs.
                                                                                        UFID: a long sequence of bits; each file in the distributed system has a
                                                     Flat file service                  unique UFID.
           Client module                                                                When the flat file service receives a request to create a file, it generates a
                                                                                        new UFID for it and returns the UFID to the requester.
45 46
47 48
                                                                                                                                                                         8
                                                                                      Figure 8.6 Flat file service operations
File service architecture                                                             (A definition of the interface to a flat file service)
  Client module
    Runs in each client computer
                                                                                       Read(FileId, i, n) -> Data      If 1 i Length(File): Reads a sequence of up to n items
    Integrates and extends the ops of flat file service and directory                  — throws BadPosition            from a file starting at item i and returns it in Data.
    service under a single API that is available to user level                         Write(FileId, i, Data)          If 1 i Length(File)+1: Writes a sequence of Data to a
    programs in client computer                                                        — throws BadPosition            file, starting at item i, extending the file if necessary.
                                                                                       Create() -> FileId              Creates a new file of length 0 and delivers a UFID for it.
    Caches recent file blocks                                                          Delete(FileId)                  Removes the file from the file store.
    E.g. in Unix host:                                                                 GetAttributes(FileId) -> Attr   Returns the file attributes for the file.
        Emulates full set of Unix file operations                                      SetAttributes(FileId, Attr)     Sets the file attributes (only those attributes that are not
        Interprets Unix multi-part file names by requests to directory service                                         shaded in Figure 8.3).
49 50
  Compare with Unix: which one can achieve:                                              Compare with Unix
                            idempotent)?
     repeatable operations (idempotent                                                       Is the interface functionally equivalent to that of Unix file
     Stateless server?                                                                       system primitives ?
       Stateless servers can be restarted after a failure and resume operation
       without need for client or server to restore any state.
51 52
53 54
                                                                                                                                                                                      9
An example of file operation in Unix
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
   FILE *fp;
                                             Output?                                                             Output?
   const char *str = "1234567890";
   fp = fopen("sample.txt", "w");
   if(fp == NULL) {
      perror("failed to open sample.txt");
      return EXIT_FAILURE;
   }
   fwrite(str, 1, strlen(str), fp);
     fseek(fp, -4, SEEK_CUR);
   fwrite("a", 1, strlen("a"), fp);
     fclose(fp);
   return 1;
}
55 56
57 58
    Reason for difference?                                                      Unix file operations are neither idempotent nor stateless.
         Repeatable operations: except Create, all ops are idempotent,            A read-write pointer is generated whenever a file is opened
         allowing at-least-once RPC semantics (client may repeat calls to         If an operation is accidentally repeated, the automatic advance
         which they receive no reply).                                            of the pointer results in access to a different portion of file
         Repeated execution of Create produces a different new file for
         each call.
         Stateless server
59 60
                                                                                                                                                     10
File service architecture                                                                         File service architecture
61 62
Solution?
63 64
 Lookup(Dir, Name) -> FileId         Locates the text name in the directory and returns the         Lookup(Dir, Name) -> FileId         Locates the text name in the directory and returns the
 — throws NotFound                   relevant UFID. If Name is not in the directory, throws an      — throws NotFound                   relevant UFID. If Name is not in the directory, throws an
                                     exception.                                                                                         exception.
 AddName(Dir, Name, FileId)          If Name is not in the directory, adds (Name, File) to the      AddName(Dir, Name, FileId)          If Name is not in the directory, adds (Name, File) to the
 — throws NameDuplicate              directory and updates the file’s attribute record.             — throws NameDuplicate              directory and updates the file’s attribute record.
                                     If Name is already in the directory: throws an exception.                                          If Name is already in the directory: throws an exception.
 UnName(Dir, Name)                   If Name is in the directory: the entry containing Name is      UnName(Dir, Name)                   If Name is in the directory: the entry containing Name is
 — throws NotFound                   removed from the directory.                                    — throws NotFound                   removed from the directory.
                                     If Name is not in the directory: throws an exception.                                              If Name is not in the directory: throws an exception.
 GetNames(Dir, Pattern) -> NameSeq   Returns all the text names in the directory that match the     GetNames(Dir, Pattern) -> NameSeq   Returns all the text names in the directory that match the
                                     regular expression Pattern.                                                                        regular expression Pattern.
Purpose: translate file text names to UFIDs                                                       Purpose: translate file text names to UFIDs
Method: maintains directory files containing the mappings                                         Method: maintains directory files containing the mappings
Each directory is stored as _______________                                                       Each directory is stored as a conventional file with a UFID
65 66
                                                                                                                                                                                                     11
Figure 8.7 RPC interface to a directory service                                                     Figure 8.7 RPC interface to a directory service
  Lookup(Dir, Name) -> FileId         Locates the text name in the directory and returns the          Lookup(Dir, Name) -> FileId         Locates the text name in the directory and returns the
  — throws NotFound                   relevant UFID. If Name is not in the directory, throws an       — throws NotFound                   relevant UFID. If Name is not in the directory, throws an
                                      exception.                                                                                          exception.
  AddName(Dir, Name, FileId)          If Name is not in the directory, adds (Name, File) to the       AddName(Dir, Name, FileId)          If Name is not in the directory, adds (Name, File) to the
  — throws NameDuplicate              directory and updates the file’s attribute record.              — throws NameDuplicate              directory and updates the file’s attribute record.
                                      If Name is already in the directory: throws an exception.                                           If Name is already in the directory: throws an exception.
  UnName(Dir, Name)                   If Name is in the directory: the entry containing Name is       UnName(Dir, Name)                   If Name is in the directory: the entry containing Name is
  — throws NotFound                   removed from the directory.                                     — throws NotFound                   removed from the directory.
                                      If Name is not in the directory: throws an exception.                                               If Name is not in the directory: throws an exception.
  GetNames(Dir, Pattern) -> NameSeq   Returns all the text names in the directory that match the      GetNames(Dir, Pattern) -> NameSeq   Returns all the text names in the directory that match the
                                      regular expression Pattern.                                                                         regular expression Pattern.
                                                                                              67
                                                                                                   directory                                                                                      68
69 70
File service architecture Case study: Sun Network File System (NFS)
71 72
                                                                                                                                                                                                       12
 Case study: Sun Network File System (NFS)                                                                  Case study: Sun Network File System (NFS)
     Key interfaces were placed in the public domain (why?)                                                     Key interfaces were placed in the public domain (why?)
          E.g. Sun Microsystems Inc. (1989). NFS: Network File System
          Protocol Specification. RFC 1094.
                 See http://portal.acm.org/citation.cfm?id=RFC1094                                                   To encourage adoption as a standard
               Then undergone many versions
73 74
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
     Each computer in an NFS network can be both client and                                                     All implementations of NFS support NFS protocol – a set
     server                                                                                                     of RPC (for clients to perform ops on a remote file store)
     Files at every machine can be made accessible by other                                                     NFS protocol is OS independent but was originally
     machines                                                                                                   developed for use in networks of Unix systems
     A common practice: some dedicated servers and others                                                       We will describe the Unix implementation of NFS
     are workstations                                                                                           protocol (version 3).
     Hardware and OS heterogeneity
          Design is OS independent: client and server implementation
          exist for almost all OS, e.g. Unix, Linux, Mac, Windows
75 76
file system
Other
                                                                                                                                                                                                                     13
 Figure 8.8                                                                                               Figure 8.8
               Requests referring to remote files are                                                                   NFS client and server modules communicate
 NFS architecture
               translated by client module to NFS protocol
                                                                                                          NFS architecture
                                                                                                                        using RPC.
                              ops and then passed to NFS server module                                                                (Sun’s RPC was developed for use in NFS)
                     Client computer                                         Server computer                                  Client computer                                        Server computer
                                                                                                                                  file system
                 UNIX                   NFS                                NFS              UNIX                          UNIX                  NFS                                NFS              UNIX
                  file                                                                       file                          file                                                                      file
                          Other
                                                                                                                                  Other
                                        client                            server                                                                client                            server
                system                                                                     system                        system                                                                    system
                                                   NFS                                                                                                     NFS
                                                 protocol                                                                                                protocol
79 80
                     Client computer
                             RPC can use either UDP or TCP. Server
                                                               NFS computer                                                   Client computer                                        Server computer
file system
Other
81 82
file system
Other
83 84
                                                                                                                                                                                                                 14
 Figure 8.8                                                                                                Figure 8.8
 NFS architecture                                                                                          NFS architecture
                                                                                                                                    file system
                   UNIX                  NFS                                NFS              UNIX                          UNIX                   NFS                                NFS              UNIX
                    file                                                                      file                          file                                                                       file
                           Other
                                                                                                                                    Other
                                         client                            server                                                                 client                            server
                  system                                                                    system                        system                                                                     system
                                                    NFS                                                                                                      NFS
                                                  protocol                                                                                                 protocol
85 86
 Figure 8.8
 NFS architecture                                                                                          Case study: Sun Network File System (NFS)
                                         client                            server
                  system                                                                    system
                                                    NFS
                                                  protocol                                                       $
87 88
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
                                                                                                           File handle:
     NFS file IDs vs Unix file IDs
                                                                                                           Filesystem ID | i-node number of file | i-node generation number
          In NFS: file IDs are called file handles
                derived from the file’s i-node number by adding two extra fields as                         Note 1: NFS adopts Unix mountable filesystem as unit of file
               follows:
                                                                                                             grouping.
  File handle:
                                                                                                            Note 2: i-node generation number is needed because
    Filesystem ID | i-node number of file | i-node generation number                                         conventional Unix reuses i-node number after a file is
                                                                                                             removed. The generation number is stored with each file
                                                                                                             and is incremented each time the i-node number is reused,
                                                                                                             e.g. in a Unix creat system call.
89 90
                                                                                                                                                                                                                   15
Case study: Sun Network File System (NFS)                                                                        Figure 8.9 NFS server RPC interface (simplified) – 1
File handle:                                                                                                         lookup(dirfh, name) -> fh, attr         Returns file handle and attributes for the file name in the directory
                                                                                                                                                             dirfh.
Filesystem ID | i-node number of file | i-node generation number                                                     create(dirfh, name, attr) ->            Creates a new file name in directory dirfh with attributes attr and
                                                                                                                                    newfh, attr              returns the new file handle and attributes.
Note 3: file handles are passed from server to client in the                                                        remove(dirfh, name) status               Removes file name from directory dirfh.
 results of lookup, create and mkdir (see Fig. 8.9) and                                                             getattr(fh) -> attr                      Returns file attributes of file fh. (Similar to the UNIX stat system
                                                                                                                                                             call.)
 from client to server in the argument lists of all server                                                          setattr(fh, attr) -> attr                Sets the attributes (mode, user id, group id, size, access time and
 operations.                                                                                                                                                 modify time of a file). Setting the size to 0 truncates the file.
                                                                                                                    read(fh, offset, count) -> attr, data    Returns up to count bytes of data from a file starting at offset.
                                                                                                                                                             Also returns the latest attributes of the file.
                                                                                                                    write(fh, offset, count, data) -> attr   Writes count bytes of data to a file starting at offset. Returns the
                                                                                                                                                             attributes of the file after the write has taken place.
                                                                                                                    rename(dirfh, name, todirfh, toname) Changes the name of file name in directory dirfh to toname in
                                                                                                                                   -> status             directory to todirfh
                                                                                                                                                                         .
                                                                                                                    link(newdirfh, newname, dirfh, name) Creates an entry newname in the directory newdirfh which refers to
                                                                                                                                    -> status            file name in the directory dirfh.
                                                                                                                                                                                                              Continues on next slide ...
                                                                                                           91                                                                                                                       92
                                                                                                                Cf. Figs 8.6 & 8.7 & Unix counterparts except readdir and statfs
Figure 8.9 NFS server RPC interface (simplified) – 2 Case study: Sun Network File System (NFS)
93 94
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
  The virtual file system layer has one VFS structure for                                                            The NFS client module
  each mounted file system and one v-node per open file                                                                    Supplies an interface for conventional apps
        A VFS structure relates a remote file system to local directory                                                    Emulates the semantics of standard Unix file system primitives
        on which it is mounted                                                                                             precisely and is integrated with Unix kernel (rather than supplied
        A v-node contains                                                                                                  as a library for loading into client processes)
              an indicator to show whether file is local or remote                                                                  Benefits?
              if local, v-node contains a reference to the index of the local file (an i-
              node in Unix); if remote, it contains the file handle of the remote file.
95 96
                                                                                                                                                                                                                                            16
Case study: Sun Network File System (NFS)                                           Case study: Sun Network File System (NFS)
97 98
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
99 100
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
101 102
                                                                                                                                                                       17
Case study: Sun Network File System (NFS)                                            Case study: Sun Network File System (NFS)
                                                                                                                  Remote                                             Remote
                                                                                               people                             students        x      staff                             users
                                                                                                                   mount                                              mount
                                                                                     Note: The file system mounted at /usr/students in the client is actually the sub-tree located at /export/people in Server 1;
                                                                               103   the file system mounted at /usr/staff in the client is actually the sub-tree located at /nfs/users in Server 2.           104
105 106
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
  Soft-mounted                                                                            Soft-mounted
    In the case of a server failure, NFS client module returns a                               In the case of a server failure, NFS client module returns a
    failure indication to user-level processes after a small number                            failure indication to user-level processes after a small number
    of retries.                                                                                of retries.
        So, well-written programs can detect the failure                                              So, well-written programs can detect the failure
                                                                                               But many Unix utilities and apps do not test for file access
                                                                                               failure; hence causing unpredictable results.
107 108
                                                                                                                                                                                                                     18
Case study: Sun Network File System (NFS)                               Case study: Sun Network File System (NFS)
109 110
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
113 114
                                                                                                                                                    19
Case study: Sun Network File System (NFS)                                             Case study: Sun Network File System (NFS)
115 116
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
117 118
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
      Data item 1
      Data item 2
                                                                                                                                                                             20
Case study: Sun Network File System (NFS)                                   Case study: Sun Network File System (NFS)
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
                  Tc: time when cache entry was last validated                                Tc: time when cache entry was last validated
                  Tm: time when block was last modified at server                             Tm: time when block was last modified at server
                                                                                                                                                          21
Case study: Sun Network File System (NFS)                             Case study: Sun Network File System (NFS)
  Consistency                                                           Consistency
    An approximation to one-copy semantics                                An approximation to one-copy semantics
    Meets the needs of majority of applications                           Meets the needs of majority of applications
  The use of file sharing via NFS for communication of close            The use of file sharing via NFS for communication of close
    coordination between processes on different computers                 coordination between processes on different computers
    can/cannot? be recommended.                                           cannot be recommended.
127 128
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
http://web.mit.edu/Kerberos
129 130
Case study: Sun Network File System (NFS) Case study: Sun Network File System (NFS)
  Performance                                                           Performance
    How to evaluate performance?                                          Measurements are taken regularly by Sun and other NFS
       Analysis                                                           implementors
       Measurement                                                           www.spec.org
       Simulation
131 132
                                                                                                                                           22
Case study: Sun Network File System (NFS)                                  Case study: Sun Network File System (NFS)
Enhancement?
133 134
Spritely NFS
135 136
  With an addition of open and close calls                                   With an addition of open and close calls
  Server:                                                                    Server:
    If open has write mode, it will fail if there is another write             If open in read mode
    If open in write mode, other “reading” clients will receive                    server sends message to writing client, instructing it to stop caching (i.e.
    message to invalidate locally cached portions of file                         to use a strictly write-through mode)
                                                                                   and it instructs all reading clients to stop caching (so that all local read
                                                                                  calls result in a request to server).
137 138
                                                                                                                                                                  23
Spritely NFS                                                           Spritely NFS
139 140
  WebNFS                                                                 WebNFS
    E.g., https://yanfs.dev.java.net (in Java)                             Background: some Internet applications (e.g. Java applets)
                                                                           could benefit from direct access to NFS servers without many of
                                                                           the overheads associated with the emulation of Unix
141 142
  WebNFS                                                                 WebNFS
    Aim: to enable web browsers, Java programs and other apps to           To read a portion of a single file located on an NFS server that
    interact with an NFS server directly                                   supports WebNFS requires the establishment of a TCP
    WebNFS server: at a well-known port number 2049                        connection and two RPC calls
143 144
                                                                                                                                                24
Other enhancements                                                        Other enhancements
145 146
  NFS version 4 and beyond …                                                To what extent does Sun NFS deviate from one-copy file
                                                                            update semantics? Construct a scenario in which two user-
e.g. see multi-language demo in Open Solaris project                        level processes sharing a file would operate correctly in a
   NFSv4.1 being developed ...                                              single UNIX host but would observe inconsistencies when
                                                                            running in different hosts.
http://hub.opensolaris.org/bin/view/Project+nfsv41/
http://hub.opensolaris.org/bin/view/Project+nfsv41/basics
http://hub.opensolaris.org/bin/view/Project+nfsv41/chinese_basics
  Sun NFS aims to support heterogeneous distributed                         What data must the NFS client module hold on behalf of
  systems by the provision of an operating system-                          each user-level process?
  independent file service. What are the key decisions that
  the implementer of an NFS server for an operating system
  other than UNIX would have to take? What constraints
  should an underlying filing system obey to be suitable for
  the implementation of NFS servers?
149 150
                                                                                                                                          25
Group discussions and exercises                                             Group discussions and exercises
  How does the NFS Automounter help to improve the                            How many lookup calls are needed to resolve a 5-part
  performance and scalability of NFS?                                         pathname (for example, /usr/users/jim/code/xyz.c) for a
                                                                              file that is stored on an NFS server? What is the reason for
                                                                              performing the translation step-by-step?
151 152
  Ans:
     UNIX: strict one-copy update semantics;
     NFS: approximation to one-copy update semantics with a delay
     (~3 seconds) in achieving consistency;
     AFS: consistency is achieved only on close. Thus concurrent
     updates at different clients will result in lost updates – the last
     client to close the file wins.
                                                                      153
26