CH 17
CH 17
Systems
Operating System Concepts – 8th Edition, Silberschatz, Galvin and Gagne ©2009
Chapter
p 17: Distributed File Systems
y
Background
Naming and Transparency
Remote File Access
Stateful versus Stateless Service
File Replication
An Example:
p AFS
Operating System Concepts – 8th Edition 17.2 Silberschatz, Galvin and Gagne ©2009
Chapter Objectives
Operating System Concepts – 8th Edition 17.3 Silberschatz, Galvin and Gagne ©2009
Background
Overall storage
g space
p managed
g byy a DFS is composed
p of different,,
remotely located, smaller storage spaces
Operating System Concepts – 8th Edition 17.4 Silberschatz, Galvin and Gagne ©2009
DFS Structure
Operating System Concepts – 8th Edition 17.5 Silberschatz, Galvin and Gagne ©2009
A transparent DFS hides the location where in the network the file
is stored
Operating System Concepts – 8th Edition 17.6 Silberschatz, Galvin and Gagne ©2009
Naming Structures
Location transparency – file name does not reveal the file’s physical
storage location
Location independence
p – file name does not need to be changed
g
when the file’s physical storage location changes
Operating System Concepts – 8th Edition 17.7 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 17.8 Silberschatz, Galvin and Gagne ©2009
Remote File Access
Operating System Concepts – 8th Edition 17.9 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 17.10 Silberschatz, Galvin and Gagne ©2009
Cache Update Policy
Operating System Concepts – 8th Edition 17.11 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 17.12 Silberschatz, Galvin and Gagne ©2009
Consistency
Is locally cached copy of the data consistent with the master copy?
Client-initiated approach
z Client initiates a validity check
z Server checks whether the local data are consistent with the
master copy
Server-initiated approach
z Server records, for each client, the (p
(parts of)) files it caches
z When server detects a potential inconsistency, it must react
Operating System Concepts – 8th Edition 17.13 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 17.14 Silberschatz, Galvin and Gagne ©2009
Caching and Remote Service (Cont.)
Operating System Concepts – 8th Edition 17.15 Silberschatz, Galvin and Gagne ©2009
Mechanism
z Client opens a file
z Server fetches information about the file from its disk, stores it
in its memory, and gives the client a connection identifier
unique
i tto th
the client
li t and
d th
the open fil
file
z Identifier is used for subsequent accesses until the session
ends
z Server must reclaim the main-memory space used by clients
who are no longer active
Increased performance
z Fewer disk accesses
z Stateful server knows if a file was opened for sequential access
and can thus read ahead the next blocks
Operating System Concepts – 8th Edition 17.16 Silberschatz, Galvin and Gagne ©2009
Stateless File Server
Operating System Concepts – 8th Edition 17.17 Silberschatz, Galvin and Gagne ©2009
Failure Recovery
z 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)
z With stateless server, the effects of server failure sand
recovery are almost
l t unnoticeable
ti bl
A newly reincarnated server can respond to a self-
contained request without any difficulty
Operating System Concepts – 8th Edition 17.18 Silberschatz, Galvin and Gagne ©2009
Distinctions (Cont.)
Operating System Concepts – 8th Edition 17.19 Silberschatz, Galvin and Gagne ©2009
File Replication
Operating System Concepts – 8th Edition 17.20 Silberschatz, Galvin and Gagne ©2009
An Example: AFS
Operating System Concepts – 8th Edition 17.21 Silberschatz, Galvin and Gagne ©2009
ANDREW (Cont.)
Operating System Concepts – 8th Edition 17.22 Silberschatz, Galvin and Gagne ©2009
ANDREW (Cont.)
A key
y mechanism selected for remote file operations
p is whole file
caching
z Opening a file causes it to be cached, in its entirety, on the
local disk
Operating System Concepts – 8th Edition 17.23 Silberschatz, Galvin and Gagne ©2009
Operating System Concepts – 8th Edition 17.24 Silberschatz, Galvin and Gagne ©2009
ANDREW File Operations
Operating System Concepts – 8th Edition 17.25 Silberschatz, Galvin and Gagne ©2009
ANDREW Implementation
Client processes are interfaced to a UNIX kernel with the usual set
off system
t calls
ll
Venus carries out path-name translation component by component
The UNIX file system is used as a low
low-level
level storage system for
both servers and clients
z The client cache is a local directory on the workstation’s disk
Both Venus and server processes access UNIX files directly by
their inodes to avoid the expensive path name-to-inode translation
routine
Operating System Concepts – 8th Edition 17.26 Silberschatz, Galvin and Gagne ©2009
ANDREW Implementation (Cont.)
Operating System Concepts – 8th Edition 17.27 Silberschatz, Galvin and Gagne ©2009
End of Chapter 17
Operating System Concepts – 8th Edition, Silberschatz, Galvin and Gagne ©2009
Fig. 17.01
Operating System Concepts – 8th Edition 17.29 Silberschatz, Galvin and Gagne ©2009